Skip to content

[switch_core_media] RFC 2543-style hold not detected for IPv6 endpoints — HELD state never triggered - #3099

Open
gaurang1102 wants to merge 4 commits into
signalwire:masterfrom
gaurang1102:fix/IPv6-endpoints-RFC-2543-hold-Cisco
Open

[switch_core_media] RFC 2543-style hold not detected for IPv6 endpoints — HELD state never triggered#3099
gaurang1102 wants to merge 4 commits into
signalwire:masterfrom
gaurang1102:fix/IPv6-endpoints-RFC-2543-hold-Cisco

Conversation

@gaurang1102

Copy link
Copy Markdown

Description

reeSWITCH detects RFC 2543-style call hold by checking whether the SDP's connection address (c= line) is set to the IPv4 null address 0.0.0.0. This detection is in switch_core_media_process_sdp() in src/switch_core_media.c.

However, the check does not include the equivalent IPv6 null address 0:0:0:0:0:0:0:0 (or its canonical form ::). IPv6-capable endpoints — notably Cisco IP phones in dual-stack environments — send RFC 2543-style hold using the IPv6 null address in the SDP connection line. FreeSWITCH does not recognize this as a hold, so the channel never transitions to the HELD state, breaking all hold-dependent features: music on hold, hold timers, supervisor monitoring, and hold/resume event generation.

RFC Reference
RFC 2543 §3.1 specifies that a hold is signaled by setting the SDP connection address to 0.0.0.0. RFC 3264 deprecated this in favor of a=sendonly/recvonly, but many deployed devices (especially Cisco) continue to use RFC 2543-style hold. For IPv6, the equivalent address is 0:0:0:0:0:0:0:0 (abbreviated ::). FreeSWITCH already handles the IPv4 case; the IPv6 case is missing.

Affected Code
File: src/switch_core_media.c
Function: switch_core_media_process_sdp() — the sdp_connection->c_address check approximately 124 lines before the main media loop.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Code cleanup / refactor

Related Issues

#3098 (comment)

Testing

(1) Configure FreeSWITCH with an IPv6-enabled sofia profile (listen-ip = ::).
(2) Register a Cisco IP phone (e.g., Cisco 8800 series) that sends RFC 2543-style hold via IPv6.
(3) Place a call to/from the Cisco phone. While connected, press the Hold button on the phone.
(4) Capture the re-INVITE or UPDATE sent by the phone using sofia global siptrace on.
(5) Observe the SDP contains c=IN IP6 0:0:0:0:0:0:0:0 in the connection field.
(6) Check the channel state:
fs_cli -x "show channels"
or monitor SWITCH_EVENT_CHANNEL_HOLD — the channel does NOT enter the HELD state.
(7) Music on hold is not triggered; the far end hears live audio (or silence) instead of MOH.

  • Added/updated unit tests
  • Tested manually
  • Tested with live SignalWire credentials (if applicable)

Checklist

  • I have read the CONTRIBUTING guidelines
  • My code follows the project's style guidelines
  • I have added tests for my changes (if applicable)
  • I have updated documentation (if applicable)
  • All existing tests pass

Additional Notes

… multi-node use, but the implementation was never completed. All SQL writers hardcode the literal string 'single_box' instead of reading a configurable value from the module's global configuration.
@davesoft11

Copy link
Copy Markdown

I agree that this seems like an oversight. We have had to custom-code around this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants