[asterisk-dev] AJAM XML inconsistency ?

Emil Stoyanov stoyanov at gmail.com
Mon Nov 22 08:04:14 CST 2010


Hi all,

I hope this is the correct place for this email. I would like to bring to your attention a sort of inconsistency in the results that AJAM manager interface is producing, visible in Asterisk 1.8. We stumbled upon this after a migration from Asterisk 1.4 to 1.8. I would like to ask if anybody knows if this is an intended behavior or is it a real bug that should be filed properly in mantis, although I doubt the former. With current output we cannot link logically the two legs, respectively we miss the opportunity to show remote CallerID after a status query.

When making an outgoing and invoke the status command before answering a call:

http://pbxhost.localdomain/pbx/mxml?action=status

The returned XML (look below) is missing a property that links (logically associates) the two legs of the call if channels are in state "Ring" or "Ringing". When a call is answered and channels go into state "Up" then the link property is inserted. 

In addition, when in state "Ringing", the channel has the account property value set to '', which again entirely disconnects logically the status info entries. In state "Up" the account property is set correctly.

Note: In 1.4 the name of the property was "link", in 1.8 it is "bridgedchannel" and we had account and link properties set for each state properly.

Here is the XML output for states "Ring" and respectively "Ringing" for call from 104 to 999:

<ajax-response>
<response type='object' id='unknown'><generic response='Success' message='Channel status will follow' /></response>
<response type='object' id='unknown'><generic event='Status' privilege='Call' channel='SIP/cmp1_104-00000200' calleridnum='104' calleridname='TEST' accountcode='104' channelstate='4' channelstatedesc='Ring' context='macro-CARRIER-SIPcmp1' extension='s' priority='19' seconds='12' uniqueid='1290170156.527' /></response>
<response type='object' id='unknown'><generic event='Status' privilege='Call' channel='SIP/VOIPcmp1-4-00000201' calleridnum='999' calleridname='&lt;unknown&gt;' account='' state='Ringing' uniqueid='1290170156.528' /></response>
<response type='object' id='unknown'><generic event='StatusComplete' items='2' /></response>
</ajax-response>

Here is the XML output after a call is answered and both channels have state "Up":

<ajax-response>
<response type='object' id='unknown'><generic response='Success' message='Channel status will follow' /></response>
<response type='object' id='unknown'><generic event='Status' privilege='Call' channel='SIP/cmp1_104-00000205' calleridnum='104' calleridname='TEST' accountcode='104' channelstate='6' channelstatedesc='Up' context='macro-CARRIER-SIPcmp1' extension='s' priority='19' seconds='37' bridgedchannel='SIP/VOIPcmp1-4-00000206' bridgeduniqueid='1290170302.533' uniqueid='1290170302.532' /></response>
<response type='object' id='unknown'><generic event='Status' privilege='Call' channel='SIP/VOIPcmp1-4-00000206' calleridnum='999' calleridname='&lt;unknown&gt;' account='104' state='Up' bridgedchannel='SIP/cmp1_104-00000205' bridgeduniqueid='1290170302.532' uniqueid='1290170302.533' /></response>
<response type='object' id='unknown'><generic event='StatusComplete' items='2' /></response>
</ajax-response>

Thank you for the comments.

Best regards,
Emil Stoyanov



More information about the asterisk-dev mailing list