Once again.. another good use for the dialplan module. :)<div><br></div><div>You really don&#39;t want to do this with a static subst I don&#39;t think.. </div><div>-Brett</div><div><br><br><div class="gmail_quote">On Tue, Jul 21, 2009 at 8:30 AM, Julien Chavanton <span dir="ltr">&lt;<a href="mailto:jc@atlastelecom.com">jc@atlastelecom.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


<div>
<div dir="ltr">
<div dir="ltr"><font face="Verdana" color="#000000" size="2">Thank you, we will move to 1.6.0 later.</font></div>
<div dir="ltr"><font face="Verdana" color="#000000" size="2"></font> </div>
<div dir="ltr"><font face="Verdana" color="#000000" size="2">We have partner not sending tech prefix, we need to add it ourselves, I found this fix, but I wanted to be able to do everything from OpenSip control panel to keep things manageable.</font></div>


<div dir="ltr"><font face="Verdana" size="2"></font> </div>
<div dir="ltr"><font face="Verdana" size="2"> do_routing(&quot;0&quot;);</font></div>
<div dir="ltr"><font face="Verdana" size="2"> # happend prefix to keep track of originating trunk/gateway (1.1.1.1==1111#)<br> if ( search(&quot;From:.*&lt;sip:.*@<a href="http://1.1.1.1" target="_blank">1.1.1.1</a>&gt;&quot;) ) {<br>

   xlog(&quot;L_NOTICE&quot;, &quot;*****************call from[1.1.1.1]*****************\n&quot;);<br>   subst_uri(&#39;/^sip:([0-9]+)@(.*)$/sip:1111#\1@\2;/i&#39;);<br> };</font></div></div>
<div dir="ltr"><br>
<hr>
<font face="Tahoma" size="2"><b>From:</b> Bogdan-Andrei Iancu [mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>]<br><b>Sent:</b> Tue 21/07/2009 11:06 AM<br><b>To:</b> Julien Chavanton<br>

<b>Cc:</b> <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><br><b>Subject:</b> Re: [OpenSIPS-Users] dynamic routing -prefixing on inbound<br></font><br></div><div class="im">
<div>
<p><font size="2">Hi Julien,<br><br>Yes it is, but only in 1.6.0 (current devel version) . See the<br>is_from_gw() function:<br>    <a href="http://www.opensips.org/html/docs/modules/1.6.x/drouting.html#id272676" target="_blank">http://www.opensips.org/html/docs/modules/1.6.x/drouting.html#id272676</a><br>

<br>The 1.5 version has no support for prefixing, but only for stripping:<br>     <a href="http://www.opensips.org/html/docs/modules/1.5.x/drouting.html#id272676" target="_blank">http://www.opensips.org/html/docs/modules/1.5.x/drouting.html#id272676</a><br>

<br>Regards,<br>Bogdan<br><br>Julien Chavanton wrote:<br>&gt;<br>&gt; I found this in the README of the source code :<br>&gt;<br>&gt;  * bidirectional behavior - inbound and outbound processing<br>&gt;        (strip and prefixing when sending and receiving from a<br>

&gt;        destination/GW)<br>&gt;<br>&gt; I would like to happend a prefix when a call comes in from a certain<br>&gt; gateway, I found that &quot;PRI PREFIX&quot; is currently applied on when call<br>&gt; it outbound to the gateway but not when a call comes from a gateway.<br>

&gt;<br>&gt; Is it already doable ?<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; Users mailing list<br>&gt; <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>

&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>&gt;  <br><br></font></p></div></div></div><br>_______________________________________________<br>


Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>