[sr-dev] [kamailio] dialplan: don't check subexpressions on expressions with pvs (#17)

Victor Seva notifications at github.com
Mon Jan 5 12:39:34 CET 2015


subexpressions should not be checked when the expression has private variables

output of the error
```
 0(10175) DEBUG: dialplan [dp_db.c:496]: build_rule(): building rule for [2:^(00|\+)([1-9][0-9]+)$/^(00|\+)([1-9][0-9]+)$/\2]
 0(10175) DEBUG: dialplan [dp_db.c:533]: build_rule(): attrs are: ''
 0(10175) DEBUG: dialplan [dp_db.c:580]: add_rule2hash(): new dpl_id 1
 0(10175) DEBUG: dialplan [dp_db.c:593]: add_rule2hash(): new index , len 0
 0(10175) DEBUG: dialplan [dp_db.c:629]: add_rule2hash(): added the rule id 1 index 0 pr 1 next (nil) to the index with 0 len
 0(10175) DEBUG: dialplan [dp_repl.c:146]: repl_exp_parse(): replacement expression is [\1]
 0(10175) DEBUG: dialplan [dp_db.c:102]: dpl_check_pv(): parsing [^$avp(s:caller_cc)$avp(s:caller_ac)([1-9][0-9]+)$]
 0(10175) DEBUG: <core> [pvapi.c:419]: pv_spec_lookup(): PV <$avp(s:caller_cc)> is not in cache
 0(10175) DEBUG: <core> [usr_avp.c:882]: parse_avp_ident(): Parsing 's:caller_cc'
 0(10175) DEBUG: <core> [pvapi.c:293]: pv_cache_add(): pvar [$avp(s:caller_cc)] added in cache
 0(10175) DEBUG: dialplan [dp_db.c:124]: dpl_check_pv(): string [^$avp(s:caller_cc)$avp(s:caller_ac)([1-9][0-9]+)$] has variables
 0(10175) DEBUG: dialplan [dp_db.c:496]: build_rule(): building rule for [2:^$avp(s:caller_cc)$avp(s:caller_ac)([1-9][0-9]+)$/^$avp(s:caller_cc)$avp(s:caller_ac)([1-9][0-9]+)$/\1]
 0(10175) ERROR: dialplan [dp_db.c:502]: build_rule(): repl_exp \1 refers to 1 sub-expressions, but subst_exp ^$avp(s:caller_cc)$avp(s:caller_ac)([1-9][0-9]+)$ has only 0
 0(10175) DEBUG: dialplan [dp_db.c:685]: destroy_rule(): destroying rule with priority 1
```
You can merge this Pull Request by running:

  git pull https://github.com/linuxmaniac/kamailio vseva/dialplan_fix

Or you can view, comment on it, or merge it online at:

  https://github.com/kamailio/kamailio/pull/17

-- Commit Summary --

  * dialplan: don't check subexpressions on expressions with pvs

-- File Changes --

    M modules/dialplan/dp_db.c (6)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/17.patch
https://github.com/kamailio/kamailio/pull/17.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/17
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20150105/8ea3c844/attachment.html>


More information about the sr-dev mailing list