[SR-Users] Remove all cpecial characters (\n, \t etc)from xml body

Yuriy Gorlichenko ovoshlook at gmail.com
Mon Oct 30 10:36:02 CET 2017


Hi thx.
I tried without double back slashes. Has no effect.
But I already resolved it with different way
Just decoded message to base64 formt  and then sent to needed service where
i encoded it and parsed (thx Alex Balashov for 2014 kamailio world
presentantion)
Was not sure about parsing string by kamailio (this it is not a best idea),
think that logic on kamailio side should be as clear as it posible

2017-10-30 12:29 GMT+03:00 Daniel-Constantin Mierla <miconda at gmail.com>:

> Hello,
>
>
> On 28.10.17 20:28, Yuriy Gorlichenko wrote:
> > Hi. I building external presentity service for web based phones
> >
> >
> > Main trouble that i have at the xml body of PUBLISH message \n \t
> > characters and because of it can't set body as string to the redis
> >
> > So I trying to find a way to remove special characters form the xml
> > body for get oneline string instead of multiline
> >
> > I use native .cfg file for now and, unfortunattely, can not use lua or
> > phyton
> >
> > I tried
> >
> > $var(body)=$(rb{s.rm,$var(RemoveThisStaff)}) where
> > $var(RemoveThisStaff) = "\n" and "\t"
> >
> > but it was unsuccesfull. Maybe someone will help to kno how to do it.
> >
> can you try with:
>
> $var(body)=$(rb{s.rm,\n});
>
> or:
>
> $var(body)=$(rb{s.rm,\\n});
>
> Not sure if needs double back slashes, that's why I said to try the both.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
> Kamailio World Conference - www.kamailioworld.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20171030/df80d8db/attachment-0001.html>


More information about the sr-users mailing list