<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 ?</FONT></DIV></DIV>
<DIV dir=ltr><FONT face=Verdana size=2></FONT> </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.. </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">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 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>><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">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>