That will certainly work and is very simple. If you really want to do it using
the dialplan module, then you are looking to do “String Translation” as
described in detail in Section 1.4.1.1 of the module documentation [1]. In your
case, something like:
* match_op = 1
* match_exp = “^0[0-9]{8}$"
* match_flags = 0
* subst_exp = “^(0[0-9]{8})$”
* repl_exp = "972\1"
[1] - https://opensips.org/html/docs/modules/3.0.x/dialplan.html#idp4838848
Ben Newlin
From: Users <[email protected]> on behalf of Callum Guy
<[email protected]>
Reply-To: OpenSIPS users mailling list <[email protected]>
Date: Wednesday, December 4, 2019 at 3:24 AM
To: VOIP Security <[email protected]>, OpenSIPS users mailling list
<[email protected]>
Subject: Re: [OpenSIPS-Users] openSIPS- Dialplan Manipulation Help
Why not just glue together the strings?
$var(a) = "972" + $rU;
Seems pretty effective to me :)
On Tue, 3 Dec 2019 at 22:02, VOIP Security via Users
<[email protected]<mailto:[email protected]>> wrote:
Hi,
I am struggling with openSIPS regex rules to append some prefix before regex. I
have this regex rule setup for Israel numbers -
Matching Regular Expression - ^0[0-9]{8}$
So this rule is catching all the 9 digits DID from my Israeli carrier but now I
want to add 972 in front of any DID, for example DID - 021458547
After dp_translate I want to manipulate that DID and add 972 so new DID gonna
be - 972021458547
Please help me setting up this dial plan rule. I will appreciate that.
Thanks and regards
_______________________________________________
Users mailing list
[email protected]<mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
[Image removed by sender.]
0333 332 0000 | www.x-on.co.uk<http://www.x-on.co.uk> | [Image removed by
sender.] <https://www.linkedin.com/company/x-on> [Image removed by sender.]
<https://www.facebook.com/XonTel> [Image removed by sender.]
<https://twitter.com/xonuk>
X-on is a trading name of Storacall Technology Ltd a limited company registered
in England and Wales.
Registered Office : Avaland House, 110 London Road, Apsley, Hemel Hempstead,
Herts, HP3 9SD. Company Registration No. 2578478.
The information in this e-mail is confidential and for use by the addressee(s)
only. If you are not the intended recipient, please notify X-on immediately on
+44(0)333 332 0000 and delete the
message from your computer. If you are not a named addressee you must not use,
disclose, disseminate, distribute, copy, print or reply to this email. Views or
opinions expressed by an individual
within this email may not necessarily reflect the views of X-on or its
associated companies. Although X-on routinely screens for viruses, addressees
should scan this email and any attachments
for viruses. X-on makes no representation or warranty as to the absence of
viruses in this email or any attachments.
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users