<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Sep 28, 2013 at 4:08 PM, Dan Jenkins <span dir="ltr"><<a href="mailto:dan.jenkins@holidayextras.com" target="_blank">dan.jenkins@holidayextras.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">> On Sep 28, 2013, at 21:57, jg <<a href="mailto:webaccounts@jgoettgens.de">webaccounts@jgoettgens.de</a>> wrote:<br>

><br>
> Mark!<br>
><br>
>> When it comes to parsing incoming AMI actions, Asterisk will accept:<br>
>><br>
>> <key> ':' <space>+ <value> <CRLF><br>
>><br>
>> If there is arbitrary space before the key, then Asterisk will not properly match on the key as expected. There must be at least one space between the colon and the value. If there is trailing space after the value, then Asterisk will consider that extra space to be part of the value (though this should maybe be changed?).<br>

> It looks more like<br>
><br>
> <key> ':' <space>+ <value>? <CRLF><br>
><br>
> because I have found events that have empty values. For example the Jabber event might have an empty value for the "Packet" header.<br>
><br>
> jg<br>
><br>
> --<br>
> _____________________________________________________________________<br>
> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
><br>
> asterisk-dev mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
>  <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
<br>
</div></div>Matt Jordan just put up on the asterisk wiki under asterisk 12 the ami<br>
1.4 specification, the format is exactly the same, I would definitely<br>
take a look at it, gives a tonne of great examples<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div style>Thanks! It does need a few tweaks still, which I'm going to try and get done next week.</div><div style><br></div><div style>
As an FYI, we removed the JabberEvent event in Asterisk 12 for two reasons:</div><div style>(1) It was spammy as all get out, and didn't convey a lot of useful information: knowing that you received a particular XMPP message over an AMI connection doesn't let you do anything with it, and if you really want that information outside of Asterisk, you should just relay the XMPP message to an XMPP server and deal with it there.</div>
<div style>(2) It isn't really AMI's job to convey another protocol over itself. Doing so sets a rather bad precedent (and yes, it was set for a long time, but that doesn't mean we shouldn't correct it)</div>
<div style><br></div><div style>So in 12, at least, the JabberEvent is not a culprit in having keys with no values.</div></div><div><br></div><div style>Matt</div><div style><br></div>-- <br><div dir="ltr"><div>Matthew Jordan<br>
</div><div>Digium, Inc. | Engineering Manager</div><div>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA</div><div>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a></div>
</div>
</div></div>