Module: sip-router
Branch: master
Commit: ae89dc494ff9ef046adf1fb954d41a162e12cfd9
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ae89dc4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Oct 17 18:27:42 2011 +0200
dialplan: fix usage of avps in replacement expression
- clone the replacement expression to shared memory before parsing it in
order to have variables names available at runtime
- most of variables should be safe to use now in replacement
expressions, including avps with string name. This fixes FS#153
reported by Andrew Pogrebennyk
- variables with dynamic name have no easy way to clone at this moment,
thus avoid using them directly. Use instead avps or script vars
($var(...)), copying the value from initial variable to it. Variables
pointing to sip message attributes are safe to use.
---
modules/dialplan/dialplan.c | 116 ++++++++++++++++++++--------------------
modules/dialplan/dp_db.c | 122 +++++++++++++++++++++----------------------
modules/dialplan/dp_repl.c | 108 +++++++++++++++++++++-----------------
3 files changed, 178 insertions(+), 168 deletions(-)
Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=ae8…