[Opalvoip-svn] SF.net SVN: opalvoip:[21634] opal/branches/csoutheren/WolfBranch1/src/sip
Brought to you by:
csoutheren,
rjongbloed
From: <cso...@us...> - 2008-11-27 06:12:24
|
Revision: 21634 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=21634&view=rev Author: csoutheren Date: 2008-11-27 06:12:20 +0000 (Thu, 27 Nov 2008) Log Message: ----------- Fix Contact field when SIP local user name contains @ Allow per-connection override of the From domain field Modified Paths: -------------- opal/branches/csoutheren/WolfBranch1/src/sip/sipcon.cxx opal/branches/csoutheren/WolfBranch1/src/sip/sippdu.cxx Modified: opal/branches/csoutheren/WolfBranch1/src/sip/sipcon.cxx =================================================================== --- opal/branches/csoutheren/WolfBranch1/src/sip/sipcon.cxx 2008-11-27 04:11:52 UTC (rev 21633) +++ opal/branches/csoutheren/WolfBranch1/src/sip/sipcon.cxx 2008-11-27 06:12:20 UTC (rev 21634) @@ -1160,6 +1160,10 @@ PString name((*stringOptions)("Calling-Party-Name")); if (!name.IsEmpty()) myAddress.SetDisplayName(name); + + PString domain((*stringOptions)("Calling-Party-Domain")); + if (!domain.IsEmpty()) + myAddress.SetHostName(domain); } if (myAddress.GetDisplayName(false).IsEmpty()) Modified: opal/branches/csoutheren/WolfBranch1/src/sip/sippdu.cxx =================================================================== --- opal/branches/csoutheren/WolfBranch1/src/sip/sippdu.cxx 2008-11-27 04:11:52 UTC (rev 21633) +++ opal/branches/csoutheren/WolfBranch1/src/sip/sippdu.cxx 2008-11-27 06:12:20 UTC (rev 21634) @@ -1647,6 +1647,9 @@ PStringList routeSet = connection.GetRouteSet(); SIPEndPoint & endpoint = connection.GetEndPoint(); PString localPartyName = connection.GetLocalPartyName(); + PINDEX pos = localPartyName.Find('@'); + if (pos != P_MAX_INDEX) + localPartyName = localPartyName.Left(pos); SIPURL contact = endpoint.GetContactURL(transport, localPartyName, SIPURL(connection.GetRemotePartyAddress()).GetHostName()); SIPURL via = endpoint.GetLocalURL(transport, localPartyName); contact.Sanitise(meth != Method_INVITE ? SIPURL::ContactURI : SIPURL::RouteURI); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |