[asterisk-commits] mmichelson: branch group/pimp_my_sip r379917 - in /team/group/pimp_my_sip: ch...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 22 13:58:45 CST 2013
Author: mmichelson
Date: Tue Jan 22 13:58:41 2013
New Revision: 379917
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379917
Log:
Create common method for sending SIP requests in a session.
With both a request and response-sending function, it means all
supplements will be visited on messages we send out.
Modified:
team/group/pimp_my_sip/channels/chan_gulp.c
team/group/pimp_my_sip/include/asterisk/res_sip_session.h
team/group/pimp_my_sip/res/res_sip_session.c
team/group/pimp_my_sip/res/res_sip_session.exports.in
Modified: team/group/pimp_my_sip/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/channels/chan_gulp.c?view=diff&rev=379917&r1=379916&r2=379917
==============================================================================
--- team/group/pimp_my_sip/channels/chan_gulp.c (original)
+++ team/group/pimp_my_sip/channels/chan_gulp.c Tue Jan 22 13:58:41 2013
@@ -389,7 +389,7 @@
return -1;
}
- pjsip_inv_send_msg(session->inv_session, packet);
+ ast_sip_session_send_request(session, packet);
return 0;
}
@@ -456,7 +456,7 @@
if (packet->msg->type == PJSIP_RESPONSE_MSG) {
ast_sip_session_send_response(session, packet);
} else {
- pjsip_inv_send_msg(session->inv_session, packet);
+ ast_sip_session_send_request(session, packet);
}
}
Modified: team/group/pimp_my_sip/include/asterisk/res_sip_session.h
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/include/asterisk/res_sip_session.h?view=diff&rev=379917&r1=379916&r2=379917
==============================================================================
--- team/group/pimp_my_sip/include/asterisk/res_sip_session.h (original)
+++ team/group/pimp_my_sip/include/asterisk/res_sip_session.h Tue Jan 22 13:58:41 2013
@@ -282,9 +282,20 @@
* This will send the SIP response specified in tdata and
* call into any registered supplements' outgoing_response callback.
*
- * \param session The session to which the current transaction belongs
+ * \param session The session on which to send the response.
* \param tdata The response to send
*/
void ast_sip_session_send_response(struct ast_sip_session *session, pjsip_tx_data *tdata);
+/*!
+ * \brief Send a SIP request
+ *
+ * This will send the SIP request specified in tdata and
+ * call into any registered supplements' outgoing_request callback.
+ *
+ * \param session The session to which to send the request
+ * \param tdata The request to send
+ */
+void ast_sip_session_send_request(struct ast_sip_session *session, pjsip_tx_data *tdata);
+
#endif /* _RES_SIP_SESSION_H */
Modified: team/group/pimp_my_sip/res/res_sip_session.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/res/res_sip_session.c?view=diff&rev=379917&r1=379916&r2=379917
==============================================================================
--- team/group/pimp_my_sip/res/res_sip_session.c (original)
+++ team/group/pimp_my_sip/res/res_sip_session.c Tue Jan 22 13:58:41 2013
@@ -312,6 +312,13 @@
void ast_sip_session_send_response(struct ast_sip_session *session, pjsip_tx_data *tdata)
{
handle_outgoing_response(session, tdata);
+ pjsip_inv_send_msg(session->inv_session, tdata);
+ return;
+}
+
+void ast_sip_session_send_request(struct ast_sip_session *session, pjsip_tx_data *tdata)
+{
+ handle_outgoing_request(session, tdata);
pjsip_inv_send_msg(session->inv_session, tdata);
return;
}
Modified: team/group/pimp_my_sip/res/res_sip_session.exports.in
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/res/res_sip_session.exports.in?view=diff&rev=379917&r1=379916&r2=379917
==============================================================================
--- team/group/pimp_my_sip/res/res_sip_session.exports.in (original)
+++ team/group/pimp_my_sip/res/res_sip_session.exports.in Tue Jan 22 13:58:41 2013
@@ -10,6 +10,7 @@
LINKER_SYMBOL_PREFIXast_sip_session_get_identity;
LINKER_SYMBOL_PREFIXast_sip_session_send_reinvite;
LINKER_SYMBOL_PREFIXast_sip_session_send_response;
+ LINKER_SYMBOL_PREFIXast_sip_session_send_request;
LINKER_SYMBOL_PREFIXast_sip_session_create_outgoing;
LINKER_SYMBOL_PREFIXpjsip_inv_*;
local:
More information about the asterisk-commits
mailing list