<HTML dir=ltr><HEAD><TITLE>Re: [OpenSIPS-Users] dynamic routing -prefixing on inbound</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6001.18148" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText39290 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:.*@1.1.1.1>") ) {<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 tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Bogdan-Andrei Iancu [mailto:bogdan@voice-system.ro]<BR><B>Sent:</B> Tue 21/07/2009 11:06 AM<BR><B>To:</B> Julien Chavanton<BR><B>Cc:</B> users@lists.opensips.org<BR><B>Subject:</B> Re: [OpenSIPS-Users] dynamic routing -prefixing on inbound<BR></FONT><BR></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">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">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>> Users@lists.opensips.org<BR>> <A href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</A><BR>> <BR><BR></FONT></P></DIV></BODY></HTML>