Re: [SR-Users] uri unescape transformation?
well shame on me and thanks for catching it :-) -jiri On 3/26/11 7:38 PM, Daniel-Constantin Mierla wrote: On 3/26/11 7:30 PM, Jiri Kuthan wrote: On 3/26/11 2:06 AM, Juha Heinanen wrote: i could not find a transformation or function to unescape an uri, such as this: sip%3Atest%40test.fi did i miss it or is there a need to write one? we have never introduced escaping indeed. Starting with 3.x, by loading pv module you get access to some particular functions called 'transformations' which can be used to escape/unescape string values stored in config file variables. See more at: http://sip-router.org/wiki/cookbooks/transformations/devel Cheers, Daniel ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] uri unescape transformation?
On 3/26/11 7:30 PM, Jiri Kuthan wrote: On 3/26/11 2:06 AM, Juha Heinanen wrote: i could not find a transformation or function to unescape an uri, such as this: sip%3Atest%40test.fi did i miss it or is there a need to write one? we have never introduced escaping indeed. Starting with 3.x, by loading pv module you get access to some particular functions called 'transformations' which can be used to escape/unescape string values stored in config file variables. See more at: http://sip-router.org/wiki/cookbooks/transformations/devel Cheers, Daniel -- Daniel-Constantin Mierla http://www.asipto.com ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] uri unescape transformation?
On 3/26/11 2:06 AM, Juha Heinanen wrote: i could not find a transformation or function to unescape an uri, such as this: sip%3Atest%40test.fi did i miss it or is there a need to write one? we have never introduced escaping indeed. -jiri -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] uri unescape transformation?
Hello, On 3/26/11 7:45 AM, Juha Heinanen wrote: Daniel-Constantin Mierla writes: there is a transformation to get %hexa back to ascii char, have you tried this one? http://www.kamailio.org/dokuwiki/doku.php/transformations:3.1.x#sunescapeuser i didn't, because @ is not allowed in userpart. just for sake of clarification, the transformation can work on any kind of string, not only on valid 'username' values. It was named this way because at that time was targeting username parts of URI, otherwise just ignore the 'user' terminology in the name of transformation. Maybe would be good to rename (or add an alias) to s.unescape.hexa Cheers, Daniel anyway, as i mentioned, the problem is elsewhere. xcap doc should not contains uris in escaped form or alternatively they should be unescaped automatically when they are fetched from xcap server by presence server. -- juha -- Daniel-Constantin Mierla http://www.asipto.com ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] uri unescape transformation?
2011/3/26 Juha Heinanen : http%3A//xcap.test.fi%3A8080/xcap-root/resource-lists/users/sip%3Ajh%40test.fi/generallist.xml/%7E%7E/resource-lists/list%5B%40name%3D%22oma_buddylist%22%5D Hi Juha, from my understanding the above syntax is indeed incorrect, as the URI should not be escaped in that way. -- Iñaki Baz Castillo ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] uri unescape transformation?
Daniel-Constantin Mierla writes: > there is a transformation to get %hexa back to ascii char, have you > tried this one? > http://www.kamailio.org/dokuwiki/doku.php/transformations:3.1.x#sunescapeuser i didn't, because @ is not allowed in userpart. anyway, as i mentioned, the problem is elsewhere. xcap doc should not contains uris in escaped form or alternatively they should be unescaped automatically when they are fetched from xcap server by presence server. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] uri unescape transformation?
Hello, there is a transformation to get %hexa back to ascii char, have you tried this one? http://www.kamailio.org/dokuwiki/doku.php/transformations:3.1.x#sunescapeuser Cheers, Daniel On 3/26/11 6:42 AM, Juha Heinanen wrote: Iñaki Baz Castillo writes: Hi Juha, I don't understand why should it be needed. Why do you get a URI like that? In fact, ":" and "@" don't require to be hex-escaped. inaki, sorry about the noise. i figured it myself too that : and @ in sip uri cannot be escaped. my problem is that for some reason i got such escaped uris in xcap rls document that i created using xcap-rls-services cli tool: http%3A//xcap.test.fi%3A8080/xcap-root/resource-lists/users/sip%3Ajh%40test.fi/generallist.xml/%7E%7E/resource-lists/list%5B%40name%3D%22oma_buddylist%22%5D presence presence and then subscriptions to the list, of course, failed, because of the escapes. perhaps there is a bug in the tool. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla http://www.asipto.com ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] uri unescape transformation?
Iñaki Baz Castillo writes: > Hi Juha, I don't understand why should it be needed. Why do you get a > URI like that? In fact, ":" and "@" don't require to be hex-escaped. inaki, sorry about the noise. i figured it myself too that : and @ in sip uri cannot be escaped. my problem is that for some reason i got such escaped uris in xcap rls document that i created using xcap-rls-services cli tool: http%3A//xcap.test.fi%3A8080/xcap-root/resource-lists/users/sip%3Ajh%40test.fi/generallist.xml/%7E%7E/resource-lists/list%5B%40name%3D%22oma_buddylist%22%5D presence presence and then subscriptions to the list, of course, failed, because of the escapes. perhaps there is a bug in the tool. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] uri unescape transformation?
2011/3/26 Juha Heinanen : > i could not find a transformation or function to unescape an uri, such > as this: > > sip%3Atest%40test.fi > > did i miss it or is there a need to write one? Hi Juha, I don't understand why should it be needed. Why do you get a URI like that? In fact, ":" and "@" don't require to be hex-escaped. The only parts of a SIP URI which can be escaped are the following: - userinfo ( %63lice == alice ) - param name - param value Maybe you are using some SIP spec that fully escapes a SIP URI into some param value and so? Cheers. -- Iñaki Baz Castillo ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] uri unescape transformation?
i could not find a transformation or function to unescape an uri, such as this: sip%3Atest%40test.fi did i miss it or is there a need to write one? -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] uri unescape transformation?
i could not find a transformation or function to unescape an uri, such as this: sip%3Atest%40test.fi did i miss it or is there a need to write one? -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users