Not the greatest solution, but since you are most likely using a script for the AMI process, you could do an
Asterisk –rx “core show channels verbose”|grep SIP/testmachine-0000000d And get the dialed number from that. Actually you could issue the AMI command core show channels verbose. From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tiago Geada Sent: Thursday, January 24, 2013 11:24 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] question on SIP trunk and AMI to place call Have you tried and looked up all events generated when you place the call? some of them are bound to have the variable callerid set On 24 January 2013 16:46, Jerry Geis <ge...@pagestation.com> wrote: 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 -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users