Re: [SR-Users] how to remove non-digits using dp_translate
Hmm, I see there is none inside dialplan for the moment. The option would be to do it in config file with a function from textops. Also, check if regex module is a good alternative for you: - http://kamailio.org/docs/modules/stable/modules/regex.html Cheers, Daniel On 16/07/14 16:50, Henry Fernandes wrote: Can anyone show me how to use the regexp global flag using dp_translate? -H From: Henry Fernandes he...@usinternet.com mailto:he...@usinternet.com Reply-To: Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org Date: Friday, 11 July, 2014 4:18 PM To: mico...@gmail.com mailto:mico...@gmail.com, Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org Subject: Re: [SR-Users] how to remove non-digits using dp_translate I don't know how to apply the global flag in Kamailio. Can you give me an example? -H From: Daniel-Constantin Mierla mico...@gmail.com mailto:mico...@gmail.com Reply-To: mico...@gmail.com mailto:mico...@gmail.com, Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org Date: Thursday, 3 July, 2014 1:47 AM To: Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org Subject: Re: [SR-Users] how to remove non-digits using dp_translate Hello, you have to replace [^0-9] with empty, using the global flag. Cheers, Daniel On 02/07/14 23:11, Henry Fernandes wrote: I'd like to use the dialplan module to remove all non-digits from a string. For example, 1-306-555-1234 becomes 13065551234 and (306) 555-1234 becomes 3065551234. Unfortunately, I can't figure out the regular expressions for subst_exp and repl_exp. I can easily replace one instance of a non-digit, however I can't figure out how to replace all non-digits. -H ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla -http://www.asipto.comhttp://twitter.com/#!/miconda -http://www.linkedin.com/in/miconda ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] how to remove non-digits using dp_translate
Can anyone show me how to use the regexp global flag using dp_translate? -H From: Henry Fernandes he...@usinternet.com Reply-To: Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Date: Friday, 11 July, 2014 4:18 PM To: mico...@gmail.com, Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Subject: Re: [SR-Users] how to remove non-digits using dp_translate I don't know how to apply the global flag in Kamailio. Can you give me an example? -H From: Daniel-Constantin Mierla mico...@gmail.com Reply-To: mico...@gmail.com, Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Date: Thursday, 3 July, 2014 1:47 AM To: Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Subject: Re: [SR-Users] how to remove non-digits using dp_translate Hello, you have to replace [^0-9] with empty, using the global flag. Cheers, Daniel On 02/07/14 23:11, Henry Fernandes wrote: I'd like to use the dialplan module to remove all non-digits from a string. For example, 1-306-555-1234 becomes 13065551234 and (306) 555-1234 becomes 3065551234. Unfortunately, I can't figure out the regular expressions for subst_exp and repl_exp. I can easily replace one instance of a non-digit, however I can't figure out how to replace all non-digits. -H ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listi nfo/sr-users -- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/lis tinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] how to remove non-digits using dp_translate
I don't know how to apply the global flag in Kamailio. Can you give me an example? -H From: Daniel-Constantin Mierla mico...@gmail.com Reply-To: mico...@gmail.com, Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Date: Thursday, 3 July, 2014 1:47 AM To: Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Subject: Re: [SR-Users] how to remove non-digits using dp_translate Hello, you have to replace [^0-9] with empty, using the global flag. Cheers, Daniel On 02/07/14 23:11, Henry Fernandes wrote: I'd like to use the dialplan module to remove all non-digits from a string. For example, 1-306-555-1234 becomes 13065551234 and (306) 555-1234 becomes 3065551234. Unfortunately, I can't figure out the regular expressions for subst_exp and repl_exp. I can easily replace one instance of a non-digit, however I can't figure out how to replace all non-digits. -H ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listi nfo/sr-users -- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] how to remove non-digits using dp_translate
Hello, you have to replace [^0-9] with empty, using the global flag. Cheers, Daniel On 02/07/14 23:11, Henry Fernandes wrote: I'd like to use the dialplan module to remove all non-digits from a string. For example, 1-306-555-1234 becomes 13065551234 and (306) 555-1234 becomes 3065551234. Unfortunately, I can't figure out the regular expressions for subst_exp and repl_exp. I can easily replace one instance of a non-digit, however I can't figure out how to replace all non-digits. -H ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] how to remove non-digits using dp_translate
I'd like to use the dialplan module to remove all non-digits from a string. For example, 1-306-555-1234 becomes 13065551234 and (306) 555-1234 becomes 3065551234. Unfortunately, I can't figure out the regular expressions for subst_exp and repl_exp. I can easily replace one instance of a non-digit, however I can't figure out how to replace all non-digits. -H ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users