[SR-Users] Issues on getting Notify Body data and parse it

Daniel-Constantin Mierla miconda at gmail.com
Tue Sep 13 09:06:35 CEST 2016



On 13/09/16 03:44, José Seabra wrote:
>
> Thank you Daniel.
> This works.
Great, welcome!

Cheers,
Daniel

>
> BR
> José
>
> 2016-09-12 11:49 GMT+01:00 Daniel-Constantin Mierla <miconda at gmail.com
> <mailto:miconda at gmail.com>>:
>
>     Hello,
>
>     maybe you can extract the lines from the body with the
>     transformation line start with:
>
>       -
>     https://www.kamailio.org/wiki/cookbooks/4.4.x/transformations#linesw_match
>     <https://www.kamailio.org/wiki/cookbooks/4.4.x/transformations#linesw_match>
>
>     Cheers,
>     Daniel
>
>
>     On 08/09/16 01:44, José Seabra wrote:
>>     Hello there,
>>     I'm facing some issues trying to get the attributes from notify
>>     Body that contains information that i need for my calls
>>     .
>>     First i save the $rb into $var then i try to replace the
>>     characters #012 that seems to be the separator of all attributes
>>     in the body, i have tried it using s.select, s.strip, s.replace
>>     but without any success in all of them.
>>
>>     The body msg is something like this:
>>
>>     Calling-Name-Status: available#012Calling-Name: "teste      XX"
>>     <sip:XXXXXXXXX at domain.com
>>     <mailto:sip%3AXXXXXXXXX at domain.com>>#012Presentation-Indicator:
>>     allowed
>>
>>     Anyone have any idea how can I get the value of each attribute:
>>     e.g:
>>     Calling-Name-Status: available
>>     Calling-Name: "teste      XX" <sip:XXXXXXXXX at domain.com
>>     <mailto:sip%3AXXXXXXXXX at domain.com>>
>>     Presentation-Indicator: allowed
>>
>>     Best Regards
>>
>>     -- 
>>     José
>>
>>
>>     _______________________________________________
>>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>     sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>     <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>
>
>     -- 
>     Daniel-Constantin Mierla
>     http://www.asipto.com - http://www.kamailio.org
>     http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> - http://www.linkedin.com/in/miconda
>     <http://www.linkedin.com/in/miconda>
>
>     _______________________________________________ SIP Express Router
>     (SER) and Kamailio (OpenSER) - sr-users mailing list
>     sr-users at lists.sip-router.org
>     <mailto:sr-users at lists.sip-router.org>
>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>     <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users> 
>
> -- 
> Cumprimentos
> José Seabra
-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160913/44bc4941/attachment.html>


More information about the sr-users mailing list