[reSIProcate] Uri::setUriUserEncoding('#', false);

Robert Mansfield RJM at Redwoodtech.com
Wed Sep 27 09:51:37 CDT 2006


I apologise. The  code modification should have looked like
 
  
{
Uri uri;
 
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");
 
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.

-----Original Message-----
From: Robert Mansfield [mailto:RJM at redwoodtech.com] 
Sent: 27 September 2006 15:23
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/52e0e506/attachment.htm>


More information about the resiprocate-devel mailing list