[asterisk-commits] dvossel: branch dvossel/iax2immediate_trunk r173760 - /team/dvossel/iax2immed...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Feb 5 16:03:17 CST 2009
Author: dvossel
Date: Thu Feb 5 16:03:16 2009
New Revision: 173760
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=173760
Log:
iax2 immediate patch applied
Modified:
team/dvossel/iax2immediate_trunk/channels/chan_iax2.c
Modified: team/dvossel/iax2immediate_trunk/channels/chan_iax2.c
URL: http://svn.digium.com/svn-view/asterisk/team/dvossel/iax2immediate_trunk/channels/chan_iax2.c?view=diff&rev=173760&r1=173759&r2=173760
==============================================================================
--- team/dvossel/iax2immediate_trunk/channels/chan_iax2.c (original)
+++ team/dvossel/iax2immediate_trunk/channels/chan_iax2.c Thu Feb 5 16:03:16 2009
@@ -377,8 +377,9 @@
IAX_DELAYPBXSTART = (1 << 25), /*!< Don't start a PBX on the channel until the peer sends us a
response, so that we've achieved a three-way handshake with
them before sending voice or anything else*/
- IAX_ALLOWFWDOWNLOAD = (1 << 26), /*!< Allow the FWDOWNL command? */
- IAX_NOKEYROTATE = (1 << 27), /*!< Disable key rotation with encryption */
+ IAX_ALLOWFWDOWNLOAD = (1 << 26), /*!< Allow the FWDOWNL command? */
+ IAX_NOKEYROTATE = (1 << 27), /*!< Disable key rotation with encryption */
+ IAX_IMMEDIATE = (1 << 28), /*!< Allow immediate off-hook to extension s */
};
static int global_rtautoclear = 120;
@@ -6228,6 +6229,7 @@
ast_set_flag(iaxs[callno], IAX_MAXAUTHREQ);
iaxs[callno]->prefs = user->prefs;
ast_copy_flags(iaxs[callno], user, IAX_CODEC_USER_FIRST);
+ ast_copy_flags(iaxs[callno], user, IAX_IMMEDIATE);
ast_copy_flags(iaxs[callno], user, IAX_CODEC_NOPREFS);
ast_copy_flags(iaxs[callno], user, IAX_CODEC_NOCAP);
ast_copy_flags(iaxs[callno], user, IAX_NOKEYROTATE);
@@ -9472,10 +9474,13 @@
ast_set_flag(&iaxs[fr->callno]->state, IAX_STATE_TBD);
/* If this is a TBD call, we're ready but now what... */
ast_verb(3, "Accepted AUTHENTICATED TBD call from %s\n", ast_inet_ntoa(sin.sin_addr));
+ if (ast_test_flag(iaxs[fr->callno], IAX_IMMEDIATE)) goto immediatedial;
}
}
}
break;
+ immediatedial:
+
case IAX_COMMAND_DIAL:
if (ast_test_flag(&iaxs[fr->callno]->state, IAX_STATE_TBD)) {
ast_clear_flag(&iaxs[fr->callno]->state, IAX_STATE_TBD);
@@ -11020,6 +11025,8 @@
ast_set_flag(user, IAX_CODEC_NOCAP);
ast_set_flag(user, IAX_CODEC_NOPREFS);
}
+ } else if (!strcasecmp(v->name, "immediate")) {
+ ast_set2_flag(user, ast_true(v->value), IAX_IMMEDIATE);
} else if (!strcasecmp(v->name, "jitterbuffer")) {
ast_set2_flag(user, ast_true(v->value), IAX_USEJITTERBUF);
} else if (!strcasecmp(v->name, "forcejitterbuffer")) {
More information about the asterisk-commits
mailing list