[OpenSIPS-Users] dialplan module - ensuring a substring exists in URI
Kingsley Tart
kingsley at dns99.co.uk
Tue Apr 20 17:16:38 EST 2021
Hi,
I want a DP ruleset to ensure that ";user=phone" is in the SIP URI, ie
if it is not there, add it, but if it is already there, do nothing.
I've managed to do this with two lines, but is there a more efficient
way?
This is what I have in the dialplan table in this ruleset?
+----+----------+-------------+-------------+-----------+---------------+
| pr | match_op | match_exp | match_flags | subst_exp | repl_exp |
+----+----------+-------------+-------------+-----------+---------------+
| 1 | 1 | ;user=phone | 1 | (.+) | \1 |
| 2 | 1 | . | 1 | (.+) | \1;user=phone |
+----+----------+-------------+-------------+-----------+---------------+
--
Cheers,
Kingsley.
More information about the Users
mailing list