[asterisk-users] question on SIP trunk and AMI to place call

Jerry Geis geisj at pagestation.com
Thu Jan 24 10:46:40 CST 2013


When I am monitoring the AMI I see the following event
for a call I just made over a SIP trunk.

Event: Newchannel
Privilege: call,all
Channel: SIP/testmachine-0000000d
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum:
CallerIDName:
AccountCode:
Exten:
Context: testmachine
Uniqueid: 1359035395.20

In this event or any event following I do not see
the phone number that I dialled. How do I "correlate"
the "SIP/testmachine-0000000d" to the number I just dialed????
(purpose is to hangup the call later if I need to interrupt it)

Now if I am using a machine with actual hardware cards, the phone
number is included as part of the Channel so I can look that up.
but for a SIP trunk the phone number dialled does not come over the AMI.

How do I match up the call I just started (using AMI over SIP trunk) to 
the number I called?

Thanks,

jerry





More information about the asterisk-users mailing list