<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-9"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
On 2/7/10 1:03 PM, alex pappas wrote:
<blockquote
cite="mid:88b5e74c1002070403y6de94d39m48dcd53517ae46f3@mail.gmail.com"
type="cite">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 moz-do-not-send="true"
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>
</blockquote>
you need the last line only when there are some parameter in pdt domain
value that you want to remove. Otherwise it is pretty useless operation.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote
cite="mid:88b5e74c1002070403y6de94d39m48dcd53517ae46f3@mail.gmail.com"
type="cite"> 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
moz-do-not-send="true" 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 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 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 moz-do-not-send="true"
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 moz-do-not-send="true" href="http://abc.com"
target="_blank">abc.com</a>)<br>
Gateway -------> kamailio sip server -----------> application
server<br>
<br>
İnvite To:<<a moz-do-not-send="true" href="mailto:sip%3A7777@abc.com"
target="_blank">sip:7777@abc.com</a>> ---------->
Kamailio--------><br>
To:<<a moz-do-not-send="true" 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
moz-do-not-send="true" 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 moz-do-not-send="true"
href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a><br>
> To: <a moz-do-not-send="true"
href="mailto:adnan.celikel@hotmail.com" target="_blank">adnan.celikel@hotmail.com</a><br>
> CC: <a moz-do-not-send="true"
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=~<a class="moz-txt-link-rfc2396E" href="sip:7777">"sip:7777"</a>)){<br>
> ><br>
> > rewritehostport("<a moz-do-not-send="true"
href="http://192.168.1.10:5060" target="_blank">192.168.1.10:5060</a>
<<a moz-do-not-send="true" 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 moz-do-not-send="true" href="http://abc.com"
target="_blank">abc.com</a>, we want to send with another domain.<br>
> ><br>
> ><br>
> > Instead of <a moz-do-not-send="true" href="http://abc.com"
target="_blank">abc.com</a> domain, I want to use 192.168.1.10 domain ;<br>
> ><br>
> ><br>
> > To:<<a moz-do-not-send="true"
href="mailto:sip%3A7777@abc.com" target="_blank">sip:7777@abc.com</a>><br>
> ><br>
> ><br>
> > To:<<a moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
> > <a moz-do-not-send="true"
href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
> > <a moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
href="http://windows.microsoft.com/shop" target="_blank">http://windows.microsoft.com/shop</a>><br>
</blockquote>
<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 moz-do-not-send="true" href="http://www.evaristesys.com/"
target="_blank">http://www.evaristesys.com/</a><br>
<br>
_______________________________________________<br>
Kamailio (OpenSER) - Users mailing list<br>
<a moz-do-not-send="true" href="mailto:Users@lists.kamailio.org"
target="_blank">Users@lists.kamailio.org</a><br>
<a moz-do-not-send="true"
href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<a moz-do-not-send="true"
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>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Kamailio (OpenSER) - Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.kamailio.org">Users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a>
<a class="moz-txt-link-freetext" href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
eLearning class for Kamailio 3.0.0
Starting Feb 8, 2010
* <a class="moz-txt-link-freetext" href="http://www.asipto.com/">http://www.asipto.com/</a>
</pre>
</body>
</html>