[reSIProcate] Uri::setUriUserEncoding('#', false);
Daniel Pocock
daniel at readytechnology.co.uk
Wed Sep 27 10:18:58 CDT 2006
Scott Godin wrote:
>Looks like a bug in the assert statement. You are asking it not to encode #, but you are asserting that # is encoded.
>
>
>
Yes, I deliberately created two test cases:
- the first is meant to test the way reSIProcate used to work before I
added this feature, this is the default behaviour
- the second is meant to test the feature
In other words, you shouldn't make any calls to setUriUserEncoding
before executing the first test case.
Regards,
Daniel
>
>
>________________________________
>
>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.
>
>
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>resiprocate-devel mailing list
>resiprocate-devel at list.sipfoundry.org
>https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
>
More information about the resiprocate-devel
mailing list