Module: sip-router
Branch: 3.1
Commit: 8371befc51d8a0db7e57e686a77d9e700f609239
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8371bef…
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 | 101 ++++++++++++++++++------------------
modules/dialplan/dp_db.c | 122 +++++++++++++++++++++----------------------
modules/dialplan/dp_repl.c | 108 +++++++++++++++++++++-----------------
3 files changed, 170 insertions(+), 161 deletions(-)
Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=837…