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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 16 11:44:35 CST 2013


Author: file
Date: Wed Jan 16 11:44:31 2013
New Revision: 379227

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379227
Log:
Begin implementing gulp_request!

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=379227&r1=379226&r2=379227
==============================================================================
--- team/group/pimp_my_sip/channels/chan_gulp.c (original)
+++ team/group/pimp_my_sip/channels/chan_gulp.c Wed Jan 16 11:44:31 2013
@@ -436,7 +436,16 @@
 /*! \brief Function called by core to create a new outgoing Gulp session */
 static struct ast_channel *gulp_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
 {
-	return NULL;
+	struct ast_sip_session *session = NULL;
+
+	/* TODO: Add call which sets up session, dialog, UAC, etc etc */
+
+	if (!(session->channel = gulp_new(session, AST_STATE_DOWN, NULL, NULL, requestor ? ast_channel_linkedid(requestor) : NULL, NULL))) {
+		/* Session needs to be terminated prematurely */
+		return NULL;
+	}
+
+	return session->channel;
 }
 
 /*! \brief Function called by core to send text on Gulp session */




More information about the asterisk-commits mailing list