[Kamailio-Users] [sr-dev] new feature: fine access to xml documents

Klaus Darilion klaus.mailinglists at pernau.at
Thu Jun 25 16:13:42 CEST 2009



Iñaki Baz Castillo schrieb:
> El Jueves, 25 de Junio de 2009, Daniel-Constantin Mierla escribió:
>> Probably not very clear in my first email, but you can change the xml
>> content:
>>
>> $xml(a=>xpath:/presence/mynode) = "123";
> 
> When reading, which is the result if the node doesn't exist? empty string?
> If a=>xpath:/presence/mynode gets 123 (an integer) can it be used in math 
> operation as integer? or is it a string?
> 
>   
>> Note that if you assigned the sip message body to $xml(name=>doc), body
>> does not get changed, the operations are done on a replica.
> 
> So modifications in the body must be done in the proxy before forwarding the 
> request to the presence server, or doing a spiral if the presence server is 
> integrated in the proxy, right?

Hi Daniel!

In sip-router there is functionality to apply lumps before sending (it 
is used for SIP-Identity). Maybe this could be exported to script and 
can be executed manually to triggering reconstruction of the message, 
e.g. for processing the modified message in the presence module.

regards
klaus




More information about the sr-users mailing list