<div dir="ltr">Hello,<div><br></div><div>I have added a transformation to the xhttp module that breaks a URL into a path and a querystring</div><div>- {url.path}</div><div>- {url.querystring}</div><div><br></div><div>I have also added an optional delimiter parameter to the {param.} transformations.</div>
<div><br></div><div>Regards,</div><div><br></div><div>Peter</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 22 September 2013 14:55, Ovidiu Sas <span dir="ltr"><<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You can use {s.select,index,separator} to extract the path and the<br>
parameters into two different variables.<br>
Or here you could create a new url transformation to break it in two:<br>
 - {url.path}<br>
 - {url.searchpath}<br>
<br>
After that, the existing code for param transformation may be reused<br>
(by making the separator configurable (using '&' instead of ';') and<br>
we could have a new transformation:<br>
 - {urlsearchpath.value,name}<br>
Or maybe we can enhance the existing param transformation to pass as<br>
an optional argument - the param delimiter:<br>
 - {param.value,name,[param_delimiter]}.<br>
 - {param.valueat,index,[param_delimiter]}<br>
 - {<a href="http://param.name" target="_blank">param.name</a>,index,[param_delimiter]}<br>
 - {param.count,[param_delimiter]}<br>
<br>
<br>
Regards,<br>
Ovidiu Sas<br>
<br>
On Sun, Sep 22, 2013 at 4:50 AM, Peter Dunkley<br>
<div><div class="h5"><<a href="mailto:peter.dunkley@crocodilertc.net">peter.dunkley@crocodilertc.net</a>> wrote:<br>
> Hello,<br>
><br>
> Does anyone have any ideas about this?<br>
><br>
> If not it's something I want to try and do before the freeze (any<br>
> suggestions as to how would be appreciated) as it will be a nice finishing<br>
> touch to the WebSocket/outbound/stun/auth_ephemeral stuff I've worked on<br>
> over the last couple of releases.<br>
><br>
> Thanks,<br>
><br>
> Peter<br>
><br>
><br>
> On 19 September 2013 21:36, Peter Dunkley <<a href="mailto:peter.dunkley@crocodilertc.net">peter.dunkley@crocodilertc.net</a>><br>
> wrote:<br>
>><br>
>> Hello,<br>
>><br>
>> I was wondering if there was an easy way to decode HTTP URLs in<br>
>> event_route[xhttp:request]?<br>
>><br>
>> For example, it would be good to be able to breakdown a URL like:<br>
>>   /sip?apiKey=abcdefg&username=<a href="mailto:1234567890%3Aalice@example.com">1234567890:alice@example.com</a><br>
>> into "path/on/server" ("/sip" in this case) and a set of parameters.  For<br>
>> the parameters something like the {param.value,name} transformation for SIP<br>
>> header parameters would be ideal (which works perfectly for picking values<br>
>> out of HTTP Cookie: headers).<br>
>><br>
>> I noticed that there is already an {s.urldecode.param} transformation in<br>
>> the PV module but I couldn't find any documentation for it in the wiki and<br>
>> looking at the code it doesn't appear to do this anyway.<br>
>><br>
>> Regards,<br>
>><br>
>> Peter<br>
>><br>
>><br>
>> --<br>
>> Peter Dunkley<br>
>> Technical Director<br>
>> Crocodile RCS Ltd<br>
><br>
><br>
><br>
><br>
> --<br>
> Peter Dunkley<br>
> Technical Director<br>
> Crocodile RCS Ltd<br>
><br>
</div></div>> _______________________________________________<br>
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
> <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
VoIP Embedded, Inc.<br>
<a href="http://www.voipembedded.com" target="_blank">http://www.voipembedded.com</a><br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><font face="courier new, monospace">Peter Dunkley</font></div><div><font face="courier new, monospace">Technical Director</font></div>
<div><font face="courier new, monospace">Crocodile RCS Ltd</font></div></div>
</div>