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

channels other than sofia cannot be intercepted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.12
    • Fix Version/s: fs-next-release, 20.19.3
    • Component/s: mod_sofia
    • Labels:
      None
    • CPU Architecture:
      x86-64
    • Kernel:
      Linux
    • Userland:
      GNU/Linux
    • Distribution:
      Debian
    • Distribution Version:
      Debian 8 jessie
    • Compiler:
      gcc
    • FreeSWITCH GIT Revision:
      5d3ff00368753c220fe909c702ab6c2c78977f53
    • GIT Master Revision hash::
      5d3ff00368753c220fe909c702ab6c2c78977f53
    • Target Version:

      Description

      to reproduce
      create a loopback or other channel type and park the call
      try to intercept the call with a INVITE with Replaces header

      the code in (sofia.c) sofia_handle_sip_i_invite that handles the replaces header requires nua_handle_magic which is not available for other channel types (i think).
      by dropping the bnh & nua_handle_magic, and replacing the way to obtain b_session to
      " if ((b_session = switch_core_session_locate(sip->sip_replaces->rp_call_id))) {"
      the channel is properly intercepted, but i don't know if this will break anything.


      10913 if (!bnh && sip->sip_replaces) {
      10914 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "REPLACES 2\n");
      10915 if (!(bnh = nua_handle_by_replaces(nua, sip->sip_replaces))) {
      10916 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "REPLACES 3\n");
      10917 if (!(bnh = nua_handle_by_call_id(nua, sip->sip_replaces->rp_call_id))) {
      10918 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "REPLACES 4\n");
      10919 bnh = sofia_global_nua_handle_by_replaces(sip->sip_replaces);
      10920 }
      10921 }
      10922 }
      10923
      10924 if(sip->sip_replaces && sip->sip_replaces->rp_call_id) {
      10925
      10926 // if (bnh) {
      10927 // sofia_private_t *b_private = NULL;
      10928 // switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "REPLACES 5\n");
      10929 // if ((b_private = nua_handle_magic(bnh))) {
      10930 switch_core_session_t *b_session = NULL;
      10931 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "REPLACES 6\n");
      10932
      10933 // if ((b_session = switch_core_session_locate(b_private->uuid))) {
      10934 if ((b_session = switch_core_session_locate(sip->sip_replaces->rp_call_id))) {
      10935 switch_channel_t *b_channel = switch_core_session_get_channel(b_session);
      10936 const char *bridge_uuid;
      10937 switch_caller_profile_t *orig_cp, *cp;

        Attachments

          Activity

            People

            • Assignee:
              mikej Mike Jerris
              Reporter:
              lazedo Luis Azedo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: