Module: sems Branch: master Commit: d4af76b8657ccbcecb2057712867f9dfc24e285f URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=d4af76b8657ccbcecb2057712867f9dfc24e285f
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Tue Dec 13 16:06:45 2011 +0100 trigger exception when no compatible payload has been found. --- core/AmSession.cpp | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/core/AmSession.cpp b/core/AmSession.cpp index 2fac67f..bc06a98 100644 --- a/core/AmSession.cpp +++ b/core/AmSession.cpp @@ -998,6 +998,13 @@ bool AmSession::getSdpAnswer(const AmSdp& offer, AmSdp& answer) && (m_it->port != 0) ) { RTPStream()->getSdpAnswer(*m_it,answer_media); + if(answer_media.payloads.empty() || + ((answer_media.payloads.size() == 1) && + (answer_media.payloads[0].encoding_name != "telephone-event")) + ){ + // no compatible media found + throw Exception(488,"no compatible payload"); + } audio_1st_stream = false; } else { _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
