Read the docs on the dialplan module: <div><a href="http://www.opensips.org/html/docs/modules/1.5.x/dialplan.html#id271074">http://www.opensips.org/html/docs/modules/1.5.x/dialplan.html#id271074</a></div><div><br><br><div class="gmail_quote">
On Tue, Jul 21, 2009 at 10:44 AM, Julien Chavanton <span dir="ltr"><<a href="mailto:jc@atlastelecom.com">jc@atlastelecom.com</a>></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">Do you have a suggestion on how to do this more dynamicaly ?</font></div></div>
<div dir="ltr"><font face="Verdana" size="2"></font> </div>
<div dir="ltr"><br>
<hr>
<font face="Tahoma" size="2"><b>From:</b> Brett Nemeroff [mailto:<a href="mailto:brett@nemeroff.com" target="_blank">brett@nemeroff.com</a>]<br><b>Sent:</b> Tue 21/07/2009 3:12 PM<br><b>To:</b> Julien Chavanton<br><b>Cc:</b> Bogdan-Andrei Iancu; <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><div>
<div></div><div class="h5"><br><b>Subject:</b> Re: [OpenSIPS-Users] dynamic routing -prefixing on inbound<br></div></div></font><br></div><div><div></div><div class="h5">
<div>Once again.. another good use for the dialplan module. :)
<div><br></div>
<div>You really don't want to do this with a static subst I don'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"><<a href="mailto:jc@atlastelecom.com" target="_blank">jc@atlastelecom.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="padding-left:1ex;margin:0px 0px 0px 0.8ex;border-left:#ccc 1px solid">
<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("0");</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("From:.*<sip:.*@<a href="http://1.1.1.1/" target="_blank">1.1.1.1</a>>") ) {<br>
xlog("L_NOTICE", "*****************call from[1.1.1.1]*****************\n");<br> subst_uri('/^sip:([0-9]+)@(.*)$/sip:1111#\1@\2;/i');<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>
<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>><br>> I found this in the README of the source code :<br>><br>> * bidirectional behavior - inbound and outbound processing<br>> (strip and prefixing when sending and receiving from a<br>
> destination/GW)<br>><br>> I would like to happend a prefix when a call comes in from a certain<br>> gateway, I found that "PRI PREFIX" is currently applied on when call<br>> it outbound to the gateway but not when a call comes from a gateway.<br>
><br>> Is it already doable ?<br>><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> Users mailing list<br>> <a href="mailto:Users@lists.opensips.org" target="_blank">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><br></font></p></div></div></div><br>_______________________________________________<br>
Users mailing list<br><a href="mailto:Users@lists.opensips.org" target="_blank">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></div></div></div></div></blockquote></div><br></div>