Skip to content
Snippets Groups Projects
  1. Jun 26, 2024
  2. Jun 25, 2024
    • Wenpeng Song's avatar
      Implement registration retry mechanism in failure cases, REF 14471 · 213741af
      Wenpeng Song authored and Yalu Zhang's avatar Yalu Zhang committed
      cherry-pick the following changes from devel
      - When SIP response 408/503/500 is received for SIP Register requests
        to all server addresses, the failover retry will be scheduled
        with certain time interval.
      - If number of continuous failed retries reached 'failover_max_retries',
        the SIP registraion will be given up. By default, the number is '-1',
        i.e. unlimited.
      - 'failover_interval1' is used between normal failover retries, which
        is 10 seconds by default.
      - 'failover_interval2' is used once after every 3 continuous retries,
        which is 60 seconds by default.
      
      More timer (T1,T2,T4,TD/TB) configuration added from asterisk to pjsip.
      
      Priority after this changes:
      * retry_after (if received, as above diagram)
      * failover_max_retries (if have non-zero values, -1 as infinitive)
      * retry_interval (if set, default 1 if not set)
      * above diagram base on RFC
      213741af
  3. Jun 14, 2024
    • Wenpeng Song's avatar
      Fix a bug in computing the common codec, REF 14632 · fb501964
      Wenpeng Song authored and Yalu Zhang's avatar Yalu Zhang committed
      According to asterisk doc:
      
      * prefer: \< pending | configured \>\
        pending - The codec list in the received SDP answer.\
        configured - The codec list from the endpoint.
      * operation : \< union | intersect | only_preferred | only_nonpreferred \>\
        `union` - Merge the lists with the preferred codecs first.\
        intersect - Only common codecs with the preferred codecs first.\
        only_preferred - Use only the preferred codecs.\
        only_nonpreferred - Use only the non-preferred codecs.
      * keep : \< all | first \> - all - After the operation, keep all codecs.\
        first - After the operation, keep only the first codec.
      
      But in current Asterisk implementation, the `remote_first` which we currently used for incoming
      preference has been interrupted wrongly with option "`union`"(merge).
      
      This leading to the issue that unsupported codec could also got an valid joint cap during
      ast_sip_session_create_joint_call_cap even if there has no common codec(local codec will be
      used), but then failure in the later stage which given the `500 SDP negotiation failed`
      response and hangup.
      
      After this correction, unsupported codec will not receiving an valid joint cap during ast_sip_session_create_joint_call_cap if there has no common codec, then a `488 Not Acceptable
      Here` response will be send as expected.
      
      This also improve the behavior when an incoming call has no common codec at all: INVITE-
      100(Trying)-488(Not Acceptable Here)-ACK, will not have 180(Ringing) in this case.
      fb501964
  4. Jun 13, 2024
  5. Jun 12, 2024
  6. Jun 03, 2024
  7. May 27, 2024
  8. May 23, 2024
  9. May 14, 2024
  10. May 08, 2024
  11. Jan 25, 2024
  12. Jan 24, 2024
  13. Jan 10, 2024
  14. Dec 27, 2023
  15. Dec 07, 2023
  16. Nov 10, 2023
    • Wenpeng Song's avatar
      Fix a crash due to wrong handling of 200 OK to REGISTER · 692264c9
      Wenpeng Song authored and Yalu Zhang's avatar Yalu Zhang committed
      When SIP un-registration request got an 200 OK with expiration value which is not 0 (due to the
      server setting and network), it is treated as registration success based on the non zero expiration value. This made the other procedures following and it went into an uncontrollable
      stage, i.e. unstoppable loop of the un-registration requests until crash.
      
      Solution
      Retrieve the requested expiration if possible, and check it together with the received expiration
      in response to identify if the 200 OK is to register or unregister.
      692264c9
  17. Nov 09, 2023
  18. Nov 02, 2023
    • Grzegorz Sluja's avatar
      Fix sequence number used by asterisk for outgoing RTP packets · 59f9c7ce
      Grzegorz Sluja authored and Yalu Zhang's avatar Yalu Zhang committed
      There was no audio for 3-way conference when sRTP is used.
      For 2-way calls frame->seqno is taken from DSP and is used by asterisk for the sequence number
      in RTP headers. However for 3-way conference the sequence number is generated by asterisk and
      it has to be greater than the previous value, otherwise libsrtp refuses to forward 'too old'
      RTP packets.
      59f9c7ce
  19. Oct 31, 2023
    • Wenpeng Song's avatar
      627a1902
    • George Joseph's avatar
      res_pjsip_exten_state,res_pjsip_mwi: Allow unload on shutdown · a659b358
      George Joseph authored and Wenpeng Song's avatar Wenpeng Song committed
      Commit f66f77fa last year prevents the res_pjsip_exten_state and
      res_pjsip_mwi modules from unloading due to possible pjproject
      asserts if the modules are reloaded. A side effect of the
      implementation is that the taskprocessors these modules use aren't
      being released. When asterisk is doing a graceful shutdown, it
      waits AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT seconds for all
      taskprocessors to stop but since those 2 modules don't release
      theirs, the shutdown hangs for that amount of time.
      
      This change allows the modules to be unloaded and their resources to
      be released when ast_shutdown_final is true.
      
      Resolves: #379
      a659b358
  20. Oct 25, 2023
  21. Oct 23, 2023
  22. Oct 21, 2023
  23. Oct 16, 2023
  24. Oct 13, 2023
  25. Oct 11, 2023
  26. Oct 09, 2023
    • Lukasz Kotasa's avatar
      Fix a session reference counting error · 56eb1774
      Lukasz Kotasa authored and Yalu Zhang's avatar Yalu Zhang committed
      The ast_sip_dialog_get_session function returns the session with reference count
      increased. This was not taken into account and was causing sessions to remain
      around when they should not be.
      56eb1774
  27. Oct 04, 2023
    • Wenpeng Song's avatar
      Update the SIPIPAddress for CallLog on outgoing calls · cd8854bb
      Wenpeng Song authored and Yalu Zhang's avatar Yalu Zhang committed
      Session invitation is not ready (NULL) on "session_on_tx_request" (before sending the request)
      when the function for setting SIPIPAdress is called in the current version.
      Call the function under "session_inv_on_tsx_state_changed" (just after the request be sent) 
      instead.
      cd8854bb
  28. Oct 03, 2023
  29. Sep 20, 2023
  30. Sep 07, 2023
  31. Sep 01, 2023
  32. Aug 07, 2023
    • Grzegorz Sluja's avatar
      Add support for unsolicited MWI · b588e866
      Grzegorz Sluja authored
      The SUBSCRIBE request for MWI is sent in the following conditions:
      * mwi is enabled in asterisk configuration: option mwi_enable '1'
      * SUBSCRIBE is sent after registration succeeds with expiration set to the same value as REGISTER.
      b588e866
  33. Jul 18, 2023
  34. Jun 22, 2023
  35. May 09, 2023
  36. May 08, 2023
    • Henning Westerholt's avatar
      chan_pjsip: also return all codecs on empty re-INVITE for late offers · ac747ce5
      Henning Westerholt authored
      We should also return all codecs on an re-INVITE without SDP for a
      call that used late offer (e.g. no SDP in the initial INVITE, SDP
      in the ACK). Bugfix for feature introduced in ASTERISK-30193
      (https://issues.asterisk.org/jira/browse/ASTERISK-30193)
      
      Migration from previous gerrit change that was not merged.
      
      (cherry picked from commit 37a41a2a20688a0c0c84d0d3a888f0b598e12060)
      ac747ce5
    • Maximilian Fridrich's avatar
      res_pjsip: mediasec: Add Security-Client headers after 401 · 9cfda39d
      Maximilian Fridrich authored
      When using mediasec, requests sent after a 401 must still contain the
      Security-Client header according to
      draft-dawes-sipcore-mediasec-parameter.
      
      Resolves: #48
      (cherry picked from commit f3cc1e7fbd08b1dc90bc7a1c13afae42a7210bf1)
      9cfda39d
    • Naveen Albert's avatar
      res_pjsip_stir_shaken: Fix JSON field ordering and disallowed TN characters. · 59c9e453
      Naveen Albert authored
      The current STIR/SHAKEN signing process is inconsistent with the
      RFCs in a couple ways that can cause interoperability issues.
      
      RFC8225 specifies that the keys must be ordered lexicographically, but
      currently the fields are simply ordered according to the order
      in which they were added to the JSON object, which is not
      compliant with the RFC and can cause issues with some carriers.
      
      To fix this, we now leverage libjansson's ability to dump a JSON
      object sorted by key value, yielding the correct field ordering.
      
      Additionally, telephone numbers must have any leading + prefix removed
      and must not contain characters outside of 0-9, *, and # in order
      to comply with the RFCs. Numbers are now properly formatted as such.
      
      ASTERISK-30407 #close
      
      Change-Id: Iab76d39447c4b8cf133de85657dba02fda07f9a2
      (cherry picked from commit 66a7cff57ecc4514c28071981037afa72ef0d4b9)
      59c9e453
Loading