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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Oct 20 12:03:45 CDT 2010


branch "master" has been updated
       via  0d2a2a7b9e0bdab3a446bf4b1b356765d7443648 (commit)
      from  d040f5c13d6f386b476b211397038b79175b3dd2 (commit)

Summary of changes:
 src/PJSipSessionModule.cpp |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit 0d2a2a7b9e0bdab3a446bf4b1b356765d7443648
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Oct 20 12:06:25 2010 -0500

    Add some debugging to see if we are handling a REFER, and if not, why not.

diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index d78f6a3..6abd174 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -408,6 +408,7 @@ void PJSipSessionModule::handleRefer(pjsip_inv_session *inv, pjsip_rx_data *rdat
    const pj_str_t str_refer_to = { (char*)"Refer-To", 8 };
    pjsip_generic_string_hdr *refer_to = static_cast<pjsip_generic_string_hdr *>(pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &str_refer_to, NULL));
 
+   lg(Debug) << "Handling a REFER" << std::endl;
    if (!refer_to)
    {
       // Uh... so they didn't tell us where to REFER this to... yeah no
@@ -789,10 +790,17 @@ void PJSipSessionModule::invOnNewSession(pjsip_inv_session *inv, pjsip_event *ev
 
 void PJSipSessionModule::invOnTsxStateChanged(pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_event *e)
 {
+	lg(Debug) << "invOnStateChanged called for method " << std::string(pj_strbuf(&tsx->method.name), pj_strlen(&tsx->method.name)) << std::endl;;
    if (tsx->role == PJSIP_ROLE_UAS && tsx->state == PJSIP_TSX_STATE_TRYING && !pjsip_method_cmp(&tsx->method, pjsip_get_refer_method()))
    {
       handleRefer(inv, e->body.tsx_state.src.rdata);
    }
+   else
+   {
+	   lg(Debug) << "Not handling REFER" << std::endl;
+	   lg(Debug) << "Tsx role is " << tsx->role << " and we would handle REFER if tsx role was " << PJSIP_ROLE_UAS << std::endl;
+	   lg(Debug) << "Tsx state is " << tsx->state << " and we would handle REFER if tsx state was " << PJSIP_TSX_STATE_TRYING << std::endl;
+   }
    //This will be our key point for updating transaction state.
    //This function will not be called until after a module has registered
    //itself as the transaction user, so this won't be called on the initial

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list