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
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@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
On 01/12/2010 09:41 AM, Alex Balashov 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})
And, of course, you should look at the entire docs for transformations:
http://www.kamailio.org/dokuwiki/doku.php/transformations:1.5.x
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.
Cheers Alex
On Tue, Jan 12, 2010 at 4:41 PM, Alex Balashov abalashov@evaristesys.comwrote:
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@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@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Hi
I fixed in this way:
if($rU =~ "^.*%+") { xlog("alx ------- The number contains %23 OR #"); $var(new_prefix) = $(rU{s.select,0,%}); # get the prefix to re use it later $var(new_num) = $(rU{s.select,1,%}); # cat the % $var(cat_hash) = $(var(new_num){s.substr,2,0}); # cat the 23 $rU = $var(new_prefix) + $var(cat_hash); xlog("alx ------- The var(new_prefix) = $var(new_prefix) the var(new_num) = $var(new_num) new rU = $var(cat_hash) -------"); }
i don't know if is the best way but it works. If anyone can suggest something else less power consuming, is welcomed.
Cheers Alex
On Tue, Jan 12, 2010 at 4:49 PM, alex pappas rebel.pappas@gmail.com 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.
Cheers Alex
On Tue, Jan 12, 2010 at 4:41 PM, Alex Balashov abalashov@evaristesys.comwrote:
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@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@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Alex, I think you can use:
$rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/})
Maybe you should use some variable to make this modification.
Cheers, Uriel
On Tue, Jan 12, 2010 at 12:12 PM, alex pappas rebel.pappas@gmail.comwrote:
Hi
I fixed in this way:
if($rU =~ "^.*%+") { xlog("alx ------- The number contains %23 OR #"); $var(new_prefix) = $(rU{s.select,0,%}); # get the
prefix to re use it later $var(new_num) = $(rU{s.select,1,%}); # cat the % $var(cat_hash) = $(var(new_num){s.substr,2,0}); # cat the 23 $rU = $var(new_prefix) + $var(cat_hash); xlog("alx ------- The var(new_prefix) = $var(new_prefix) the var(new_num) = $var(new_num) new rU = $var(cat_hash) -------"); }
i don't know if is the best way but it works. If anyone can suggest something else less power consuming, is welcomed.
Cheers Alex
On Tue, Jan 12, 2010 at 4:49 PM, alex pappas rebel.pappas@gmail.comwrote:
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.
Cheers Alex
On Tue, Jan 12, 2010 at 4:41 PM, Alex Balashov <abalashov@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@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@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@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Hi,
That is very cool and it works :-)) Could you explain how the substitution is done so i can learn that and use it again?
Thank you Alex
On Tue, Jan 12, 2010 at 6:51 PM, Uriel Rozenbaum uriel.rozenbaum@gmail.comwrote:
Alex, I think you can use:
$rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/})
Maybe you should use some variable to make this modification.
Cheers, Uriel
On Tue, Jan 12, 2010 at 12:12 PM, alex pappas rebel.pappas@gmail.comwrote:
Hi
I fixed in this way:
if($rU =~ "^.*%+") { xlog("alx ------- The number contains %23 OR #"); $var(new_prefix) = $(rU{s.select,0,%}); # get the
prefix to re use it later $var(new_num) = $(rU{s.select,1,%}); # cat the % $var(cat_hash) = $(var(new_num){s.substr,2,0}); # cat the 23 $rU = $var(new_prefix) + $var(cat_hash); xlog("alx ------- The var(new_prefix) = $var(new_prefix) the var(new_num) = $var(new_num) new rU = $var(cat_hash) -------"); }
i don't know if is the best way but it works. If anyone can suggest something else less power consuming, is welcomed.
Cheers Alex
On Tue, Jan 12, 2010 at 4:49 PM, alex pappas rebel.pappas@gmail.comwrote:
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.
Cheers Alex
On Tue, Jan 12, 2010 at 4:41 PM, Alex Balashov < abalashov@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@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@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@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Hi
I found this tutorial on internet http://www.comp.leeds.ac.uk/Perl/sandtr.html which is explaining in deep the sustitution.
Thank you Alex
On Wed, Jan 13, 2010 at 10:10 AM, alex pappas rebel.pappas@gmail.comwrote:
Hi,
That is very cool and it works :-)) Could you explain how the substitution is done so i can learn that and use it again?
Thank you Alex
On Tue, Jan 12, 2010 at 6:51 PM, Uriel Rozenbaum < uriel.rozenbaum@gmail.com> wrote:
Alex, I think you can use:
$rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/})
Maybe you should use some variable to make this modification.
Cheers, Uriel
On Tue, Jan 12, 2010 at 12:12 PM, alex pappas rebel.pappas@gmail.comwrote:
Hi
I fixed in this way:
if($rU =~ "^.*%+") { xlog("alx ------- The number contains %23 OR #"); $var(new_prefix) = $(rU{s.select,0,%}); # get
the prefix to re use it later $var(new_num) = $(rU{s.select,1,%}); # cat the % $var(cat_hash) = $(var(new_num){s.substr,2,0}); # cat the 23 $rU = $var(new_prefix) + $var(cat_hash); xlog("alx ------- The var(new_prefix) = $var(new_prefix) the var(new_num) = $var(new_num) new rU = $var(cat_hash) -------"); }
i don't know if is the best way but it works. If anyone can suggest something else less power consuming, is welcomed.
Cheers Alex
On Tue, Jan 12, 2010 at 4:49 PM, alex pappas rebel.pappas@gmail.comwrote:
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.
Cheers Alex
On Tue, Jan 12, 2010 at 4:41 PM, Alex Balashov < abalashov@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@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@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@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Good tutorial,
now that i see it, I think you can try using the following:
$` eq "Lord Wo"; $& eq "pp"; $' eq "er of Fibbing";
$rU = $(rU{re.subst,/^%23/$`$'}) so you get the match before and after the string, but you should try it first, I'm not sure if it will impact on the var and avp space.
The previous example matched some string followed by %23 and followed by some other string. Then the translaion only used the strings and forgot about the %23.
This one does the same without using internal REGEXP variables.
Glad I could help. Uriel
On Wed, Jan 13, 2010 at 5:23 AM, alex pappas rebel.pappas@gmail.com wrote:
Hi
I found this tutorial on internet http://www.comp.leeds.ac.uk/Perl/sandtr.html which is explaining in deep the sustitution.
Thank you Alex
On Wed, Jan 13, 2010 at 10:10 AM, alex pappas rebel.pappas@gmail.comwrote:
Hi,
That is very cool and it works :-)) Could you explain how the substitution is done so i can learn that and use it again?
Thank you Alex
On Tue, Jan 12, 2010 at 6:51 PM, Uriel Rozenbaum < uriel.rozenbaum@gmail.com> wrote:
Alex, I think you can use:
$rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/})
Maybe you should use some variable to make this modification.
Cheers, Uriel
On Tue, Jan 12, 2010 at 12:12 PM, alex pappas rebel.pappas@gmail.comwrote:
Hi
I fixed in this way:
if($rU =~ "^.*%+") { xlog("alx ------- The number contains %23 OR #"); $var(new_prefix) = $(rU{s.select,0,%}); # get
the prefix to re use it later $var(new_num) = $(rU{s.select,1,%}); # cat the % $var(cat_hash) = $(var(new_num){s.substr,2,0}); # cat the 23 $rU = $var(new_prefix) + $var(cat_hash); xlog("alx ------- The var(new_prefix) = $var(new_prefix) the var(new_num) = $var(new_num) new rU = $var(cat_hash) -------"); }
i don't know if is the best way but it works. If anyone can suggest something else less power consuming, is welcomed.
Cheers Alex
On Tue, Jan 12, 2010 at 4:49 PM, alex pappas rebel.pappas@gmail.comwrote:
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.
Cheers Alex
On Tue, Jan 12, 2010 at 4:41 PM, Alex Balashov < abalashov@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@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@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@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
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@evaristesys.com mailto:abalashov@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@lists.kamailio.org <mailto:Users@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@lists.kamailio.org <mailto:Users@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@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
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.
Thanks Alex
On Fri, Jan 15, 2010 at 3:31 PM, Daniel-Constantin Mierla <miconda@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@evaristesys.comwrote:
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@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@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 listUsers@lists.kamailio.orghttp://lists.kamailio.org/cgi-bin/mailman/listinfo/usershttp://lists.openser...
-- Daniel-Constantin Mierla
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@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@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@gmail.com mailto:miconda@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@evaristesys.com <mailto:abalashov@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@lists.kamailio.org <mailto:Users@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@lists.kamailio.org <mailto:Users@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@lists.kamailio.org <mailto:Users@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/
Hi Daniel,
Yes you are right as usual. It Works! I don't know what the problem was ;-)
Thank you! Alex
On Fri, Jan 15, 2010 at 5:51 PM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
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@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@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@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@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@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@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 listUsers@lists.kamailio.orghttp://lists.kamailio.org/cgi-bin/mailman/listinfo/usershttp://lists.openser...
-- Daniel-Constantin Mierla
-- Daniel-Constantin Mierla