<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6001.18148" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText39424 dir=ltr>
<DIV dir=ltr><FONT face=Verdana color=#000000 size=2>Do you have a suggestion on how to do this more dynamicaly&nbsp;?</FONT></DIV></DIV>
<DIV dir=ltr><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Brett Nemeroff [mailto:brett@nemeroff.com]<BR><B>Sent:</B> Tue 21/07/2009 3:12 PM<BR><B>To:</B> Julien Chavanton<BR><B>Cc:</B> Bogdan-Andrei Iancu; users@lists.opensips.org<BR><B>Subject:</B> Re: [OpenSIPS-Users] dynamic routing -prefixing on inbound<BR></FONT><BR></DIV>
<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..&nbsp;</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="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>&nbsp;</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>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Verdana size=2>&nbsp;do_routing("0");</FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2>&nbsp;# happend prefix&nbsp;to keep track&nbsp;of originating trunk/gateway (1.1.1.1==1111#)<BR>&nbsp;if ( search("From:.*&lt;sip:.*@<A href="http://1.1.1.1/" target=_blank>1.1.1.1</A>&gt;") ) {<BR>&nbsp;&nbsp; xlog("L_NOTICE", "*****************call from[1.1.1.1]*****************\n");<BR>&nbsp;&nbsp; subst_uri('/^sip:([0-9]+)@(.*)$/sip:1111#\1@\2;/i');<BR>&nbsp;};</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>&nbsp;&nbsp;&nbsp; <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>&nbsp;&nbsp;&nbsp;&nbsp; <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;&nbsp; * bidirectional behavior - inbound and outbound processing<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (strip and prefixing when sending and receiving from a<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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 "PRI PREFIX" 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;&nbsp;&nbsp;<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></DIV></BODY></HTML>