Thanks for you answer! My basic idea is to redirect the call to change the parameters for messages
I install message "call.route" and catch '%%<message'. I get message -
%%>message:0xb54ff030.358673859:1405946018:call.route::id=sip/2:module=sip:status=incoming:address=172.17.2.44%z53388:billid=1405945803-2:answered=false:direction=incoming:callid=sip/YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY./1d1e6157/:caller=127:called=127:callername=mkv:antiloop=19:ip_host=172.17.2.44:ip_port=53388:ip_transport=UDP:sip_uri=sip%z127@172.17.2.181%z5060:sip_from=sip%z127@172.17.2.181%z5060:sip_to=<sip%z127@172.17.2.181%z5060>:sip_callid=YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY.:device=3CXPhone 6.0.18815.0:sip_contact=<sip%z127@172.17.2.44%z53388;rinstance=6ef857baa4e8b41a>:sip_allow=INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE:sip_content-type=application/sdp:sip_supported=replaces:sip_user-agent=3CXPhone 6.0.18815.0:rtp_addr=172.17.2.44:media=yes:formats=mulaw,alaw:transport=RTP/AVP:rtp_rfc2833=101:rtp_port=40024:sdp_sendrecv=:media_video=yes:formats_video=:transport_video=RTP/AVP:rtp_port_video=40022:sdp_video_sendrecv=:rtp_forward=possible:handlers=javascript%z15,regexroute%z100,javascript%z15,cdrbuild%z50
Then i changed the follow parameters of message(change the number of call - 111 instead 127):
param['sip_contact'] = <sip%z127@172.17.2.44%z53388;rinstance=6ef857baa4e8b41a>
param['called'] = '111'
param['sip_to'] =<sip%z111@172.17.2.181%z5060>
param['sip_uri'] = sip%z111@172.17.2.181%z5060
param['sip_from'] = sip%z127@172.17.2.181%z5060
And i sent the message into the yate - %%<message:0xb54ff030.358673859:true:call.route::id=sip/2:callername=mkv:caller=127:called=111:address=172.17.2.44%z53388:handlers=javascript%z15,regexroute%z100,javascript%z15,cdrbuild%z50:ip_port=53388:sip_uri=sip%z111@172.17.2.181%z5060:sip_from=sip%z127@172.17.2.181%z5060:sip_to=<sip%z111@172.17.2.181%z5060>:sip_callid=YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY.:sip_contact=<sip%z127@172.17.2.44%z53388;rinstance=6ef857baa4e8b41a>:sip_allow=INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE:module=sip:status=incoming:billid=1405945803-2:answered=false:direction=incoming:callid=sip/YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY./1d1e6157/
And i get the error - destination not found.
May be i must change another messages like - chan.startup, call.preroute.
And is possible to change the redirect the number of call to change the parametes of message?
Below i show yate messages:
essage sniffer is on
Sniffed 'user.auth' time=1405946017.857272
thread=0x969c668 'YSIP EndPoint'
data=(nil)
retval='(null)'
param['protocol'] = 'sip'
param['method'] = 'INVITE'
param['uri'] = 'sip:127@172.17.2.181:5060'
param['ip_host'] = '172.17.2.44'
param['ip_port'] = '53388'
param['ip_transport'] = 'UDP'
param['address'] = '172.17.2.44:53388'
param['newcall'] = 'true'
param['domain'] = '172.17.2.181'
param['device'] = '3CXPhone 6.0.18815.0'
param['caller'] = '127'
param['called'] = '127'
param['billid'] = '1405945803-2'
Returned false 'user.auth' delay=0.020398
thread=0x969c668 'YSIP EndPoint'
data=(nil)
retval='(null)'
param['protocol'] = 'sip'
param['method'] = 'INVITE'
param['uri'] = 'sip:127@172.17.2.181:5060'
param['ip_host'] = '172.17.2.44'
param['ip_port'] = '53388'
param['ip_transport'] = 'UDP'
param['address'] = '172.17.2.44:53388'
param['newcall'] = 'true'
param['domain'] = '172.17.2.181'
param['device'] = '3CXPhone 6.0.18815.0'
param['caller'] = '127'
param['called'] = '127'
param['billid'] = '1405945803-2'
param['handlers'] = 'monitoring:1,regfile:100'
Sniffed 'chan.startup' time=1405946017.892234
thread=0x974a460 'Engine Worker'
data=(nil)
retval='(null)'
param['id'] = 'sip/2'
param['module'] = 'sip'
param['status'] = 'incoming'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['answered'] = 'false'
param['direction'] = 'incoming'
param['callid'] = 'sip/YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY./1d1e6157/'
param['caller'] = '127'
param['called'] = '127'
Returned false 'chan.startup' delay=0.011137
thread=0x974a460 'Engine Worker'
data=(nil)
retval='(null)'
param['id'] = 'sip/2'
param['module'] = 'sip'
param['status'] = 'incoming'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['answered'] = 'false'
param['direction'] = 'incoming'
param['callid'] = 'sip/YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY./1d1e6157/'
param['caller'] = '127'
param['called'] = '127'
param['handlers'] = 'javascript:15,pbxassist:15,cdrbuild:50'
Sniffed 'call.cdr' time=1405946017.903302 (broadcast)
thread=0x974a460 'Engine Worker'
data=(nil)
retval='(null)'
param['time'] = '1405946017.892'
param['chan'] = 'sip/2'
param['cdrid'] = '2'
param['runid'] = '1405945803'
param['operation'] = 'initialize'
param['direction'] = 'incoming'
param['duration'] = '0.011'
param['billtime'] = '0.000'
param['ringtime'] = '0.000'
param['status'] = 'incoming'
param['external'] = '127'
param['cdrwrite'] = 'true'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['caller'] = '127'
param['called'] = '127'
Sniffed 'call.preroute' time=1405946017.857031
thread=0xb5306570 'Call Router'
data=(nil)
retval='(null)'
param['id'] = 'sip/2'
param['module'] = 'sip'
param['status'] = 'incoming'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['answered'] = 'false'
param['direction'] = 'incoming'
param['callid'] = 'sip/YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY./1d1e6157/'
param['caller'] = '127'
param['called'] = '127'
param['callername'] = 'mkv'
param['antiloop'] = '19'
param['ip_host'] = '172.17.2.44'
param['ip_port'] = '53388'
param['ip_transport'] = 'UDP'
param['sip_uri'] = 'sip:127@172.17.2.181:5060'
param['sip_from'] = 'sip:127@172.17.2.181:5060'
param['sip_to'] = '<sip:127@172.17.2.181:5060>'
param['sip_callid'] = 'YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY.'
param['device'] = '3CXPhone 6.0.18815.0'
param['sip_contact'] = '<sip:127@172.17.2.44:53388;rinstance=6ef857baa4e8b41a>'
param['sip_allow'] = 'INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE'
param['sip_content-type'] = 'application/sdp'
param['sip_supported'] = 'replaces'
param['sip_user-agent'] = '3CXPhone 6.0.18815.0'
param['rtp_addr'] = '172.17.2.44'
param['media'] = 'yes'
param['formats'] = 'mulaw,alaw'
param['transport'] = 'RTP/AVP'
param['rtp_rfc2833'] = '101'
param['rtp_port'] = '40024'
param['sdp_sendrecv'] = ''
param['media_video'] = 'yes'
param['formats_video'] = ''
param['transport_video'] = 'RTP/AVP'
param['rtp_port_video'] = '40022'
param['sdp_video_sendrecv'] = ''
param['rtp_forward'] = 'possible'
Returned false 'call.preroute' delay=0.079908
thread=0xb5306570 'Call Router'
data=(nil)
retval='(null)'
param['id'] = 'sip/2'
param['module'] = 'sip'
param['status'] = 'incoming'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['answered'] = 'false'
param['direction'] = 'incoming'
param['callid'] = 'sip/YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY./1d1e6157/'
param['caller'] = '127'
param['called'] = '127'
param['callername'] = 'mkv'
param['antiloop'] = '19'
param['ip_host'] = '172.17.2.44'
param['ip_port'] = '53388'
param['ip_transport'] = 'UDP'
param['sip_uri'] = 'sip:127@172.17.2.181:5060'
param['sip_from'] = 'sip:127@172.17.2.181:5060'
param['sip_to'] = '<sip:127@172.17.2.181:5060>'
param['sip_callid'] = 'YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY.'
param['device'] = '3CXPhone 6.0.18815.0'
param['sip_contact'] = '<sip:127@172.17.2.44:53388;rinstance=6ef857baa4e8b41a>'
param['sip_allow'] = 'INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE'
param['sip_content-type'] = 'application/sdp'
param['sip_supported'] = 'replaces'
param['sip_user-agent'] = '3CXPhone 6.0.18815.0'
param['rtp_addr'] = '172.17.2.44'
param['media'] = 'yes'
param['formats'] = 'mulaw,alaw'
param['transport'] = 'RTP/AVP'
param['rtp_rfc2833'] = '101'
param['rtp_port'] = '40024'
param['sdp_sendrecv'] = ''
param['media_video'] = 'yes'
param['formats_video'] = ''
param['transport_video'] = 'RTP/AVP'
param['rtp_port_video'] = '40022'
param['sdp_video_sendrecv'] = ''
param['rtp_forward'] = 'possible'
param['handlers'] = 'javascript:15,regexroute:100'
Sniffed 'call.route' time=1405946017.857031
thread=0xb5306570 'Call Router'
data=(nil)
retval='(null)'
param['id'] = 'sip/2'
param['module'] = 'sip'
param['status'] = 'incoming'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['answered'] = 'false'
param['direction'] = 'incoming'
param['callid'] = 'sip/YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY./1d1e6157/'
param['caller'] = '127'
param['called'] = '127'
param['callername'] = 'mkv'
param['antiloop'] = '19'
param['ip_host'] = '172.17.2.44'
param['ip_port'] = '53388'
param['ip_transport'] = 'UDP'
param['sip_uri'] = 'sip:127@172.17.2.181:5060'
param['sip_from'] = 'sip:127@172.17.2.181:5060'
param['sip_to'] = '<sip:127@172.17.2.181:5060>'
param['sip_callid'] = 'YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY.'
param['device'] = '3CXPhone 6.0.18815.0'
param['sip_contact'] = '<sip:127@172.17.2.44:53388;rinstance=6ef857baa4e8b41a>'
param['sip_allow'] = 'INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE'
param['sip_content-type'] = 'application/sdp'
param['sip_supported'] = 'replaces'
param['sip_user-agent'] = '3CXPhone 6.0.18815.0'
param['rtp_addr'] = '172.17.2.44'
param['media'] = 'yes'
param['formats'] = 'mulaw,alaw'
param['transport'] = 'RTP/AVP'
param['rtp_rfc2833'] = '101'
param['rtp_port'] = '40024'
param['sdp_sendrecv'] = ''
param['media_video'] = 'yes'
param['formats_video'] = ''
param['transport_video'] = 'RTP/AVP'
param['rtp_port_video'] = '40022'
param['sdp_video_sendrecv'] = ''
param['rtp_forward'] = 'possible'
param['handlers'] = 'javascript:15,regexroute:100'
Returned false 'call.cdr' delay=0.051039 (broadcast)
thread=0x974a460 'Engine Worker'
data=(nil)
retval='(null)'
param['time'] = '1405946017.892'
param['chan'] = 'sip/2'
param['cdrid'] = '2'
param['runid'] = '1405945803'
param['operation'] = 'initialize'
param['direction'] = 'incoming'
param['duration'] = '0.011'
param['billtime'] = '0.000'
param['ringtime'] = '0.000'
param['status'] = 'incoming'
param['external'] = '127'
param['cdrwrite'] = 'true'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['caller'] = '127'
param['called'] = '127'
param['handlers'] = 'queuesnotify:10'
Sniffed 'call.cdr' time=1405946017.938472 (broadcast)
thread=0x974a460 'Engine Worker'
data=(nil)
retval='(null)'
param['time'] = '1405946017.892'
param['chan'] = 'sip/2'
param['cdrid'] = '2'
param['runid'] = '1405945803'
param['operation'] = 'update'
param['direction'] = 'incoming'
param['duration'] = '0.046'
param['billtime'] = '0.000'
param['ringtime'] = '0.000'
param['status'] = 'incoming'
param['external'] = '127'
param['cdrwrite'] = 'true'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['caller'] = '127'
param['called'] = '127'
Returned false 'call.cdr' delay=0.068951 (broadcast)
thread=0x974a460 'Engine Worker'
data=(nil)
retval='(null)'
param['time'] = '1405946017.892'
param['chan'] = 'sip/2'
param['cdrid'] = '2'
param['runid'] = '1405945803'
param['operation'] = 'update'
param['direction'] = 'incoming'
param['duration'] = '0.046'
param['billtime'] = '0.000'
param['ringtime'] = '0.000'
param['status'] = 'incoming'
param['external'] = '127'
param['cdrwrite'] = 'true'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['caller'] = '127'
param['called'] = '127'
param['handlers'] = 'queuesnotify:10'
Returned true 'call.route' delay=0.151152
thread=0xb5306570 'Call Router'
data=(nil)
retval='(null)'
param['id'] = 'sip/2'
param['module'] = 'sip'
param['status'] = 'incoming'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['answered'] = 'false'
param['direction'] = 'incoming'
param['callid'] = 'sip/YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY./1d1e6157/'
param['caller'] = '127'
param['called'] = '111'
param['callername'] = 'mkv'
param['antiloop'] = '19'
param['ip_host'] = '172.17.2.44'
param['ip_port'] = '53388'
param['ip_transport'] = 'UDP'
param['sip_uri'] = 'sip:111@172.17.2.181:5060'
param['sip_from'] = 'sip:127@172.17.2.181:5060'
param['sip_to'] = '<sip:111@172.17.2.181:5060>'
param['sip_callid'] = 'YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY.'
param['device'] = '3CXPhone 6.0.18815.0'
param['sip_contact'] = '<sip:127@172.17.2.44:53388;rinstance=6ef857baa4e8b41a>'
param['sip_allow'] = 'INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE'
param['sip_content-type'] = 'application/sdp'
param['sip_supported'] = 'replaces'
param['sip_user-agent'] = '3CXPhone 6.0.18815.0'
param['rtp_addr'] = '172.17.2.44'
param['media'] = 'yes'
param['formats'] = 'mulaw,alaw'
param['transport'] = 'RTP/AVP'
param['rtp_rfc2833'] = '101'
param['rtp_port'] = '40024'
param['sdp_sendrecv'] = ''
param['media_video'] = 'yes'
param['formats_video'] = ''
param['transport_video'] = 'RTP/AVP'
param['rtp_port_video'] = '40022'
param['sdp_video_sendrecv'] = ''
param['rtp_forward'] = 'possible'
param['handlers'] = 'javascript:15,regexroute:100,javascript:15,cdrbuild:50'
Sniffed 'chan.hangup' time=1405946018.029888
thread=0x974a460 'Engine Worker'
data=(nil)
retval='(null)'
param['id'] = 'sip/2'
param['module'] = 'sip'
param['status'] = 'rejected'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['answered'] = 'false'
param['direction'] = 'incoming'
param['callid'] = 'sip/YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY./1d1e6157/'
param['reason'] = 'No route to call target'
Returned false 'chan.hangup' delay=0.038876
thread=0x974a460 'Engine Worker'
data=(nil)
retval='(null)'
param['id'] = 'sip/2'
param['module'] = 'sip'
param['status'] = 'rejected'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['answered'] = 'false'
param['direction'] = 'incoming'
param['callid'] = 'sip/YjhjNjJkMWRkZjQ0ODFiZTNhNzY1ZTA2YWJkMjhiNjY./1d1e6157/'
param['reason'] = 'No route to call target'
param['handlers'] = 'javascript:15,pbxassist:15,queues:20,yrtp:50,gvoice:50,monitoring:100,conf:150,cdrbuild:150'
Sniffed 'call.cdr' time=1405946018.068720 (broadcast)
thread=0x974a460 'Engine Worker'
data=(nil)
retval='(null)'
param['time'] = '1405946017.892'
param['chan'] = 'sip/2'
param['cdrid'] = '2'
param['runid'] = '1405945803'
param['operation'] = 'finalize'
param['direction'] = 'incoming'
param['duration'] = '0.138'
param['billtime'] = '0.000'
param['ringtime'] = '0.000'
param['status'] = 'rejected'
param['external'] = '127'
param['cdrwrite'] = 'true'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['caller'] = '127'
param['called'] = '127'
param['reason'] = 'No route to call target'
Returned false 'call.cdr' delay=0.087007 (broadcast)
thread=0x974a460 'Engine Worker'
data=(nil)
retval='(null)'
param['time'] = '1405946017.892'
param['chan'] = 'sip/2'
param['cdrid'] = '2'
param['runid'] = '1405945803'
param['operation'] = 'finalize'
param['direction'] = 'incoming'
param['duration'] = '0.138'
param['billtime'] = '0.000'
param['ringtime'] = '0.000'
param['status'] = 'rejected'
param['external'] = '127'
param['cdrwrite'] = 'true'
param['address'] = '172.17.2.44:53388'
param['billid'] = '1405945803-2'
param['caller'] = '127'
param['called'] = '127'
param['reason'] = 'No route to call target'
param['handlers'] = 'queuesnotify:10'
Sniffed 'module.update' time=1405946023.003157
thread=0x974a460 'Engine Worker'
data=(nil)
retval='(null)'
param['module'] = 'sip'
param['failed_auths'] = '0'
param['transaction_timeouts'] = '0'
param['bye_timeouts'] = '0'
Returned true 'module.update' delay=0.014192
thread=0x974a460 'Engine Worker'
data=(nil)
retval='(null)'
param['module'] = 'sip'
param['failed_auths'] = '0'
param['transaction_timeouts'] = '0'
param['bye_timeouts'] = '0'
param['handlers'] = 'engine:1,monitoring:100'
param['nodename'] = 'Komunikator'
sniffer off