Opened 8 years ago

Closed 8 years ago

#1966 closed defect (fixed)

IPv6 media failed if only one of the party uses ICE

Reported by: ming Owned by: bennylp
Priority: normal Milestone: release-2.7
Component: pjsua-lib Version: trunk
Keywords: sipit32 Cc:
Backport to 1.x milestone: Backported: no

Description (last modified by ming)

Steps to reproduce the problem with pjsua:

  1. Set ipv6_media_use = PJSUA_IPV6_ENABLED
  2. Start 2 pjsua, pjsua A use --use-ice, pjsua B doesn't.
  3. Make call (from A to B or B to A)

After starting and stopping ICE, pjsua will eventually answer with 488 (IPv6 media will work fine if both disable ICE or both enable ICE).

Log snippet:

12:28:57.443        icetp00  Stopping ICE, reason=No ICE found in SDP offer
12:28:57.443        icetp00  Destroying ICE session 0x7fd2d485ae28
12:28:57.443   pjsua_call.c  Answering call 0: code=200
12:28:57.443  pjsua_media.c  ...Call 0: updating media..
12:28:57.443  pjsua_media.c  ....pjmedia_stream_info_from_sdp() failed for call_id 0 media 0: Unsupported address family (PJ_EAFNOTSUP)

Analysis:

1. In pjsua_media_channel_create_sdp():
* pjmedia_transport_get_info(call_med->tp, &tpinfo);
 - in transport_ice.c: transport_get_info() will set:
 - info->sock_info.rtp_addr_name -> pj_ice_strans_get_def_cand()-> pj_ice_strans_get_valid_pair(), which is IP4 address
* pjmedia_endpt_create_audio_sdp() will create media with IP4 conn

2. In pjsua_media_channel_update():
* pjmedia_stream_info_from_sdp() will fail:
    /* Local and remote address family must match, except when ICE is used
     * by both sides (see also ticket #1952).
     */
    if (local_af != rem_af) {
....
        return PJ_EAFNOTSUP;
    }

Change History (2)

comment:1 Changed 8 years ago by ming

  • Description modified (diff)
  • Summary changed from IPv6 media failed if ICE is enabled to IPv6 media failed if only one of the party uses ICE

comment:2 Changed 8 years ago by ming

  • Resolution set to fixed
  • Status changed from new to closed

In 5562:

Fixed #1966:

  • Add option to specify default address family in ICE default candidate
  • As answerer, match the address family in the SDP offer if possible.
Note: See TracTickets for help on using tickets.