[asterisk-commits] kharwell: branch kharwell/pimp_sip_media_neg r386530 - in /team/kharwell/pimp...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 25 11:15:37 CDT 2013
Author: kharwell
Date: Thu Apr 25 11:15:32 2013
New Revision: 386530
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386530
Log:
separated the creating and sending of an invite
Modified:
team/kharwell/pimp_sip_media_neg/channels/chan_gulp.c
team/kharwell/pimp_sip_media_neg/include/asterisk/res_sip_session.h
team/kharwell/pimp_sip_media_neg/res/res_sip_session.c
team/kharwell/pimp_sip_media_neg/res/res_sip_session.exports.in
Modified: team/kharwell/pimp_sip_media_neg/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_media_neg/channels/chan_gulp.c?view=diff&rev=386530&r1=386529&r2=386530
==============================================================================
--- team/kharwell/pimp_sip_media_neg/channels/chan_gulp.c (original)
+++ team/kharwell/pimp_sip_media_neg/channels/chan_gulp.c Thu Apr 25 11:15:32 2013
@@ -308,9 +308,7 @@
}
}
ast_format_cap_remove_bytype(session->req_caps, media_type);
-
- ast_parse_allow_disallow(&session->override_prefs, NULL, value, 1);
- ast_parse_allow_disallow(NULL, session->req_caps, value, 1);
+ ast_parse_allow_disallow(&session->override_prefs, session->req_caps, value, 1);
return 0;
}
@@ -1028,11 +1026,14 @@
static int call(void *data)
{
struct ast_sip_session *session = data;
-
- int res = ast_sip_session_send_invite(session);
+ pjsip_tx_data *tdata;
+
+ int res = ast_sip_session_create_invite(session, &tdata);
if (res) {
ast_queue_hangup(session->channel);
+ } else {
+ ast_sip_session_send_request(session, tdata);
}
ao2_ref(session, -1);
return res;
Modified: team/kharwell/pimp_sip_media_neg/include/asterisk/res_sip_session.h
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_media_neg/include/asterisk/res_sip_session.h?view=diff&rev=386530&r1=386529&r2=386530
==============================================================================
--- team/kharwell/pimp_sip_media_neg/include/asterisk/res_sip_session.h (original)
+++ team/kharwell/pimp_sip_media_neg/include/asterisk/res_sip_session.h Thu Apr 25 11:15:32 2013
@@ -454,11 +454,12 @@
void ast_sip_session_send_request(struct ast_sip_session *session, pjsip_tx_data *tdata);
/*!
- * \brief Creates an offer and sends an INVITE request
+ * \brief Creates an INVITE request.
*
* \param session Starting session for the INVITE
- */
-int ast_sip_session_send_invite(struct ast_sip_session *session);
+ * \param tdata The created request.
+ */
+int ast_sip_session_create_invite(struct ast_sip_session *session, pjsip_tx_data **tdata);
/*!
* \brief Send a SIP request and get called back when a response is received
Modified: team/kharwell/pimp_sip_media_neg/res/res_sip_session.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_media_neg/res/res_sip_session.c?view=diff&rev=386530&r1=386529&r2=386530
==============================================================================
--- team/kharwell/pimp_sip_media_neg/res/res_sip_session.c (original)
+++ team/kharwell/pimp_sip_media_neg/res/res_sip_session.c Thu Apr 25 11:15:32 2013
@@ -787,9 +787,8 @@
ast_sip_session_send_request_with_cb(session, tdata, NULL);
}
-int ast_sip_session_send_invite(struct ast_sip_session *session)
-{
- pjsip_tx_data *tdata;
+int ast_sip_session_create_invite(struct ast_sip_session *session, pjsip_tx_data **tdata)
+{
pjmedia_sdp_session *offer;
if (!(offer = create_local_sdp(session->inv_session, session, NULL))) {
@@ -798,10 +797,9 @@
}
pjsip_inv_set_local_sdp(session->inv_session, offer);
- if (pjsip_inv_invite(session->inv_session, &tdata) != PJ_SUCCESS) {
+ if (pjsip_inv_invite(session->inv_session, tdata) != PJ_SUCCESS) {
return -1;
}
- ast_sip_session_send_request(session, tdata);
return 0;
}
Modified: team/kharwell/pimp_sip_media_neg/res/res_sip_session.exports.in
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_media_neg/res/res_sip_session.exports.in?view=diff&rev=386530&r1=386529&r2=386530
==============================================================================
--- team/kharwell/pimp_sip_media_neg/res/res_sip_session.exports.in (original)
+++ team/kharwell/pimp_sip_media_neg/res/res_sip_session.exports.in Thu Apr 25 11:15:32 2013
@@ -12,7 +12,7 @@
LINKER_SYMBOL_PREFIXast_sip_session_refresh;
LINKER_SYMBOL_PREFIXast_sip_session_send_response;
LINKER_SYMBOL_PREFIXast_sip_session_send_request;
- LINKER_SYMBOL_PREFIXast_sip_session_send_invite;
+ LINKER_SYMBOL_PREFIXast_sip_session_create_invite;
LINKER_SYMBOL_PREFIXast_sip_session_create_outgoing;
local:
*;
More information about the asterisk-commits
mailing list