[asterisk-scf-commits] asterisk-scf/release/sip.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Dec 19 12:03:38 CST 2011


branch "master" has been updated
       via  1a97744ee7f2f88feb3b50df841da9735a8330d7 (commit)
       via  f73dd308884f91c014f55fd09665a35c6c7e1463 (commit)
      from  8e2b79a5ae36f492a421a6f24c8d834ed72836d1 (commit)

Summary of changes:
 src/SipClientRegistration.cpp |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit 1a97744ee7f2f88feb3b50df841da9735a8330d7
Merge: f73dd30 8e2b79a
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon Dec 19 12:04:50 2011 -0600

    Merge branch 'master' of git.asterisk.org:asterisk-scf/release/sip


commit f73dd308884f91c014f55fd09665a35c6c7e1463
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon Dec 19 12:04:28 2011 -0600

    Use the proper from header in outgoing REGISTER requests.

diff --git a/src/SipClientRegistration.cpp b/src/SipClientRegistration.cpp
index c792230..7bd036c 100644
--- a/src/SipClientRegistration.cpp
+++ b/src/SipClientRegistration.cpp
@@ -169,14 +169,15 @@ void SipRegistrationClient::createPJSIPRegistration(
     pj_str_t serverURL;
     pj_strdup2(pjsip_regc_get_pool(mReg), &serverURL, server.str().c_str());
 
-    std::stringstream from;
-    from << "\"" << mEndpointName << "\" <sip:" << mEndpointName << "@" << config.transportConfig.address <<  ">";
-    pj_str_t fromURL;
-    pj_strdup2(pjsip_regc_get_pool(mReg), &fromURL, from.str().c_str());
-
+    // In a REGISTER, the To header contains the address of record
     pj_str_t toURL;
     pj_strdup2(pjsip_regc_get_pool(mReg), &toURL, confItem->aor.c_str());
 
+    // According to RFC 3261 section 10.2, the from header should be the same
+    // as the to unless this is a third-party registration.
+    pj_str_t fromURL;
+    pj_strdup2(pjsip_regc_get_pool(mReg), &fromURL, confItem->aor.c_str());
+
     pjsip_regc_init(
             mReg,
             &serverURL,

-----------------------------------------------------------------------


-- 
asterisk-scf/release/sip.git



More information about the asterisk-scf-commits mailing list