Hi Daniel,<br><br>You are right of course ;-)<br><br>Alex<br><br><br><div class="gmail_quote">2010/2/8 Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



  

<div bgcolor="#ffffff" text="#000000">
Hello,<div class="im"><br>
<br>
On 2/7/10 1:03 PM, alex pappas wrote:
<blockquote type="cite">Hi Adnan,<br>
  <br>
If I understand the case corectly , then:<br>
  <br>
Since you want to change the domain why don&#39;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" target="_blank">http://kamailio.org/docs/modules/1.5.x/pdt.html#id2467578</a><br>
  <br>
if(prefix2domain(&quot;2&quot;, &quot;0&quot;)) {             #### If this prefix is found
then the $rd keeps the<br>
      $ru = &quot;sip:&quot; + $rU + &quot;@&quot; + $rd; ####  the  value of the domain to
be replaced<br>
</blockquote></div>
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<div><div></div><div class="h5"><br>
<br>
<blockquote 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">&lt;<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>&gt;</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><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>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 -------&gt; kamailio sip server -----------&gt; application
server<br>
      <br>
İnvite To:&lt;<a href="mailto:sip%3A7777@abc.com" target="_blank">sip:7777@abc.com</a>&gt; ----------&gt;
Kamailio--------&gt;<br>
To:&lt;<a href="mailto:sip%3A7777@abc.com" target="_blank">sip:7777@abc.com</a>&gt; (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>
 &gt; Date: Sun, 7 Feb 2010 01:47:33 -0500<br>
 &gt; From: <a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a><br>
 &gt; To: <a href="mailto:adnan.celikel@hotmail.com" target="_blank">adnan.celikel@hotmail.com</a><br>
 &gt; CC: <a href="mailto:users@lists.kamailio.org" target="_blank">users@lists.kamailio.org</a><br>
 &gt; Subject: Re: [Kamailio-Users] change domain at to header<br>
 &gt;<br>
 &gt; You want to rewrite the request URI, not the To header. The To
header<br>
 &gt; does not have any relevance to how the proxy routes the request<br>
 &gt; whatsoever.<br>
 &gt;<br>
 &gt; $rd = &quot;192.168.1.60&quot;;<br>
 &gt;<br>
 &gt; On 02/07/2010 01:43 AM, Adnan Çelikel wrote:<br>
 &gt;<br>
 &gt; &gt; Dear All,<br>
 &gt; &gt;<br>
 &gt; &gt; I want to change a field (Sip to address host part) at sip
message<br>
 &gt; &gt; header. I think avpops will solve this.<br>
 &gt; &gt; If anybody has a sample confg and send to me I will be very
glad.<br>
 &gt; &gt; Regards,<br>
 &gt; &gt; Adnan.<br>
 &gt; &gt;<br>
 &gt; &gt; #----------------------------------------------------<br>
 &gt; &gt;<br>
 &gt; &gt; #7777 CALL ROUTING<br>
 &gt; &gt;<br>
 &gt; &gt; #-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*<br>
 &gt; &gt;<br>
 &gt; &gt; if(is_method(&quot;INVITE&quot;) &amp;&amp; (uri=~<a>&quot;sip:7777&quot;</a>)){<br>
 &gt; &gt;<br>
 &gt; &gt; rewritehostport(&quot;<a href="http://192.168.1.10:5060" target="_blank">192.168.1.10:5060</a>
&lt;<a href="http://10.18.19.20:5060/" target="_blank">http://10.18.19.20:5060/</a>&gt;&quot;);<br>
 &gt; &gt;<br>
 &gt; &gt; route(1);<br>
 &gt; &gt;<br>
 &gt; &gt; exit;<br>
 &gt; &gt;<br>
 &gt; &gt; }<br>
 &gt; &gt;<br>
 &gt; &gt; #----------------------------------------------------<br>
 &gt; &gt;<br>
 &gt; &gt;<br>
 &gt; &gt; at this rule, the invite is going to 192.168.1.10 with the
host part as<br>
 &gt; &gt; <a href="http://abc.com" target="_blank">abc.com</a>, we want to send with another domain.<br>
 &gt; &gt;<br>
 &gt; &gt;<br>
 &gt; &gt; Instead of <a href="http://abc.com" target="_blank">abc.com</a> domain, I want to use 192.168.1.10 domain ;<br>
 &gt; &gt;<br>
 &gt; &gt;<br>
 &gt; &gt; To:&lt;<a href="mailto:sip%3A7777@abc.com" target="_blank">sip:7777@abc.com</a>&gt;<br>
 &gt; &gt;<br>
 &gt; &gt;<br>
 &gt; &gt; To:&lt;<a href="mailto:sip%3A7777@192.168.1.10" target="_blank">sip:7777@192.168.1.10</a>&gt;<br>
 &gt; &gt;<br>
 &gt; &gt;<br>
 &gt; &gt;<br>
 &gt; &gt;<br>
------------------------------------------------------------------------<br>
 &gt; &gt; Windows Live Hotmail: Arkadaşlarınız Facebook&#39;taki
güncellemelerinizi<br>
 &gt; &gt; doğrudan Hotmail®&#39;den görür.<br>
 &gt; &gt;<br>
&lt;<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>&gt;<br>

 &gt; &gt;<br>
 &gt; &gt;<br>
 &gt; &gt;<br>
 &gt; &gt; _______________________________________________<br>
 &gt; &gt; Kamailio (OpenSER) - Users mailing list<br>
 &gt; &gt; <a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
 &gt; &gt; <a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
 &gt; &gt; <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>
 &gt;<br>
 &gt;<br>
 &gt; --<br>
 &gt; Alex Balashov - Principal<br>
 &gt; Evariste Systems LLC<br>
 &gt;<br>
 &gt; Tel : +1 678-954-0670<br>
 &gt; Direct : +1 678-954-0671<br>
 &gt; 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. &lt;<a href="http://windows.microsoft.com/shop" target="_blank">http://windows.microsoft.com/shop</a>&gt;<br>
    </blockquote>
    <div>
    <div><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>
  <pre><fieldset></fieldset>
_______________________________________________
Kamailio (OpenSER) - Users mailing list
<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a>
<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></pre>
</blockquote>
<br>
</div></div><pre cols="72">-- 
Daniel-Constantin Mierla
eLearning class for Kamailio 3.0.0
Starting Feb 8, 2010
* <a href="http://www.asipto.com/" target="_blank">http://www.asipto.com/</a>
</pre>
</div>

</blockquote></div><br>