Problem with AMI Originate variables

Hi,

Im trying to create an Outbound call to an application, but with variables attached to the channel.

After connecting to AMI:
telnet localhost 5038

And successfull log in:

ACTION: LOGIN
USERNAME: user
SECRET: pass
EVENTS: OFF

Response: Success
Message: Authentication accepted

im trying to create originate with variables:

ACTION: Originate
Channel: SIP/sipext
Application: ConfBridge
Data: 101
Timeout: 20000
ActionID: 20
CallerID: callerid
Variable: minutes=5

Call is connected to the ConfBridge application, but SIP headers are missing in SIP message sent to client.

i tried:
Variable: minutes=5
Command: Set(minutes=5)

Nothing is working. Why adding vars to Originate Action does not work in this case?

Im using Asterisk 11.13

Thanks and best regards, Konrad

Adding variables doesn’t automatically turn them into SIP headers. For the safest approach you’d have to use a Local channel that goes into the dialplan, adds the SIP headers using the proper mechanism, and dials the SIP device.

1 Like

yay - its working :).

[test]
exten => orig,1,NoOp(“Click Out Context”)
exten => orig,n,SIPAddHeader(X-Test: answer)
exten => orig,n,Dial(Sip/123)

exten => confcallleg,1,Answer()
exten => confcallleg,n,ConfBridge(111)

Now when im sending using AMI:
ACTION: Originate
Channel: Local/orig@test
Exten: confcallleg
Context: test
ActionID: PlayBack
Priority: 1

I have an outbound SIP INVITE with custom headers which adds user to a Conference,

Thanks very much for help!!!

Best regards and have a nice day!

1 Like