summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-03-15 21:09:41 +0000
committerBenny Prijono <bennylp@teluu.com>2007-03-15 21:09:41 +0000
commitb7476fba0e67d9fc9de79dfbf277879813f8f1b0 (patch)
tree17379bb90f3fdf07ef8e149c5baaa185993f2f8f
parentcebf82aaa6a0bd5b77849efddc3d28b97322987e (diff)
Fixed ticket #179: SDP negotiation failed when local doesn't specify telephone-event (thanks Esbjörn Dominique)
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/pjproject-0.5-stable@1069 74dad513-b988-da41-8d7b-12977e46ad98
-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