[Spce-user] actual device that initiated BYE?

Stefan Sayer stefan.sayer at gmail.com
Wed Aug 15 05:32:20 EDT 2012


o Matthew Ogden on 08/15/2012 12:11 AM:
> I am gawking at the workaround, and it might be better for SIP switches to
> ignore the oversight of Asterisk? (Not allow timer role reversal once
> established)


session refreshes (re-Invite, Update) are always better done 
end-to-end, as opposed to from the B2B in the middle, which is awkward 
anyway (e.g., while a refresh is in-flight, any Invite request from 
the end will be refused). Therefore SEMS tries to get out of the 
refresher role if possible.

Having said that, you could try always adding refresher=uac:

diff --git a/core/plug-in/session_timer/SessionTimer.cpp 
b/core/plug-in/session_timer/SessionTimer.cpp
index a91668c..74a4e22 100644
--- a/core/plug-in/session_timer/SessionTimer.cpp
+++ b/core/plug-in/session_timer/SessionTimer.cpp
@@ -160,7 +160,8 @@ bool SessionTimer::onSendRequest(const string& method,

    removeHeader(hdrs, SIP_HDR_SESSION_EXPIRES);
    removeHeader(hdrs, SIP_HDR_MIN_SE);
-  hdrs += SIP_HDR_COLSP(SIP_HDR_SESSION_EXPIRES) + 
int2str(session_interval) + CRLF
+  hdrs += SIP_HDR_COLSP(SIP_HDR_SESSION_EXPIRES) + 
int2str(session_interval) +
+    ";refresher=uac" CRLF
      + SIP_HDR_COLSP(SIP_HDR_MIN_SE) + int2str(min_se) + CRLF;

    return false;

but I am sceptical that asterisk adds the correct refresher=uac to the 
response.

Otherwise you could try to always refresh from the B2B, regardless of 
what is negotiated:

diff --git a/core/plug-in/session_timer/SessionTimer.cpp 
b/core/plug-in/session_timer/SessionTimer.cpp
index a91668c..5f778f1 100644
--- a/core/plug-in/session_timer/SessionTimer.cpp
+++ b/core/plug-in/session_timer/SessionTimer.cpp
@@ -333,6 +333,9 @@ void SessionTimer::updateTimer(AmSession* s, const 
AmSipRequest& req) {
        session_refresher      = refresh_local;
        session_refresher_role = UAS;
      }
+
+    // overwrite with: always refresh from local
+    session_refresher      = refresh_local;

      removeTimers(s);
      setTimers(s);

BR
Stefan





More information about the Spce-user mailing list