[asterisk-commits] file: branch file/pimp_sip_media r380917 - /team/file/pimp_sip_media/res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Feb 5 16:05:02 CST 2013
Author: file
Date: Tue Feb 5 16:04:59 2013
New Revision: 380917
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=380917
Log:
When SDP negotiation fails hangup the channel.
Modified:
team/file/pimp_sip_media/res/res_sip_session.c
Modified: team/file/pimp_sip_media/res/res_sip_session.c
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_media/res/res_sip_session.c?view=diff&rev=380917&r1=380916&r2=380917
==============================================================================
--- team/file/pimp_sip_media/res/res_sip_session.c (original)
+++ team/file/pimp_sip_media/res/res_sip_session.c Tue Feb 5 16:04:59 2013
@@ -38,6 +38,7 @@
#include "asterisk/lock.h"
#include "asterisk/uuid.h"
#include "asterisk/pbx.h"
+#include "asterisk/causes.h"
#define SDP_HANDLER_BUCKETS 11
@@ -1139,6 +1140,14 @@
struct ast_sip_session *session = inv->mod_data[session_module.id];
const pjmedia_sdp_session *remote;
+ if (status != PJ_SUCCESS) {
+ if (session->channel) {
+ ast_channel_hangupcause_set(session->channel, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL);
+ ast_queue_hangup(session->channel);
+ }
+ return;
+ }
+
if (pjmedia_sdp_neg_get_active_remote(inv->neg, &remote) == PJ_SUCCESS) {
handle_negotiated_sdp(session, remote);
}
More information about the asterisk-commits
mailing list