[Asterisk-Users] How To get response of command from another socket

Bill Seddon bill.seddon at lyquidity.com
Sat Sep 18 06:26:03 MST 2004


You are correct that you will not be able to see a command response
directly.  However Asterisk will generate events that will be received by
any manager api connection and it is these events that you will want to
monitor from one or both connection windows.  

 

For example, when you originate a call, Asterisk will generate a "newexten"
event that will contain the name of the originating device and some other
stuff.  If as a result of the origination, macros need to be evaluated, each
macro evaluation will generate an event.  Eventually there will be an event
representing the dial() command from the dialplan followed by a "ringing"
event.  At the same time, an event showing that the called party device has
been called will be generated.  At some point the call may be answered and
at this time a "link" event is generated showing the two parties connected
in a call.  Finally one or other of the parties will hangup and hangup
events (one for each connected device) are generated.

 

So although you cannot see the response generated by an action in one
connection from another, you can pretty much infer the response from the
events.  In your case, a successful action response in one window will
generate a set of events that can be seen in another window.

 

Bill Seddon

 

  _____  

From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of vrushank
Sent: September 20, 2004 12:02 AM
To: asterisk-users at lists.digium.com
Subject: [Asterisk-Users] How To get response of command from another socket

 

hi 

 

i logged on to manager API  from other terminal 

by 

 

telnet IPADDR 5038

 

now logged in with username mark 

let's say this connection Window   A

now i opened another connection with Manager API with same usename

lets say this  window B

now if i give a command like originate,Redirect

through  window A connection ,

can i able to see its 

response:success/failure

Originate:failed/succesfully queued..

in another window  B

 

i think its not possible to see a response of command from another socket of
the same user 

is it?

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040918/cce05a65/attachment.htm


More information about the asterisk-users mailing list