[SR-Users] pcre mystery or bug in dialplan module?

Juha Heinanen jh at tutpro.com
Mon Feb 21 07:59:56 CET 2011


i have in dialplan table record

287 14 10 1 ^(.+)\+358 0 ^(.+):\+358(.+) \1:0\2

and when it is applied to uri

Feb 21 08:05:15 sip /usr/sbin/sip-proxy[24071]: INFO: uri <sip:+35892345670 at test.fi;user=phone>

the resulting uri looks like this:

Feb 21 08:05:15 sip /usr/sbin/sip-proxy[24071]: INFO: uri <sip\1:092345670 at test.fi;user=phone>

i can't figure out, where \1 comes to the result, because \1 is has
already produced 'sip' to it.

i have added debug to dialplan module and looks like it compiles correct
subst and repl expressions:

Feb 21 08:05:05 sip /usr/sbin/sip-proxy[24067]: INFO: dialplan [dp_db.c:392]: parsing repl_exp <\1:0\2>
Feb 21 08:05:05 sip /usr/sbin/sip-proxy[24067]: INFO: dialplan [dp_db.c:404]: compilig subst_exp <^(.+):\+358(.+)>

is there some stupid mistake in the expressions or could it be a bug
somewhere?

-- juha



More information about the sr-users mailing list