Uploaded image for project: 'FreeSWITCH'
  1. FreeSWITCH
  2. FS-9671

Wrong Cseq is sent in NOTIFY after FS receiving a SUBSCRIBE with “Expires: 0”

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.8
    • Fix Version/s: 1.8
    • Component/s: mod_sofia
    • Security Level: public
    • Labels:
      None
    • CPU Architecture:
      x86-64
    • Kernel:
      Linux
    • uname:
      Linux FS 3.10.0-229.el7.x86_64
    • Userland:
      GNU/Linux
    • Distribution:
      CentOS
    • Distribution Version:
      CentOS 7
    • Compiler:
      gcc
    • FreeSWITCH GIT Revision:
      1.6.8+git~20160505T153832Z~99de0ad502~64bit
    • GIT Master Revision hash::
      1.6.8+git~20160505T153832Z~99de0ad502~64bit
    • Target Version:
      1.8

      Description

      After FreeSwitch receive a SUBSCRIBE with Expires 0, It send a NOTIFY with Cseq less than the previous one. Log attached.

      RFC-3261 - 12.2.1.1 Generating the Request:

      “Requests within a dialog MUST contain strictly monotonically increasing and contiguous CSeq sequence numbers (increasing-by-one) in each direction (excepting ACK and CANCEL of course, whose numbers equal the requests being acknowledged or cancelled)”


      I’ve done some changes in “sofia_presence.c”, but I’ve tested only for “message-summary”

         4110 { if (zstr(full_agent)) || (*full_agent != 'z' && *full_agent != 'Z')) {
         4111 /* supress endless loop bug with zoiper */
         4112
         4113 uint32_t callsequence = sofia_presence_get_cseq(profile);
         4114 sip_cseq_t * cseq = sip_cseq_create(nh->nh_home, callsequence, SIP_METHOD_NOTIFY);
         4115 nua_notify(nh,
         4116 SIPTAG_EXPIRES_STR("0"),
         4117 SIPTAG_SUBSCRIPTION_STATE_STR(sstr),
         4118 SIPTAG_CSEQ(cseq),
         4119 TAG_END());
         4120 }
        

         4169 if (!strcasecmp(event, "line-seize")) {

         4180 uint32_t callsequence = sofia_presence_get_cseq(profile);
         4181 sip_cseq_t * cseq = sip_cseq_create(nh->nh_home, callsequence, SIP_METHOD_NOTIFY);
         4182 nua_notify(nh,
         4183 SIPTAG_FROM(sip->sip_to),
         4184 SIPTAG_TO(sip->sip_from),
         4185 SIPTAG_EXPIRES_STR(exp_delta_str),
         4186 SIPTAG_SUBSCRIPTION_STATE_STR(sstr),
         4187 SIPTAG_CSEQ(cseq),
         4188 SIPTAG_EVENT_STR("line-seize"), TAG_IF(full_call_info, SIPTAG_CALL_INFO_STR(full_call_info)), TAG_END());
         4189

       

        Attachments

          Activity

            People

            • Assignee:
              mikej Mike Jerris
              Reporter:
              luiztelles luiz telles
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: