[asterisk-commits] mmichelson: branch mmichelson/direct_media r382631 - /team/mmichelson/direct_...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Mar 7 13:22:15 CST 2013
Author: mmichelson
Date: Thu Mar 7 13:22:12 2013
New Revision: 382631
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382631
Log:
Destroy sessions if a failure response is received on a reinvite.
Tested and all call legs were hung up as expected.
Modified:
team/mmichelson/direct_media/res/res_sip_session.c
Modified: team/mmichelson/direct_media/res/res_sip_session.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/direct_media/res/res_sip_session.c?view=diff&rev=382631&r1=382630&r2=382631
==============================================================================
--- team/mmichelson/direct_media/res/res_sip_session.c (original)
+++ team/mmichelson/direct_media/res/res_sip_session.c Thu Mar 7 13:22:12 2013
@@ -1060,8 +1060,12 @@
/* This means we got a non 2XX final response to our outgoing INVITE */
if (tsx->status_code == PJSIP_SC_REQUEST_PENDING) {
reschedule_reinvite(session);
+ } else {
+ /* Other failures result in destroying the session. */
+ pjsip_tx_data *tdata;
+ pjsip_inv_end_session(inv, 500, NULL, &tdata);
+ ast_sip_session_send_request(session, tdata);
}
- ast_log(LOG_NOTICE, "Hey, we got response %d for our INVITE\n", tsx->status_code);
}
}
}
More information about the asterisk-commits
mailing list