I am using OpenSER to front some Cisco AS5300s. The way the trunk groups on those are set up, a prefix of #755 is required to dial out, so I transform the URI in OpenSER:
$rU = "#755" + $rU;
The problem is, certain messages never get acknowledged because OpenSER reformats the URI to use escaped sequences. I am not sure if this is RFC compliant.
For instance, a 200 OK comes from the media gateway, and the ACK that OpenSER sends back has this for the URI scheme:
ACK sip:%237557069999999@ip.address:5060
This is in response to an initial INVITE to:
sip:#7557069999999@ip.address:5060
... what should I make of this?
Thanks!
-- Alex Balashov Evariste Systems Web : http://www.evaristesys.com/ Tel : +1-678-954-0670 Direct : +1-678-954-0671
Alex Balashov writes:
The problem is, certain messages never get acknowledged because OpenSER reformats the URI to use escaped sequences. I am not sure if this is RFC compliant.
i don't remember that openser would automatically do any escaping. are you sure about it?
-- juha
On Friday 04 January 2008 13:24:31 Juha Heinanen wrote:
Alex Balashov writes:
The problem is, certain messages never get acknowledged because OpenSER reformats the URI to use escaped sequences. I am not sure if this is RFC compliant.
i don't remember that openser would automatically do any escaping. are you sure about it?
OpenSer doesn't do escaping automatically, I've tested it now.
On Friday 04 January 2008 12:30:55 Alex Balashov wrote:
I am using OpenSER to front some Cisco AS5300s. The way the trunk groups on those are set up, a prefix of #755 is required to dial out, so I transform the URI in OpenSER:
$rU = "#755" + $rU;
Is it legal "#" in a SIP URI???
In fact I don't allow it. I do this test in order to detect illegal characteres:
if ( $ru != $(ru{s.escape.common}) || ($rU && $rU != $(rU{s.escape.user})) ) { sl_send_reply("403", "Forbidden, illegal characters in RURI"); exit; }
And when a # is present in the URI the condition is not matched so the message is forbidden.
Anyway I've not verified if "#" is an illegal character according to some RFC.
Take a look at RFC-3261 starting about page 219. The hash mark / pound sign (#) is no where to be found.
It appears that a percent sign (%) is used to escape hex digits.
Regards, Norm
Iñaki Baz Castillo wrote:
On Friday 04 January 2008 12:30:55 Alex Balashov wrote:
I am using OpenSER to front some Cisco AS5300s. The way the trunk groups on those are set up, a prefix of #755 is required to dial out, so I transform the URI in OpenSER:
$rU = "#755" + $rU;
Is it legal "#" in a SIP URI???
In fact I don't allow it. I do this test in order to detect illegal characteres:
if ( $ru != $(ru{s.escape.common}) || ($rU && $rU != $(rU{s.escape.user})) ) { sl_send_reply("403", "Forbidden, illegal characters in RURI"); exit; }
And when a # is present in the URI the condition is not matched so the message is forbidden.
Anyway I've not verified if "#" is an illegal character according to some RFC.
On Friday 04 January 2008 13:54:41 Norman Brandinger wrote:
Take a look at RFC-3261 starting about page 219. The hash mark / pound sign (#) is no where to be found.
It says:
25.1 Basic Rules ... Several rules are incorporated from RFC 2396 [5] but are updated to make them compliant with RFC 2234 ...
And RFC 2396 says:
2.4.3. Excluded US-ASCII Characters ... The character "#" is excluded because it is used to delimit a URI from a fragment identifier in URI references ...
So I assume that "#" is a illegal character in a SIP URI, am I wrong?
Regards.