From b7476fba0e67d9fc9de79dfbf277879813f8f1b0 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 15 Mar 2007 21:09:41 +0000 Subject: Fixed ticket #179: SDP negotiation failed when local doesn't specify telephone-event (thanks Esbjörn Dominique) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/pjproject-0.5-stable@1069 74dad513-b988-da41-8d7b-12977e46ad98 --- pjmedia/include/pjmedia-codec/types.h | 4 ++++ pjmedia/src/pjmedia/sdp_neg.c | 15 ++++----------- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'pjmedia') diff --git a/pjmedia/include/pjmedia-codec/types.h b/pjmedia/include/pjmedia-codec/types.h index 2a2a0fe1..23fa8282 100644 --- a/pjmedia/include/pjmedia-codec/types.h +++ b/pjmedia/include/pjmedia-codec/types.h @@ -32,7 +32,11 @@ enum /* PJMEDIA_RTP_PT_TELEPHONE_EVENTS is declared in * */ +#if PJMEDIA_RTP_PT_TELEPHONE_EVENTS PJMEDIA_RTP_PT_START = PJMEDIA_RTP_PT_TELEPHONE_EVENTS, +#else + PJMEDIA_RTP_PT_START = 102, +#endif PJMEDIA_RTP_PT_SPEEX_NB, /**< Speex narrowband/8KHz */ PJMEDIA_RTP_PT_SPEEX_WB, /**< Speex wideband/16KHz */ diff --git a/pjmedia/src/pjmedia/sdp_neg.c b/pjmedia/src/pjmedia/sdp_neg.c index aab409e3..40918f7c 100644 --- a/pjmedia/src/pjmedia/sdp_neg.c +++ b/pjmedia/src/pjmedia/sdp_neg.c @@ -803,28 +803,21 @@ static pj_status_t match_offer(pj_pool_t *pool, } /* See if all types of offer can be matched. */ -#if 1 if (offer_has_codec && !found_matching_codec) { return PJMEDIA_SDPNEG_NOANSCODEC; } + /* If this comment is removed, negotiation will fail if remote has offered + telephone-event and local is not configured with telephone-event + if (offer_has_telephone_event && !found_matching_telephone_event) { return PJMEDIA_SDPNEG_NOANSTELEVENT; } + */ if (offer_has_other && !found_matching_other) { return PJMEDIA_SDPNEG_NOANSUNKNOWN; } -#else - PJ_TODO(FULL_MATCHING_WITH_TELEPHONE_EVENTS); - if (!found_matching_codec && - !found_matching_telephone_event && - !found_matching_other) - { - /* Some of the payload in the offer has no matching local sdp */ - return PJ_FALSE; - } -#endif /* Seems like everything is in order. * Build the answer by cloning from local media, but rearrange the payload -- cgit v1.2.3