<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
<div class="moz-cite-prefix">On 26/06/15 13:05, Nelson Migliaro
wrote:<br>
</div>
<blockquote
cite="mid:CALcOv0QL3U3GHzWv5oTpxEnm=JMRqo3JK6VVBo15e4qyJGMzMw@mail.gmail.com"
type="cite">
<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
<a class="moz-txt-link-rfc2396E" href="sip:50026896@no{soy,ns^^"><sip:50026896@no{soy,ns^^></a><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 moz-do-not-send="true"
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 moz-do-not-send="true"
href="http://192.168.0.2:5060">192.168.0.2:5060</a> -> <a
moz-do-not-send="true" href="http://192.168.0.1:5060">192.168.0.1:5060</a><br>
BYE <a moz-do-not-send="true"
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 moz-do-not-send="true"
href="http://4bf8effb45b0ae8e049366297924cbba@192.168.0.1:5060">4bf8effb45b0ae8e049366297924cbba@192.168.0.1:5060</a><br>
From: <<a moz-do-not-send="true"
href="mailto:sip%3A28999999999@192.168.0.2">sip:28999999999@192.168.0.2</a>;tag=k0eci3x3-CC-30<br>
To: 34888888888
<a class="moz-txt-link-rfc2396E" href="sip:50026896@no{soy,ns^^"><sip:50026896@no{soy,ns^^></a>;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=[<a class="moz-txt-link-freetext" href="sip:50026896@no">sip:50026896@no</a>{soy,ns#005#007] old=[<a
moz-do-not-send="true"
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 moz-do-not-send="true"
href="mailto:sip%3A28999999999@192.168.0.1">sip:28999999999@192.168.0.1</a>]
old=[<a moz-do-not-send="true"
href="mailto:sip%3A999999999@sip.vendor.es">sip:999999999@sip.vendor.es</a>]<br>
-----------------------------------------------------------------------------------------------------------------------------------<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
Can you check if the From/To display name and URI are changed by end
devices comparing with what Kamailio is sending? If yes, then you
should use uac module with the option of storing the original URIs
via dialog module.<br>
<br>
Cheers,<br>
Daniel<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
</body>
</html>