[asterisk-dev] AMI syntax

jg webaccounts at jgoettgens.de
Sat Sep 28 15:57:09 CDT 2013


Mark!

> When it comes to parsing incoming AMI actions, Asterisk will accept:
>
> <key> ':' <space>+ <value> <CRLF>
>
> 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?).
>
It looks more like

<key> ':' <space>+ <value>? <CRLF>

because I have found events that have empty values. For example the Jabber event might have an 
empty value for the "Packet" header.

jg



More information about the asterisk-dev mailing list