[reSIProcate] Uri::setUriUserEncoding('#', false);
Scott Godin
slgodin at icescape.com
Wed Sep 27 09:35:03 CDT 2006
Looks like a bug in the assert statement. You are asking it not to encode #, but you are asserting that # is encoded.
________________________________
From: resiprocate-devel-bounces at list.sipfoundry.org on behalf of Robert Mansfield
Sent: Wed 9/27/2006 10:22 AM
To: resiprocate-devel at list.sipfoundry.org
Subject: [reSIProcate] Uri::setUriUserEncoding('#', false);
All,
I've taken a look at this function as I've experienced some interworking issues with carriers that do not encode the '#' character as %23.
I found a code snippit in testUri.cxx. This works ok..
{
Uri uri = Uri("sip:1234#00442031111111 at lvdx.com");
//cout << "Encoded correctly: " << uri << endl;
assert(Data::from(uri) == "sip:1234%2300442031111111 at lvdx.com");
Uri::setUriUserEncoding('#', false);
uri = Uri("sip:1234#00442031111111 at lvdx.com");
//cout << "Non Encoded # for compatibility: " << uri << endl;
assert(Data::from(uri) == "sip:1234#00442031111111 at lvdx.com");
}
However if I change the code to
{
Uri uri;
Uri::setUriUserEncoding('#', false);
ur= Uri("sip:1234#00442031111111 at lvdx.com");
//cout << "Encoded correctly: " << uri << endl;
assert(Data::from(uri) == "sip:1234%2300442031111111 at lvdx.com");
Uri::setUriUserEncoding('#', false);
uri = Uri("sip:1234#00442031111111 at lvdx.com");
//cout << "Non Encoded # for compatibility: " << uri << endl;
assert(Data::from(uri) == "sip:1234#00442031111111 at lvdx.com");
}
The first assert fails. Any ideas as to what could be the cause?
Regards,
Rob.
============================
Robert Mansfield
Senior Software Engineer
Redwood Technologies Limited
Tel +[44] (0)1344 304 344
Fax +[44] (0)1344 304 345
E:mail mailto:rjm at redwoodtech.com <mailto:rjm at redwoodtech.com>
Web http://www.redwoodtech.com <http://www.redwoodtech.com/>
============================
Email Disclaimer
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this email are subject to the limitations of Redwood Technologies Limited's standard terms and conditions of contract.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20060927/b1b45760/attachment.htm>
More information about the resiprocate-devel
mailing list