[asterisk-commits] mmichelson: branch mmichelson/caller_id r384817 - in /team/mmichelson/caller_...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 5 13:52:40 CDT 2013


Author: mmichelson
Date: Fri Apr  5 13:52:37 2013
New Revision: 384817

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384817
Log:
Formalize session supplement priorities a bit more.


Modified:
    team/mmichelson/caller_id/channels/chan_gulp.c
    team/mmichelson/caller_id/include/asterisk/res_sip_session.h
    team/mmichelson/caller_id/res/res_sip_caller_id.c

Modified: team/mmichelson/caller_id/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/caller_id/channels/chan_gulp.c?view=diff&rev=384817&r1=384816&r2=384817
==============================================================================
--- team/mmichelson/caller_id/channels/chan_gulp.c (original)
+++ team/mmichelson/caller_id/channels/chan_gulp.c Fri Apr  5 13:52:37 2013
@@ -154,7 +154,7 @@
 /*! \brief SIP session supplement structure */
 static struct ast_sip_session_supplement gulp_supplement = {
 	.method = "INVITE",
-	.priority = INT_MAX,
+	.priority = AST_SIP_SESSION_SUPPLEMENT_PRIORITY_CHANNEL,
 	.session_begin = gulp_session_begin,
 	.session_end = gulp_session_end,
 	.incoming_request = gulp_incoming_request,
@@ -165,7 +165,7 @@
 
 static struct ast_sip_session_supplement gulp_ack_supplement = {
 	.method = "ACK",
-	.priority = 0,
+	.priority = AST_SIP_SESSION_SUPPLEMENT_PRIORITY_CHANNEL,
 	.incoming_request = gulp_incoming_ack,
 };
 

Modified: team/mmichelson/caller_id/include/asterisk/res_sip_session.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/caller_id/include/asterisk/res_sip_session.h?view=diff&rev=384817&r1=384816&r2=384817
==============================================================================
--- team/mmichelson/caller_id/include/asterisk/res_sip_session.h (original)
+++ team/mmichelson/caller_id/include/asterisk/res_sip_session.h Fri Apr  5 13:52:37 2013
@@ -106,6 +106,12 @@
 typedef int (*ast_sip_session_request_creation_cb)(struct ast_sip_session *session, pjsip_tx_data *tdata);
 typedef int (*ast_sip_session_response_cb)(struct ast_sip_session *session, pjsip_rx_data *rdata);
 
+enum ast_sip_session_supplement_priority {
+	AST_SIP_SESSION_SUPPLEMENT_PRIORITY_FIRST = 0,
+	AST_SIP_SESSION_SUPPLEMENT_PRIORITY_CHANNEL = 1000000,
+	AST_SIP_SESSION_SUPPLEMENT_PRIORITY_LAST = INT_MAX,
+};
+
 /*!
  * \brief A supplement to SIP message processing
  *

Modified: team/mmichelson/caller_id/res/res_sip_caller_id.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/caller_id/res/res_sip_caller_id.c?view=diff&rev=384817&r1=384816&r2=384817
==============================================================================
--- team/mmichelson/caller_id/res/res_sip_caller_id.c (original)
+++ team/mmichelson/caller_id/res/res_sip_caller_id.c Fri Apr  5 13:52:37 2013
@@ -486,7 +486,7 @@
 
 static struct ast_sip_session_supplement caller_id_supplement = {
 	.method = "INVITE",
-	.priority = 0,
+	.priority = AST_SIP_SESSION_SUPPLEMENT_PRIORITY_CHANNEL - 1000,
 	.incoming_request = caller_id_incoming_request,
 	.incoming_response = caller_id_incoming_response,
 	.outgoing_request = caller_id_outgoing_request,




More information about the asterisk-commits mailing list