[Freeswitch-users] Lcr in easy_route, CID manipulation
Miha
miha at softnet.si
Fri Jan 25 10:27:27 MSK 2013
Hi Sean,
thank you for your replay.
I need to manipulate with two different cid on one GW but I should made
it so scapable that if I would add another GW and I will be getting on
this GW different CID than on first one, that I could use different regex:)
I as have written my dialplan with xml_curl I would do it there, with
php this should be easy:)
Thanks for you info!
Miha
Dne 1/24/2013 4:36 PM, pis(e Sean Devoy:
>
> HI Miha,
>
> If I understand correctly you get the CID from 2 different gateways in
> different formats and would like to handle them in a combined dialplan
> with uniform formats.
>
> I think when you said "other time I get 003851810000 and I must
> convert it to +3861810000?" You made a typo and it should have been :
> "other time I get 003861810000 and I must convert it to +3861810000?"
> If not the regex will need to be adjusted below.
>
> I would suggest you set the "context" from the gateways to different
> intermediate dial plans. For example context="from_gateway1" and
> context="from_gateway2".
>
> Then create the dial plans for each of those contexts like this:
>
> <context name="from_gateway1">
>
> <extension name="reformat_cid" >
>
> <condition field="destination_number" expression="^0(\d\d\d\d\d\d\d)$">
>
> <action application="transfer"
> data="982$1 XML from-external"/>
>
> </condition>
>
> </extension>
>
> . . .
>
> </context>
>
> For gateway2:
>
> <context name="from_gateway2">
>
> <extension name="reformat_cid" >
>
> <condition field="destination_number" expression="^00 (38\d\d
> \d\d\d\d\d\d)$">
>
> <action application="transfer" data="+$1 XML from-external"/>
>
> </condition>
>
> </extension>
>
> . . .
>
> </context>
>
> Then in your main trunk dialplan (here called "from-external") all the
> numbers will be in the format +38n and 7 more digits.
>
> Of course you can set more exacting regex expressions. And you should
> probably have a catch-all in the bottom of the "from_gatewayN"
> contexts to handle any CIDs that did not match our expressions.
>
> Hope that helps.
>
> Sean
>
> I Hope that helped.
>
> -----Original Message-----
> From: freeswitch-users-bounces at lists.freeswitch.org
> [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Miha
> Sent: Thursday, January 24, 2013 9:09 AM
> To: FreeSWITCH Users Help
> Subject: [Freeswitch-users] Lcr in easy_route, CID manipulation
>
> Hi,
>
> I need to manipulate with CID for specific GW. IS it possible to set
> this in sip_profiles (it would be prefect:) )?
>
> In lcr I did use colume CID which worked ok, but is it possible to
> manipulate with to different kind of CID or use to regex? For example
> once cid is 01810000 in i must revert it to +3821810000, other time I
> get 003851810000 and I must convert it to +3861810000?
>
> What would be the best way for easy_route?
>
> Otherwise I will use culr, depend in source ip I will manipulte with
> cid number.
>
> Thanks!
>
> Miha
>
> _________________________________________________________________________
>
> Professional FreeSWITCH Consulting Services:
>
> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
>
> http://www.freeswitch.org
>
> http://wiki.freeswitch.org
>
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
>
> FreeSWITCH-users at lists.freeswitch.org
> <mailto:FreeSWITCH-users at lists.freeswitch.org>
>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>
> http://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130125/5b6e7fb4/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list