[asterisk-commits] file: branch group/pimp_my_sip r379459 - /team/group/pimp_my_sip/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 18 12:01:30 CST 2013


Author: file
Date: Fri Jan 18 12:01:27 2013
New Revision: 379459

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379459
Log:
Fix answering of channels.

Modified:
    team/group/pimp_my_sip/channels/chan_gulp.c

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=379459&r1=379458&r2=379459
==============================================================================
--- team/group/pimp_my_sip/channels/chan_gulp.c (original)
+++ team/group/pimp_my_sip/channels/chan_gulp.c Fri Jan 18 12:01:27 2013
@@ -188,6 +188,8 @@
 
 	ast_setstate(ast, AST_STATE_UP);
 
+	pj_thread_register_check();
+
 	if ((status = pjsip_inv_answer(session->inv_session, 200, NULL, NULL, &packet)) == PJ_SUCCESS) {
 		ast_sip_session_send_response(session, packet);
 	}
@@ -243,7 +245,9 @@
 				ast_getformatname(ast_channel_writeformat(ast)));
 			return 0;
 		}
-		res = ast_rtp_instance_write(session->media.audio, frame);
+		if (session->media.audio) {
+			res = ast_rtp_instance_write(session->media.audio, frame);
+		}
 		break;
 	default:
 		ast_log(LOG_WARNING, "Can't send %d type frames with Gulp\n", frame->frametype);
@@ -505,6 +509,7 @@
 
 	ast_sip_session_send_response(session, packet);
 
+	ast_setstate(session->channel, AST_STATE_RING);
 	res = ast_pbx_start(session->channel);
 
 	switch (res) {




More information about the asterisk-commits mailing list