[Asterisk-Dev] Reaching variables from the other side of the call

Olle E. Johansson oej at edvina.net
Fri Jun 11 06:13:01 MST 2004


http://bugs.digium.com/bug_view_page.php?bug_id=0000928

This patch adds a way to transfer a variable in the dial plan from the calling
leg of the call to the other end, to the channel created by dial(something).
There are several ways of doing this:

*	Adding a _ in front of the variable makes the variable moved to the
	other side without an underscore.

*	Adding two underscores makes the variable stay with two underscores
	on the other side, making it possible to have it follow over if we
	reach another dial somewhere along the way.

Test this patch that I find very useful and add your comments to the
bug tracker.

In the next version of chan_sip2, you'll be able to find out one use of this,
where I add support for adding any SIP headers in the dial plan.

exten => 1234,1,setvar(_SIPADDHEADER=X-holiday: Going fishing, don't call me any more)

will result in a X-holiday: header being added to your SIP invite when you dial.

/O



More information about the asterisk-dev mailing list