[asterisk-users] sip.conf setvar option

Jared Smith jsmith at digium.com
Fri Mar 28 08:02:13 CDT 2008


On Fri, 2008-03-28 at 13:55 +0100, Johansson Olle E wrote:
> Well, Jared, but that's the reverse. You stripped out this important  
> part:
> " am trying to define it for a peer that's used when making calls  
> using the originate ami call, but it seems to not have any effect."
> 
> The important thing with your lesson was that SETVAR is only used on  
> INCOMING calls from
> devices, not outbound calls TO devices. Using ORIGINATE to call a SIP  
> peer, there's no variables
> set from sip.conf.

Absolutely true... and I'll make up for it by pointing out that if
you're using the Originate manager command, you can set channel
variables by adding the "Variable" setting to your manager command:

Action: Originate
Channel: SIP/myphone
Context: test
Exten: 123
Priority: 1
Async: True
ActionID: ThisIsMyVeryOriginalActionID
Variable: MYVAR=blah|ANOTHERVAR=baz

-- 
Jared Smith
Community Relations Manager
Digium, Inc.




More information about the asterisk-users mailing list