summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-03-15 21:15:16 +0000
committerBenny Prijono <bennylp@teluu.com>2007-03-15 21:15:16 +0000
commita3095ed444a54cf42b5035a66187bc48493b8e53 (patch)
treee0dec4b5952b79be72b0b1016ebbd04c0449ab27 /pjmedia
parent9e7cba424b089b419f0eef754ca2958644a90a97 (diff)
Fixed ticket #182: SDP negotiation failed when local does not specify telephone-event (thanks Esbjorn Dominique)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1070 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r--pjmedia/include/pjmedia-codec/types.h4
-rw-r--r--pjmedia/src/pjmedia/sdp_neg.c15
2 files changed, 8 insertions, 11 deletions
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
* <pjmedia/config.h>
*/
+#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