HI, I need a little help with regex for cid manipulation in lcr. On wiki I can see that I can do it like this: /search/replace/ I am getting sometime number like: 385*60001264567 and sometimes without * (385*60001264567) (from different carrier). How can I get rid of * with regex in LCR table? I can see that row CID is for this manipulation. tnx miha
If you only need to replace the * with nothing, then try: /\*// -Avi On Wed, Jul 31, 2013 at 2:49 PM, Miha <miha@softnet.si> wrote:
HI,
I need a little help with regex for cid manipulation in lcr.
On wiki I can see that I can do it like this: /search/replace/
I am getting sometime number like: 385*60001264567 and sometimes without * (385*60001264567) (from different carrier).
How can I get rid of * with regex in LCR table? I can see that row CID is for this manipulation.
tnx miha
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Avi sorry, I was looking at wrong palce. I need a manipulation with destination number as some cerrier is sending 385*xxxxx, some are sending without * (385xxxx). I did two routes in lcr but from what I can see lcr module does not look at *, for with * and without * same route is used. What whout be the best way to deal with this? BR, Miha Dne 7/31/2013 2:24 PM, pis(e Avi Marcus:
If you only need to replace the * with nothing, then try: /\*// -Avi
On Wed, Jul 31, 2013 at 2:49 PM, Miha <miha@softnet.si <mailto:miha@softnet.si>> wrote:
HI,
I need a little help with regex for cid manipulation in lcr.
On wiki I can see that I can do it like this: /search/replace/
I am getting sometime number like: 385*60001264567 and sometimes without * (385*60001264567) (from different carrier).
How can I get rid of * with regex in LCR table? I can see that row CID is for this manipulation.
tnx miha
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
You can do an extension in your dialplan to match: ^(\d+)\*(\d+)$ And if it matches, transfer to $1$2 to strip the * from the number.. that only works for this exact circumstance, though. -Avi On Wed, Jul 31, 2013 at 3:45 PM, Miha <miha@softnet.si> wrote:
Avi sorry,
I was looking at wrong palce. I need a manipulation with destination number as some cerrier is sending 385*xxxxx, some are sending without * (385xxxx).
I did two routes in lcr but from what I can see lcr module does not look at *, for with * and without * same route is used.
What whout be the best way to deal with this?
BR, Miha
Dne 7/31/2013 2:24 PM, piše Avi Marcus:
If you only need to replace the * with nothing, then try: /\*// -Avi
On Wed, Jul 31, 2013 at 2:49 PM, Miha <miha@softnet.si> wrote:
HI,
I need a little help with regex for cid manipulation in lcr.
On wiki I can see that I can do it like this: /search/replace/
I am getting sometime number like: 385*60001264567 and sometimes without * (385*60001264567) (from different carrier).
How can I get rid of * with regex in LCR table? I can see that row CID is for this manipulation.
tnx miha
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@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@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thx Avi. miha Dne 7/31/2013 3:04 PM, pis(e Avi Marcus:
You can do an extension in your dialplan to match: ^(\d+)\*(\d+)$ And if it matches, transfer to $1$2 to strip the * from the number.. that only works for this exact circumstance, though.
-Avi
On Wed, Jul 31, 2013 at 3:45 PM, Miha <miha@softnet.si <mailto:miha@softnet.si>> wrote:
Avi sorry,
I was looking at wrong palce. I need a manipulation with destination number as some cerrier is sending 385*xxxxx, some are sending without * (385xxxx).
I did two routes in lcr but from what I can see lcr module does not look at *, for with * and without * same route is used.
What whout be the best way to deal with this?
BR, Miha
Dne 7/31/2013 2:24 PM, pis(e Avi Marcus:
If you only need to replace the * with nothing, then try: /\*// -Avi
On Wed, Jul 31, 2013 at 2:49 PM, Miha <miha@softnet.si <mailto:miha@softnet.si>> wrote:
HI,
I need a little help with regex for cid manipulation in lcr.
On wiki I can see that I can do it like this: /search/replace/
I am getting sometime number like: 385*60001264567 and sometimes without * (385*60001264567) (from different carrier).
How can I get rid of * with regex in LCR table? I can see that row CID is for this manipulation.
tnx miha
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@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@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@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@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
https://wiki.freeswitch.org/wiki/Mod_translate will let you define translation rules to handle this sort of thing without even having to hit the XML dialplan. -Ray On 07/31/2013 08:45 AM, Miha wrote:
Avi sorry,
I was looking at wrong palce. I need a manipulation with destination number as some cerrier is sending 385*xxxxx, some are sending without * (385xxxx).
I did two routes in lcr but from what I can see lcr module does not look at *, for with * and without * same route is used.
What whout be the best way to deal with this?
BR, Miha
Dne 7/31/2013 2:24 PM, pis(e Avi Marcus:
If you only need to replace the * with nothing, then try: /\*// -Avi
On Wed, Jul 31, 2013 at 2:49 PM, Miha <miha@softnet.si <mailto:miha@softnet.si>> wrote:
HI,
I need a little help with regex for cid manipulation in lcr.
On wiki I can see that I can do it like this: /search/replace/
I am getting sometime number like: 385*60001264567 and sometimes without * (385*60001264567) (from different carrier).
How can I get rid of * with regex in LCR table? I can see that row CID is for this manipulation.
tnx miha
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Avi Marcus
-
Miha
-
Raymond Chandler