Hi,
I’m currently developing a python app, using py-Asterisk to talk to the Asterisk AMI. I’ve hit a problem after I call SipShowPeer, which sends the SIPshowpeer Action. The command succeeds, and the client library returns the response as expected.
When running a subsequent command, the client fails to parse the response. This is because the AMI completes the response to SIPshowpeer with two empty lines - the end of the response looks like: ‘Parkinglot: \r\n\r\n\r\n’.
I’m trying to work out where the problem lies - whether this is expected behaviour of the AMI and the bug is in the client, or whether the AMI should only be returning a single empty line.
I’m running version 1.6.2.16.1, but the code concerned appears to be the same in trunk (line 17098 of chan_sip.c).
If indeed this is expected behaviour, would somebody be able to direct me to the documentation, and I will work on a patch for py-asterisk.
Thanks for your help.