[Asterisk-Dev] Manager XML

Kevin P. Fleming kpfleming at starnetworks.us
Tue Mar 1 13:52:12 MST 2005


Olle E. Johansson wrote:

> * New CLI commands: sip xshow peer, iax2 xshow peer
> * New manager commands: SIPpeers, SIPshowpeer, IAXshowpeer
> * Improved manager command: IAXpeers

Definitely a step in the right direction.

However, you are going to need to add a function to take a string value 
and XML-escape it, so that it doesn't contain characters that must be 
entities in XML. These include:

" - "
' - '
< - &lt;
 > - &gt;

non-printing characters - &#(hex value);

There may be others.

This will have to be done on each string value before it is substituted 
into the "format", because once it's in there you can't tell the valid 
brackets from the invalid ones.



More information about the asterisk-dev mailing list