Jerry Geis
2013-Jan-24 16:46 UTC
[asterisk-users] question on SIP trunk and AMI to place call
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
Tiago Geada
2013-Jan-24 17:23 UTC
[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 <geisj at 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<http://lists.digium.com/mailman/listinfo/asterisk-users> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130124/c05aab6b/attachment.htm>
Danny Nicholas
2013-Jan-24 17:26 UTC
[asterisk-users] question on SIP trunk and AMI to place call
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-bounces at lists.digium.com [mailto:asterisk-users-bounces at 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 <geisj at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130124/4b95aa9d/attachment-0001.htm>
Jerry Geis
2013-Jan-24 18:06 UTC
[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 setyes I have looked at all of them, CallerID is not set to the number I am calling. Jerry -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130124/0e2e3c29/attachment.htm>
Jerry Geis
2013-Jan-24 18:08 UTC
[asterisk-users] question on SIP trunk and AMI to place call
> 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.there is no core show channels verbose on Asterisk 11. There is on asterisk 1.4, core show channels on asterisk 11 has been changed. jerry -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130124/c259ccab/attachment.htm>
Matthew Jordan
2013-Jan-24 18:46 UTC
[asterisk-users] question on SIP trunk and AMI to place call
On 01/24/2013 10:46 AM, Jerry Geis 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? >You probably want the Dial event. It is raised both at the beginning of the Dial, as well as when the Dial completes. https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerEvent_Dial Note that the Channel: field will contain the name initiating the Dial, the Destination: field will contain the channel name being dialled, and the Dialstring: field will contain the non-technology specific portion of the thing being dialled. For example: exten => 500,1,Dial(SIP/digium02) Results in: Event: Dial Privilege: call,all SubEvent: Begin Channel: SIP/10.x.x.x-00000002 Destination: SIP/digium02-00000003 CallerIDNum: 657-5309 CallerIDName: digium01 ConnectedLineNum: <unknown> ConnectedLineName: <unknown> UniqueID: Asterisk-01-1359052866.2 DestUniqueID: Asterisk-01-1359052866.3 Dialstring: digium02 -- Matthew Jordan Digium, Inc. | Engineering Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com & http://asterisk.org
Jerry Geis
2013-Jan-24 19:13 UTC
[asterisk-users] question on SIP trunk and AMI to place call
> > > You probably want the Dial event. It is raised both at the beginning of > the Dial, as well as when the Dial completes. > > https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerEvent_Dial > > Note that the Channel: field will contain the name initiating the Dial, > the Destination: field will contain the channel name being dialled, and > the Dialstring: field will contain the non-technology specific portion > of the thing being dialled.I get that even on the system with the PRI card and using DAHDI however I am not getting that event on the system with the SIP trunk . Is there something to enable to get that??? Both systems are running Asterisk 11.0.2. Thanks, Jerry -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130124/a3f2f7c8/attachment.htm>
Danny Nicholas
2013-Jan-24 19:21 UTC
[asterisk-users] question on SIP trunk and AMI to place call
This might have changed but IIRC /etc/asterisk/manager.conf controls what events you have access to. From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jerry Geis Sent: Thursday, January 24, 2013 1:14 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] question on SIP trunk and AMI to place call You probably want the Dial event. It is raised both at the beginning of the Dial, as well as when the Dial completes. https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerEvent_Dial Note that the Channel: field will contain the name initiating the Dial, the Destination: field will contain the channel name being dialled, and the Dialstring: field will contain the non-technology specific portion of the thing being dialled. I get that even on the system with the PRI card and using DAHDI however I am not getting that event on the system with the SIP trunk . Is there something to enable to get that??? Both systems are running Asterisk 11.0.2. Thanks, Jerry -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130124/7f69d5c2/attachment.htm>