[Asterisk-Users] manager api problem

Maciek Kaminski maciejka at tiger.com.pl
Fri Apr 9 10:53:55 MST 2004


I've got following problem with manager api:
In my Asterisk installation when I connect two channels (IAX,SIP) I get
following sequence of events(these are events for *single* connection,
come one by one without any delay):

Event: Link
Channel1: IAX[kamyk at 192.168.0.3:5036]/3
Channel2: SIP/kamyk-9950

Event: Unlink
Channel1: IAX[kamyk at 192.168.0.3:5036]/3
Channel2: SIP/kamyk-9950

Event: Link
Channel1: IAX[kamyk at 192.168.0.3:5036]/3
Channel2: SIP/kamyk-9950

and only then parties may speak to each other. When connection is hungup
then another Unlink happens again.

How manager client should interpret these events? First Link?
Connection seems to has been setup. Following Unlink? Does it mean
connection hungup or is it only indication of internal asterisk logic
than one should not take care of? Next Link? Does it mean than another
connection has been setup again or one should discard this? Maybe other
channel events, and timing information should be taken into
consideration to tell the difference between inconnection Link/Unlink
events and those that mean call setup and hungup? It is possible, but
makes manager client much more complicated then necessary.

How do You detect call setup/tear down with manager interface? Isn't it
sane to expect that for single connection there should be just two events:
connected and disconnected (or pair of Link/Unlink)?

If I am totally wrong, and miss something fundamental, please point
me to relevant source code.

Maciej Kaminski



More information about the asterisk-users mailing list