[asterisk-commits] file: branch group/pimp_my_sip r379118 - /team/group/pimp_my_sip/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 15 11:02:46 CST 2013
Author: file
Date: Tue Jan 15 11:02:42 2013
New Revision: 379118
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379118
Log:
I think people would like to be able to call out, so here is a gulp_call.
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=379118&r1=379117&r2=379118
==============================================================================
--- team/group/pimp_my_sip/channels/chan_gulp.c (original)
+++ team/group/pimp_my_sip/channels/chan_gulp.c Tue Jan 15 11:02:42 2013
@@ -160,7 +160,7 @@
/*! \brief Function called by core to change the underlying owner channel */
static int gulp_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
{
- struct ast_sip_session *session = ast_channel_tech_pvt(ast);
+ struct ast_sip_session *session = ast_channel_tech_pvt(newchan);
if (session->channel != oldchan) {
return -1;
@@ -267,7 +267,16 @@
/*! \brief Function called by core to actually start calling a remote party */
static int gulp_call(struct ast_channel *ast, const char *dest, int timeout)
{
- return -1;
+ struct ast_sip_session *session = ast_channel_tech_pvt(ast);
+ pjsip_tx_data *packet;
+
+ if (pjsip_inv_invite(session->inv_session, &packet) != PJ_SUCCESS) {
+ return -1;
+ }
+
+ pjsip_inv_send_msg(session->inv_session, packet);
+
+ return 0;
}
/*! \brief Internal function which translates from Asterisk cause codes to SIP response codes */
More information about the asterisk-commits
mailing list