Hi Adnan,<br><br>If I understand the case corectly , then:<br><br>Since you want to change the domain why don't you try the PDT module which exactly does that job?<br><a href="http://kamailio.org/docs/modules/1.5.x/pdt.html#id2467578">http://kamailio.org/docs/modules/1.5.x/pdt.html#id2467578</a><br>
<br>if(prefix2domain("2", "0")) { #### If this prefix is found then the $rd keeps the<br> $ru = "sip:" + $rU + "@" + $rd; #### the value of the domain to be replaced<br>
t_relay();<br> exit;<br>}<br><br>Cheers<br>Alex P<br><br><br><div class="gmail_quote">2010/2/7 Alex Balashov <span dir="ltr"><<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The application server should not be routing based on To header.<div><div></div><div class="h5">
<br>
<br>
On 02/07/2010 04:52 AM, Adnan Çelikel wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Dear Alex,<br>
Thanks for your reply.<br>
May be misinformed.<br>
Normally when a call comes with 7777 pefix, I forward this call to an<br>
application server.<br>
but when I am forwarding this call domain <a href="http://abc.com" target="_blank">abc.com</a> (default domain) is<br>
written at to header.<br>
The application can not handle my invite because of this domain. I<br>
suggested to add this domain at application but they could not do it.<br>
<br>
(default domain: <a href="http://abc.com" target="_blank">abc.com</a>)<br>
Gateway -------> kamailio sip server -----------> application server<br>
<br>
İnvite To:<<a href="mailto:sip%3A7777@abc.com" target="_blank">sip:7777@abc.com</a>> ----------> Kamailio--------><br>
To:<<a href="mailto:sip%3A7777@abc.com" target="_blank">sip:7777@abc.com</a>> (App server IP : 192.168.1.10)<br>
<br>
Application server expects domain 192.168.1.10 instead of <a href="http://abc.com" target="_blank">abc.com</a><br>
<br>
Regards,<br>
<br>
<br>
> Date: Sun, 7 Feb 2010 01:47:33 -0500<br>
> From: <a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a><br>
> To: <a href="mailto:adnan.celikel@hotmail.com" target="_blank">adnan.celikel@hotmail.com</a><br>
> CC: <a href="mailto:users@lists.kamailio.org" target="_blank">users@lists.kamailio.org</a><br>
> Subject: Re: [Kamailio-Users] change domain at to header<br>
><br>
> You want to rewrite the request URI, not the To header. The To header<br>
> does not have any relevance to how the proxy routes the request<br>
> whatsoever.<br>
><br>
> $rd = "192.168.1.60";<br>
><br>
> On 02/07/2010 01:43 AM, Adnan Çelikel wrote:<br>
><br>
> > Dear All,<br>
> ><br>
> > I want to change a field (Sip to address host part) at sip message<br>
> > header. I think avpops will solve this.<br>
> > If anybody has a sample confg and send to me I will be very glad.<br>
> > Regards,<br>
> > Adnan.<br>
> ><br>
> > #----------------------------------------------------<br>
> ><br>
> > #7777 CALL ROUTING<br>
> ><br>
> > #-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*<br>
> ><br>
> > if(is_method("INVITE") && (uri=~"sip:7777")){<br>
> ><br>
> > rewritehostport("<a href="http://192.168.1.10:5060" target="_blank">192.168.1.10:5060</a> <<a href="http://10.18.19.20:5060/" target="_blank">http://10.18.19.20:5060/</a>>");<br>
> ><br>
> > route(1);<br>
> ><br>
> > exit;<br>
> ><br>
> > }<br>
> ><br>
> > #----------------------------------------------------<br>
> ><br>
> ><br>
> > at this rule, the invite is going to 192.168.1.10 with the host part as<br>
> > <a href="http://abc.com" target="_blank">abc.com</a>, we want to send with another domain.<br>
> ><br>
> ><br>
> > Instead of <a href="http://abc.com" target="_blank">abc.com</a> domain, I want to use 192.168.1.10 domain ;<br>
> ><br>
> ><br>
> > To:<<a href="mailto:sip%3A7777@abc.com" target="_blank">sip:7777@abc.com</a>><br>
> ><br>
> ><br>
> > To:<<a href="mailto:sip%3A7777@192.168.1.10" target="_blank">sip:7777@192.168.1.10</a>><br>
> ><br>
> ><br>
> ><br>
> ><br>
------------------------------------------------------------------------<br>
> > Windows Live Hotmail: Arkadaşlarınız Facebook'taki güncellemelerinizi<br>
> > doğrudan Hotmail®'den görür.<br>
> ><br>
<<a href="http://www.microsoft.com/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:tr-tr:SI_SB_4:092009" target="_blank">http://www.microsoft.com/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:tr-tr:SI_SB_4:092009</a>><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Kamailio (OpenSER) - Users mailing list<br>
> > <a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
> > <a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
> > <a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
><br>
> --<br>
> Alex Balashov - Principal<br>
> Evariste Systems LLC<br>
><br>
> Tel : +1 678-954-0670<br>
> Direct : +1 678-954-0671<br>
> Web : <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a><br>
<br>
------------------------------------------------------------------------<br>
Windows 7: Gündelik işlerinizi basitleştirin. Size en uygun bilgisayarı<br></div></div>
bulun. <<a href="http://windows.microsoft.com/shop" target="_blank">http://windows.microsoft.com/shop</a>><br>
</blockquote><div><div></div><div class="h5">
<br>
<br>
-- <br>
Alex Balashov - Principal<br>
Evariste Systems LLC<br>
<br>
Tel : +1 678-954-0670<br>
Direct : +1 678-954-0671<br>
Web : <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a><br>
<br>
_______________________________________________<br>
Kamailio (OpenSER) - Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a></div></div></blockquote></div><br>