[asterisk-commits] file: branch group/pimp_my_sip r380160 - /team/group/pimp_my_sip/res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jan 27 07:40:19 CST 2013


Author: file
Date: Sun Jan 27 07:40:15 2013
New Revision: 380160

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=380160
Log:
Add answered elsewhere support to res_sip_rfc3326.

Modified:
    team/group/pimp_my_sip/res/res_sip_rfc3326.c

Modified: team/group/pimp_my_sip/res/res_sip_rfc3326.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/res/res_sip_rfc3326.c?view=diff&rev=380160&r1=380159&r2=380160
==============================================================================
--- team/group/pimp_my_sip/res/res_sip_rfc3326.c (original)
+++ team/group/pimp_my_sip/res/res_sip_rfc3326.c Sun Jan 27 07:40:15 2013
@@ -30,6 +30,7 @@
 #include "asterisk/res_sip.h"
 #include "asterisk/res_sip_session.h"
 #include "asterisk/module.h"
+#include "asterisk/causes.h"
 
 static void rfc3326_use_reason_header(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
 {
@@ -91,6 +92,10 @@
 
 	snprintf(buf, sizeof(buf), "Q.850;cause=%i", ast_channel_hangupcause(session->channel) & 0x7f);
 	ast_sip_add_header(tdata, "Reason", buf);
+
+	if (ast_channel_hangupcause(session->channel) == AST_CAUSE_ANSWERED_ELSEWHERE) {
+		ast_sip_add_header(tdata, "Reason", "SIP;cause=200;text=\"Call completed elsewhere\"");
+	}
 }
 
 static void rfc3326_outgoing_request(struct ast_sip_session *session, struct pjsip_tx_data *tdata)




More information about the asterisk-commits mailing list