Read the docs on the dialplan module: http://www.opensips.org/html/docs/modules/1.5.x/dialplan.html#id271074
On Tue, Jul 21, 2009 at 10:44 AM, Julien Chavanton <[email protected]>wrote: > Do you have a suggestion on how to do this more dynamicaly ? > > > ------------------------------ > *From:* Brett Nemeroff [mailto:[email protected]] > *Sent:* Tue 21/07/2009 3:12 PM > *To:* Julien Chavanton > *Cc:* Bogdan-Andrei Iancu; [email protected] > > *Subject:* Re: [OpenSIPS-Users] dynamic routing -prefixing on inbound > > Once again.. another good use for the dialplan module. :) > You really don't want to do this with a static subst I don't think.. > -Brett > > > On Tue, Jul 21, 2009 at 8:30 AM, Julien Chavanton > <[email protected]>wrote: > >> Thank you, we will move to 1.6.0 later. >> >> 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. >> >> do_routing("0"); >> # happend prefix to keep track of originating trunk/gateway >> (1.1.1.1==1111#) >> if ( search("From:.*<sip:[email protected]>") ) { >> xlog("L_NOTICE", "*****************call >> from[1.1.1.1]*****************\n"); >> subst_uri('/^sip:([0-9]+)@(.*)$/sip:1111...@\2;/i'); >> }; >> >> ------------------------------ >> *From:* Bogdan-Andrei Iancu [mailto:[email protected]] >> *Sent:* Tue 21/07/2009 11:06 AM >> *To:* Julien Chavanton >> *Cc:* [email protected] >> *Subject:* Re: [OpenSIPS-Users] dynamic routing -prefixing on inbound >> >> Hi Julien, >> >> Yes it is, but only in 1.6.0 (current devel version) . See the >> is_from_gw() function: >> >> http://www.opensips.org/html/docs/modules/1.6.x/drouting.html#id272676 >> >> The 1.5 version has no support for prefixing, but only for stripping: >> >> http://www.opensips.org/html/docs/modules/1.5.x/drouting.html#id272676 >> >> Regards, >> Bogdan >> >> Julien Chavanton wrote: >> > >> > I found this in the README of the source code : >> > >> > * bidirectional behavior - inbound and outbound processing >> > (strip and prefixing when sending and receiving from a >> > destination/GW) >> > >> > I would like to happend a prefix when a call comes in from a certain >> > gateway, I found that "PRI PREFIX" is currently applied on when call >> > it outbound to the gateway but not when a call comes from a gateway. >> > >> > Is it already doable ? >> > >> > ------------------------------------------------------------------------ >> > >> > _______________________________________________ >> > Users mailing list >> > [email protected] >> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > >> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
