Nicolas Bougues
2004-Mar-19 06:48 UTC
[Asterisk-Users] Identifying a call with manager interface
Dear all, I'm trying to play with the manager interface. What I'd like to do is being able to originate a call and trace its status through events. I use the "Originate" manager command. I then receive several events telling me about the progress of the call, and then the "Response" message. However, I didn't find a way to be sure that the first "Event" I receive after the "Originate" really relates the call I'm making, and not some other random call, since I believe that I may get events for any channel, not just mine. Note that the Channel I'm using is IAX based, and looks like this : IAX2[217.146.224.41:4569]/3 in the events messages. So I have no way to know it's really mine. Event the final Response message doesn't state the "UniqueId" of the call. Maybe I missed something obvious. Any idea ? -- Nicolas Bougues Axialys Interactive
michiel betel
2004-Mar-19 07:58 UTC
[Asterisk-Users] Identifying a call with manager interface
Nicolas Bougues wrote:>Dear all, > >I'm trying to play with the manager interface. > >What I'd like to do is being able to originate a call and trace its >status through events. > >I use the "Originate" manager command. I then receive several events >telling me about the progress of the call, and then the "Response" >message. > >However, I didn't find a way to be sure that the first "Event" I >receive after the "Originate" really relates the call I'm making, and >not some other random call, since I believe that I may get events for >any channel, not just mine. > >Note that the Channel I'm using is IAX based, and looks like this : >IAX2[217.146.224.41:4569]/3 in the events messages. So I have no way >to know it's really mine. > >Event the final Response message doesn't state the "UniqueId" of the >call. > >Maybe I missed something obvious. > >Any idea ? > > >You should be able to specify an ActionID with the originate request. Asterisk will the put this ActionID in all replys to your request. Haven't (yet) tried this myself, but check manager.c for the exact implementation. Michiel
You can also use a unique CallerID, that's how I got call tracking to work with my Asterisk Central Queue System(backend part of the astguiclient). Take a look at the code if you like: http://astguiclient.sf.net/ MATT--- -----Original Message----- From: michiel betel [mailto:michiel@betel.nl] Sent: Friday, March 19, 2004 9:58 AM To: asterisk-users@lists.digium.com Subject: Re: [Asterisk-Users] Identifying a call with manager interface Nicolas Bougues wrote:>Dear all, > >I'm trying to play with the manager interface. > >What I'd like to do is being able to originate a call and trace its >status through events. > >I use the "Originate" manager command. I then receive several events >telling me about the progress of the call, and then the "Response" >message. > >However, I didn't find a way to be sure that the first "Event" I >receive after the "Originate" really relates the call I'm making, and >not some other random call, since I believe that I may get events for >any channel, not just mine. > >Note that the Channel I'm using is IAX based, and looks like this : >IAX2[217.146.224.41:4569]/3 in the events messages. So I have no way >to know it's really mine. > >Event the final Response message doesn't state the "UniqueId" of the >call. > >Maybe I missed something obvious. > >Any idea ? > > >You should be able to specify an ActionID with the originate request. Asterisk will the put this ActionID in all replys to your request. Haven't (yet) tried this myself, but check manager.c for the exact implementation. Michiel _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
You can actually cram a lot of characters into the callerID field within Asterisk, and it doesn't just have to be numbers. It's the only reliable way I could track my Originates, what I do is send a unique callerID and then look for it in the next manager response message where it tells you the uniqueid of the call, then from there forward I follow the uniqueid of the call(because some manager messages relating to a call won't give you the callerID, only the uniqueid). MATT--- -----Original Message----- From: Nicolas Bougues [mailto:nbougues-listes@axialys.net] Sent: Friday, March 19, 2004 10:19 AM To: 'asterisk-users@lists.digium.com' Subject: Re: [Asterisk-Users] Identifying a call with manager interface On Fri, Mar 19, 2004 at 10:10:57AM -0500, mattf wrote:> You can also use a unique CallerID, that's how I got call tracking to work > with my Asterisk Central Queue System(backend part of the astguiclient). > Take a look at the code if you like: >That's what I thought about. However in this case caller id is supposed to be "right", at least for its numerical part. I'll try to use the name part of the caller id for that purpose. -- Nicolas Bougues Axialys Interactive _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Serge Mankovski
2004-Mar-19 08:40 UTC
[Asterisk-Users] Identifying a call with manager interface
Is it possible to have ActionID on manager interface messages if call is originated from a .call file?>From: Nicolas Bougues <nbougues-listes@axialys.net> >Reply-To: asterisk-users@lists.digium.com >To: asterisk-users@lists.digium.com >Subject: Re: [Asterisk-Users] Identifying a call with manager interface >Date: Fri, 19 Mar 2004 16:17:45 +0100 > >On Fri, Mar 19, 2004 at 03:58:12PM +0100, michiel betel wrote: > > > > You should be able to specify an ActionID with the originate request. > > Asterisk will the put this ActionID in all replys to your request. > > Haven't (yet) tried this myself, but check manager.c for the exact > > implementation. > > > >ActionID is specified in the Response message. It would be useful with >interleaved Requests/Responses, which is not the case here. > >However, the ActionID is not specified in the "Event" messages I get >meanwhile, so I can't track call progress nor channel allocation. > >-- >Nicolas Bougues >Axialys Interactive >_______________________________________________ >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users_________________________________________________________________ MSN Premium helps eliminate e-mail viruses. Get 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Maciek Kaminski
2004-Mar-19 10:50 UTC
[Asterisk-Users] Identifying a call with manager interface
Nicolas Bougues wrote:>Dear all, > >I'm trying to play with the manager interface. > >What I'd like to do is being able to originate a call and trace its >status through events. > >I use the "Originate" manager command. I then receive several events >telling me about the progress of the call, and then the "Response" >message. > >However, I didn't find a way to be sure that the first "Event" I >receive after the "Originate" really relates the call I'm making, and >not some other random call, since I believe that I may get events for >any channel, not just mine. > >Note that the Channel I'm using is IAX based, and looks like this : >IAX2[217.146.224.41:4569]/3 in the events messages. So I have no way >to know it's really mine. > >Event the final Response message doesn't state the "UniqueId" of the >call. > >Maybe I missed something obvious. > >Any idea ? > >Currrent manager originate behavior looks a little hacky. First it is blocking and may last for tenths of second what with fact that manager interface isn't concurrent(see http://www.voip-info.org/wiki-Asterisk+manager+experience) narrows range of originate applications. Secondly one can't get channel name that originate created. To straighten things out originate should be made asynchronous and make identyfing channel name via events possible. P.S.: There is a patch in mantis (http://bugs.digium.com/bug_view_page.php?bug_id=0000772) that makes originate asynchronous but it has not been approved yet. Maciek Kaminski