<div dir="ltr"><div><div>Hello everybody,<br><br></div>My SIP vendor request me to replace FROM before sending the traffic. In order to achieve this I use uac_replace_from.<br><br>UAC module is setup in restore_mode = auto.<br><br></div><div>In my insfrastructure I have an Asterisk and then a Kamailio that connects to vendor via internet.<br><br></div><div>Softphone -> Asterisk -> Kamailio -> Internet -> SIP vendor<br></div><div><br></div><div>If caller ID is setup in Asterisk using CALLERID(num)=34888888888 and then INVITE is forwarded to Kamailio, the call is established and finished correctly but the URI in TO field in BYE request from Kamailio to Asterisk contains garbage. In the scenario the callee hangs up the call.<br><br>Example of TO Field with garbage: 34888888888 <sip:50026896@no{soy,ns^^><br><br></div><div>What I do see is that the number "50026896" that is part of the URI is the same I use in:<br>uac_replace_from("50026896", "<a href="mailto:sip%3A50026896@sip.vendor.es">sip:50026896@sip.vendor.es</a>");<br></div><div><br></div><div>Something else that I have found is that vsf field is the same in the INVITE and in the BYE.<br></div><div><br>----------------------------------------------------------------------------------------------------------------<br>2015/06/23 17:48:38.552442 <a href="http://192.168.0.2:5060">192.168.0.2:5060</a> -> <a href="http://192.168.0.1:5060">192.168.0.1:5060</a><br>BYE <a href="http://sip:34888888888@192.168.0.1:5060">sip:34888888888@192.168.0.1:5060</a> SIP/2.0<br>Via: SIP/2.0/UDP 192.168.0.2;branch=z9hG4bKfb49.73c6517609cdb6f7ec00b1f40a05dbe9.0<br>Via: SIP/2.0/UDP 8.8.8.8.8;rport=5060;branch=z9hG4bKfcdf.3767c59c2d0e3d8ab695669845ce4cea.0<br>branch=z9hG4bK04boo6104o5hcso0c2a1sd0000g00.1<br>Call-ID: <a href="http://4bf8effb45b0ae8e049366297924cbba@192.168.0.1:5060">4bf8effb45b0ae8e049366297924cbba@192.168.0.1:5060</a><br>From: <<a href="mailto:sip%3A28999999999@192.168.0.2">sip:28999999999@192.168.0.2</a>;tag=k0eci3x3-CC-30<br>To: 34888888888 <sip:50026896@no{soy,ns^^>;tag=as041b7d84<br>CSeq: 1 BYE<br>Reason: Q.850;cause=16;text="normal call clearing"<br>Max-Forwards: 67<br>Content-Length: 0<br><br>------------------------------------------------------------------------------------------------------------------<br>DEBUG: uac [replace.c:525]: restore_uri(): getting 'vsf' Route param<br>DEBUG: uac [replace.c:533]: restore_uri(): route param is 'AAAAAAEECQkCAgsNAXBeL0NGQUsfVl02Ni44Mw--' (len=40)<br>DEBUG: uac [replace.c:607]: restore_uri(): decoded uris are: new=[sip:50026896@no{soy,ns#005#007] old=[<a href="mailto:sip%3A34888888888@8.8.8.8">sip:34888888888@8.8.8.8</a>]<br>DEBUG: uac [replace.c:525]: restore_uri(): getting 'vst' Route param<br>DEBUG: uac [replace.c:533]: restore_uri(): route param is 'AAAAAAQPAw8MDgsAAHZBKRVdAhoVHQ4XH1BdYWJhbnRlLmVz' (len=48)<br>DEBUG: uac [replace.c:607]: restore_uri(): decoded uris are: new=[<a href="mailto:sip%3A28999999999@192.168.0.1">sip:28999999999@192.168.0.1</a>] old=[<a href="mailto:sip%3A999999999@sip.vendor.es">sip:999999999@sip.vendor.es</a>]<br>-----------------------------------------------------------------------------------------------------------------------------------<br></div></div>