[Opalvoip-svn] SF.net SVN: opalvoip:[22767] opal/branches/v3_6
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2009-05-29 07:13:53
|
Revision: 22767 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=22767&view=rev Author: rjongbloed Date: 2009-05-29 07:13:51 +0000 (Fri, 29 May 2009) Log Message: ----------- Only do ENUM lookup if the whole name is E.164 compatible, don;t try if "123fred" or worse "10.0.1.1" as that clearly is not a phone number. Modified Paths: -------------- opal/branches/v3_6/src/sip/sipep.cxx Property Changed: ---------------- opal/branches/v3_6/ Property changes on: opal/branches/v3_6 ___________________________________________________________________ Modified: svn:mergeinfo - /opal/branches/autoconf:20594-21001 /opal/branches/rjongbloed/BarnardPlus:20584,20656,20749,20751,20756,20762,20786,20789,20814,20820,20829,20831,20841,20843,20923,20927,20938,22016-22017,22518,22582 /opal/branches/v3_2:21143,21220,21227,21253,21455 /opal/branches/v3_4:21060,21062,21088,21092,21111,21113,21115,21119,21143,21148,21151-21152,21155,21158,21184,21188,21253,21265-21266,21283-21284,21298,21300,21303,21307,21309,21311,21327,21331,21333,21359,21367,21369,21488,21556,21564-21565,21568,21570,21620,21625,21631,21748,21751,21756,21759,21761,21767,21770,22246 /opal/trunk:12524-20593,22117-22118,22128,22138,22140,22142,22146,22152,22157-22158,22161,22218-22219,22222-22223,22227,22262,22264,22278,22329,22341,22349,22360,22362-22363,22365,22385,22397,22399,22415,22420,22422,22425,22427,22466-22467,22469,22471,22492,22541-22543,22546,22554,22615,22618,22667,22670,22679,22688,22759 /ptlib/branches/v2_4:22246 /ptlib/trunk:20820 + /opal/branches/autoconf:20594-21001 /opal/branches/rjongbloed/BarnardPlus:20584,20656,20749,20751,20756,20762,20786,20789,20814,20820,20829,20831,20841,20843,20923,20927,20938,22016-22017,22518,22582 /opal/branches/v3_2:21143,21220,21227,21253,21455 /opal/branches/v3_4:21060,21062,21088,21092,21111,21113,21115,21119,21143,21148,21151-21152,21155,21158,21184,21188,21253,21265-21266,21283-21284,21298,21300,21303,21307,21309,21311,21327,21331,21333,21359,21367,21369,21488,21556,21564-21565,21568,21570,21620,21625,21631,21748,21751,21756,21759,21761,21767,21770,22246 /opal/trunk:12524-20593,22117-22118,22128,22138,22140,22142,22146,22152,22157-22158,22161,22218-22219,22222-22223,22227,22262,22264,22278,22329,22341,22349,22360,22362-22363,22365,22385,22397,22399,22415,22420,22422,22425,22427,22466-22467,22469,22471,22492,22541-22543,22546,22554,22615,22618,22667,22670,22679,22688,22759,22766 /ptlib/branches/v2_4:22246 /ptlib/trunk:20820 Modified: opal/branches/v3_6/src/sip/sipep.cxx =================================================================== --- opal/branches/v3_6/src/sip/sipep.cxx 2009-05-29 07:10:38 UTC (rev 22766) +++ opal/branches/v3_6/src/sip/sipep.cxx 2009-05-29 07:13:51 UTC (rev 22767) @@ -320,14 +320,9 @@ if (remoteParty.Find('@') == P_MAX_INDEX) { // make sure the number has only digits - PString e164 = remoteParty; - PINDEX pos = e164.Find(':'); - if (pos != P_MAX_INDEX) - e164.Delete(0, pos+1); - pos = e164.FindSpan("0123456789*#", e164[0] != '+' ? 0 : 1); - e164.Delete(pos, P_MAX_INDEX); - - if (!e164.IsEmpty()) { + PINDEX pos = remoteParty.Find(':'); + PString e164 = pos != P_MAX_INDEX ? remoteParty.Mid(pos+1) : remoteParty; + if (e164.FindSpan("0123456789*#", e164[0] != '+' ? 0 : 1) == P_MAX_INDEX) { PString str; if (PDNS::ENUMLookup(e164, "E2U+SIP", str)) { PTRACE(4, "SIP\tENUM converted remote party " << remoteParty << " to " << str); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |