<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
look at the uac module for uac_replace_from() and uac_replace_to()
functions.<br>
<br>
Btw, rfc3261 mandates a tag parameter for From header, which is
missing on the INVITE you pasted here, so it is rather broken and
many UA may reject it.<br>
<br>
Cheersm<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 9/23/13 7:09 PM, julian arsanches
wrote:<br>
</div>
<blockquote
cite="mid:CAG0Kfxu4KJnvF9mpFxpKTZqi+nS=9h4qpCZH5H=9W_AKmivfTA@mail.gmail.com"
type="cite">
<div dir="ltr">Can someone advise me on how to change the to
header to show the host that we are sending the call to an not
the servers ip.
<div><br>
</div>
<div>I am using dispatcher on my setup .</div>
<div><br>
</div>
<div>i am getting this</div>
<div><br>
</div>
<div>
<div><br>
</div>
<div>U 2013/09/23 12:57:54.576312 <a moz-do-not-send="true"
href="http://10.0.1.206:5060">10.0.1.206:5060</a> -> <a
moz-do-not-send="true" href="http://2.2.2.2:5060">2.2.2.2:5060</a></div>
<div>INVITE <a moz-do-not-send="true"
href="http://sip:+42123333235@2.2.2.2:5060">sip:+42123333235@2.2.2.2:5060</a>
SIP/2.0.</div>
<div>Record-Route: <a class="moz-txt-link-rfc2396E" href="sip:1.1.1.1;lr=on;ftag=as1f3df8b3"><sip:1.1.1.1;lr=on;ftag=as1f3df8b3></a>.</div>
<div>Via: SIP/2.0/UDP
1.1.1.1:5060;branch=z9hG4bKb29d.7399c2b3.0.</div>
<div>Via: SIP/2.0/UDP
1.1.1.5:5060;branch=z9hG4bK42a1ecaf;rport=5060.</div>
<div>Max-Forwards: 16.</div>
<div>From:<<a moz-do-not-send="true"
href="mailto:sip%3Aunavailable@1.1.1.1">sip:unavailable@1.1.1.1</a>>.</div>
<div>To: <<a moz-do-not-send="true"
href="mailto:sip%3A%2B4212333323@1.1.1.1">sip:+4212333323@1.1.1.1</a>>.</div>
<div>Contact: <<a moz-do-not-send="true"
href="http://sip:anonymous@1.1.1.5:5060">sip:anonymous@1.1.1.5:5060</a>>.</div>
<div>Call-ID: <a moz-do-not-send="true"
href="http://0df8db614d45bae27035443c35166ba6@1.1.1.5:5060">0df8db614d45bae27035443c35166ba6@1.1.1.5:5060</a>.</div>
<div>CSeq: 102 INVITE.</div>
<div>User-Agent: Asterisk PBX 1.8.15-cert2.</div>
<div>Date: Mon, 23 Sep 2013 16:58:25 GMT.</div>
<div>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER,
SUBSCRIBE, NOTIFY, INFO, PUBLISH.</div>
<div>Supported: replaces, timer.</div>
<div>Cisco-Guid: 7128745-3588944267-852064@msc1</div>
<div>Content-Type: application/sdp.</div>
<div>Content-Length: 288.</div>
<div>.</div>
<div>v=0.</div>
<div>o=root 1760548326 1760548326 IN IP4 54.236.97.30.</div>
<div>s=Asterisk PBX 1.8.15-cert2.</div>
<div>c=IN IP4 1.1.1.5.</div>
<div>t=0 0.</div>
<div>m=audio 39794 RTP/AVP 0 18 101.</div>
<div>a=rtpmap:0 PCMU/8000.</div>
<div>a=rtpmap:18 G729/8000.</div>
<div>a=fmtp:18 annexb=no.</div>
<div>a=rtpmap:101 telephone-event/8000.</div>
<div>a=fmtp:101 0-16.</div>
<div>a=ptime:20.</div>
<div>a=sendrecv.</div>
</div>
<div>
<br>
</div>
<div>I need to sent header to a carrier like this </div>
<div><br>
</div>
<div>To: <<a moz-do-not-send="true"
href="mailto:sip%3A%2B4212333323@2.2.2.2">sip:+4212333323@2.2.2.2</a>>
instead of 1.1.1.1.<br>
</div>
<div><br>
</div>
<div>
i am proxing calls from asterisk to a main carrier.</div>
<div>Please help.</div>
<div><br>
</div>
<div>here is my config.</div>
<div><br>
</div>
<div>
<div><br>
</div>
<div><br>
</div>
<div>if (starts_with("$var(o)","anonymous")) {</div>
<div><br>
</div>
<div>ds_select_domain("$var(z)", "4");#carrier dynamic</div>
<div><br>
</div>
<div><br>
</div>
<div>xlog("here is anonymous call <$var(o)>77777\n");</div>
<div><br>
</div>
<div><br>
</div>
<div>$var(n)=$(tU{s.substr,3,0});</div>
<div><br>
</div>
<div><br>
</div>
<div>remove_hf("From");</div>
<div>remove_hf("P-Asserted-Identity");</div>
<div>remove_hf("Privacy");</div>
<div><br>
</div>
<div>insert_hf("From:<a class="moz-txt-link-rfc2396E" href="sip:unavailable@1.1.1.1.1"><sip:unavailable@1.1.1.1.1></a>\r\n",
"From");<br>
</div>
<div>$tU=$var(n);<br>
</div>
<div>xlog("out header CHECK ANONYMOUS BEFORE to $tu--$td -
contact pai+++ <<$ct>>++
from_uri=$fu;<$tU---=$var(n)> to_uri=$tu;
}pai<$ai>intid=$fU; type_call=$si; dst_ip=$ru;
carriercode=$var(z);callmode=$var(out)");<br>
</div>
<div><br>
</div>
<div>if(!t_relay()){;</div>
<div>sl_reply_error();<br>
</div>
<div>exit;</div>
<div>};</div>
<div>##ENDANONYMOUS</div>
<div><br>
</div>
<div>exit;</div>
</div>
<div><br>
</div>
<div>}</div>
<div><br>
</div>
<div>Again thanks a lot for any help.</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<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>
Kamailio Advanced Trainings - Berlin, Oct 21-24; Miami, Nov 11-13, 2013
- more details about Kamailio trainings at <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> -
</pre>
</body>
</html>