[asterisk-commits] file: branch file/gulp_transfer r387622 - in /team/file/gulp_transfer: channe...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 3 15:44:43 CDT 2013
Author: file
Date: Fri May 3 15:44:41 2013
New Revision: 387622
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387622
Log:
Whoops, cause answer to trigger a notification and also add a quick BYE deferral. Working happily now!
Modified:
team/file/gulp_transfer/channels/chan_gulp.c
team/file/gulp_transfer/include/asterisk/res_sip_session.h
team/file/gulp_transfer/res/res_sip_refer.c
Modified: team/file/gulp_transfer/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/file/gulp_transfer/channels/chan_gulp.c?view=diff&rev=387622&r1=387621&r2=387622
==============================================================================
--- team/file/gulp_transfer/channels/chan_gulp.c (original)
+++ team/file/gulp_transfer/channels/chan_gulp.c Fri May 3 15:44:41 2013
@@ -1035,7 +1035,8 @@
struct ast_sip_session *session = pvt->session;
int cause = h_data->cause;
- if (((status = pjsip_inv_end_session(session->inv_session, cause ? cause : 603, NULL, &packet)) == PJ_SUCCESS) && packet) {
+ if (!session->defer_terminate &&
+ ((status = pjsip_inv_end_session(session->inv_session, cause ? cause : 603, NULL, &packet)) == PJ_SUCCESS) && packet) {
if (packet->msg->type == PJSIP_RESPONSE_MSG) {
ast_sip_session_send_response(session, packet);
} else {
Modified: team/file/gulp_transfer/include/asterisk/res_sip_session.h
URL: http://svnview.digium.com/svn/asterisk/team/file/gulp_transfer/include/asterisk/res_sip_session.h?view=diff&rev=387622&r1=387621&r2=387622
==============================================================================
--- team/file/gulp_transfer/include/asterisk/res_sip_session.h (original)
+++ team/file/gulp_transfer/include/asterisk/res_sip_session.h Fri May 3 15:44:41 2013
@@ -101,6 +101,8 @@
struct ast_party_id id;
/* Requested capabilities */
struct ast_format_cap *req_caps;
+ /* Whether the termination of the session should be deferred */
+ unsigned int defer_terminate:1;
};
typedef int (*ast_sip_session_request_creation_cb)(struct ast_sip_session *session, pjsip_tx_data *tdata);
Modified: team/file/gulp_transfer/res/res_sip_refer.c
URL: http://svnview.digium.com/svn/asterisk/team/file/gulp_transfer/res/res_sip_refer.c?view=diff&rev=387622&r1=387621&r2=387622
==============================================================================
--- team/file/gulp_transfer/res/res_sip_refer.c (original)
+++ team/file/gulp_transfer/res/res_sip_refer.c Fri May 3 15:44:41 2013
@@ -158,6 +158,8 @@
notification = refer_progress_notification_alloc(progress, 183, PJSIP_EVSUB_STATE_ACTIVE);
} else if (f->subclass.integer == AST_CONTROL_PROCEEDING) {
notification = refer_progress_notification_alloc(progress, 100, PJSIP_EVSUB_STATE_ACTIVE);
+ } else if (f->subclass.integer == AST_CONTROL_ANSWER) {
+ notification = refer_progress_notification_alloc(progress, 200, PJSIP_EVSUB_STATE_TERMINATED);
}
}
@@ -383,6 +385,7 @@
}
}
+ session->defer_terminate = 1;
return 0;
}
More information about the asterisk-commits
mailing list