[Kamailio-Users] %23 remove from rU
Daniel-Constantin Mierla
miconda at gmail.com
Fri Jan 15 16:51:05 CET 2010
Hi Alex,
On 1/15/10 3:56 PM, alex pappas wrote:
> Hi Daniel,
>
> I was testing the $rU like:
>
> $(rU{s.unescape.user}); with $rU=1000*%23*210XXXXXXX and i was trying
> to get back the 1000*#*210XXXXXXX.
that is what I get and is correct, debug:
1(3166) ERROR: <script>: SCRIPT:[1]: ----
sip:1000%23210XXXXXXXX at 192.168.178.20
1(3166) DEBUG: <core> [strcommon.c:224]: unescaped string is
<1000#210XXXXXXXX>
1(3166) ERROR: <script>: SCRIPT:[1]: ----
sip:1000#210XXXXXXXX at 192.168.178.20
for this piece of config:
$rU = "1000%23210XXXXXXXX";
xlog("SCRIPT:[1]: ---- $ru\n");
$rU = $(rU{s.unescape.user});
xlog("SCRIPT:[1]: ---- $ru\n");
Cheers,
Daniel
>
> Thanks
> Alex
>
>
>
>
>
> On Fri, Jan 15, 2010 at 3:31 PM, Daniel-Constantin Mierla
> <miconda at gmail.com <mailto:miconda at gmail.com>> wrote:
>
> Hello,
>
>
> On 1/12/10 3:49 PM, alex pappas wrote:
>> Hi,
>>
>> I already tried that and i was expecting to see back a # but that
>> did not happen. Anyway i will read more carefully the docs and
>> see if I find something there.
>
> i tested $(rU{s.unescape.user}) just now and works fine. Can you
> send here your cfg lines along with the value of r-uri username?
>
> Cheers,
> Daniel
>
>
>>
>>
>> Cheers
>> Alex
>>
>>
>>
>> On Tue, Jan 12, 2010 at 4:41 PM, Alex Balashov
>> <abalashov at evaristesys.com <mailto:abalashov at evaristesys.com>> wrote:
>>
>> Section 19.1.2 ("Character Escaping Requirements") of RFC
>> 3261 says quite clearly that special characters must be
>> escaped when appearing in SIP URIs.
>>
>> It's up to the SIP stack to decode them and translate them
>> into something usable by the caller, if needed. Kamailio
>> doesn't do this for '#' by default.
>>
>> If you want to decode escaped characters, try use the
>> transformations that are designed for that, i.e.
>> {s.unescape.user}. Example:
>>
>> $(rU{s.unescape.user})
>>
>>
>> On 01/12/2010 09:29 AM, alex pappas wrote:
>>
>> Dear Friends,
>>
>> Do you have any idea on how to remove from $rU the %23
>> when is send in
>> to my network?
>> The scenario is: The customer will send (prefix #
>> number). This is
>> translated in sip in (prefix %23 number). I need to
>> remove this in order
>> to check against PDT module.
>>
>> Thanks
>> Alex
>>
>>
>>
>>
>>
>> _______________________________________________
>> Kamailio (OpenSER) - Users mailing list
>> Users at lists.kamailio.org <mailto:Users at lists.kamailio.org>
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> --
>> Alex Balashov - Principal
>> Evariste Systems
>> Web : http://www.evaristesys.com/
>> Tel : (+1) (678) 954-0670
>> Direct : (+1) (678) 954-0671
>>
>> _______________________________________________
>> Kamailio (OpenSER) - Users mailing list
>> Users at lists.kamailio.org <mailto:Users at lists.kamailio.org>
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> _______________________________________________
>> Kamailio (OpenSER) - Users mailing list
>> Users at lists.kamailio.org <mailto:Users at lists.kamailio.org>
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>
> --
> Daniel-Constantin Mierla
> *http://www.asipto.com/
>
>
>
--
Daniel-Constantin Mierla
* http://www.asipto.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/users/attachments/20100115/fdd24486/attachment.htm>
More information about the Users
mailing list