[asterisk-commits] russell: branch 1.6.0 r243483 - in /branches/1.6.0: ./ channels/ funcs/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 27 11:35:41 CST 2010
Author: russell
Date: Wed Jan 27 11:35:36 2010
New Revision: 243483
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=243483
Log:
Merged revisions 243482 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r243482 | russell | 2010-01-27 11:32:07 -0600 (Wed, 27 Jan 2010) | 13 lines
Fix the ability to specify an OSP token for an outbound IAX2 call.
When this patch was originally submitted, the code allowed for the token to be
set via a channel variable. I decided that a cleaner approach would be to
integrate it into the CHANNEL() function. Unfortunately, that is not a suitable
approach. It's not possible to get the value set on the channel soon enough
using that method. So, go back to the simple channel variable method.
(closes issue #16711)
Reported by: homesick
Patches:
iax-svn.diff uploaded by homesick (license 91)
........
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/channels/chan_iax2.c
branches/1.6.0/funcs/func_channel.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/channels/chan_iax2.c?view=diff&rev=243483&r1=243482&r2=243483
==============================================================================
--- branches/1.6.0/channels/chan_iax2.c (original)
+++ branches/1.6.0/channels/chan_iax2.c Wed Jan 27 11:35:36 2010
@@ -1018,7 +1018,6 @@
static void iax2_free_variable_datastore(void *);
static int acf_channel_read(struct ast_channel *chan, const char *funcname, char *preparse, char *buf, size_t buflen);
-static int acf_channel_write(struct ast_channel *chan, const char *function, char *data, const char *value);
static int decode_frame(ast_aes_decrypt_key *dcx, struct ast_iax2_full_hdr *fh, struct ast_frame *f, int *datalen);
static int encrypt_frame(ast_aes_encrypt_key *ecx, struct ast_iax2_full_hdr *fh, unsigned char *poo, int *datalen);
static void build_ecx_key(const unsigned char *digest, struct chan_iax2_pvt *pvt);
@@ -1051,7 +1050,6 @@
.transfer = iax2_transfer,
.fixup = iax2_fixup,
.func_channel_read = acf_channel_read,
- .func_channel_write = acf_channel_write,
};
static void mwi_event_cb(const struct ast_event *event, void *userdata)
@@ -4759,8 +4757,8 @@
iaxs[callno]->initid = iax2_sched_add(sched, autokill * 2, auto_congest, CALLNO_TO_PTR(callno));
}
- /* Check if there is an OSP token set by IAXCHANINFO function */
- osp_token_ptr = iaxs[callno]->osptoken;
+ /* Check if there is an OSP token */
+ osp_token_ptr = pbx_builtin_getvar_helper(c, "IAX2OSPTOKEN");
if (!ast_strlen_zero(osp_token_ptr)) {
if ((osp_token_length = strlen(osp_token_ptr)) <= IAX_MAX_OSPTOKEN_SIZE) {
osp_block_index = 0;
@@ -13161,34 +13159,6 @@
"\n"
};
-static int acf_channel_write(struct ast_channel *chan, const char *function, char *args, const char *value)
-{
- struct chan_iax2_pvt *pvt;
- unsigned int callno;
- int res = 0;
-
- if (!chan || chan->tech != &iax2_tech) {
- ast_log(LOG_ERROR, "This function requires a valid IAX2 channel\n");
- return -1;
- }
-
- callno = PTR_TO_CALLNO(chan->tech_pvt);
- ast_mutex_lock(&iaxsl[callno]);
- if (!(pvt = iaxs[callno])) {
- ast_mutex_unlock(&iaxsl[callno]);
- return -1;
- }
-
- if (!strcasecmp(args, "osptoken"))
- ast_string_field_set(pvt, osptoken, value);
- else
- res = -1;
-
- ast_mutex_unlock(&iaxsl[callno]);
-
- return res;
-}
-
static int acf_channel_read(struct ast_channel *chan, const char *funcname, char *args, char *buf, size_t buflen)
{
struct chan_iax2_pvt *pvt;
Modified: branches/1.6.0/funcs/func_channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/funcs/func_channel.c?view=diff&rev=243483&r1=243482&r2=243483
==============================================================================
--- branches/1.6.0/funcs/func_channel.c (original)
+++ branches/1.6.0/funcs/func_channel.c Wed Jan 27 11:35:36 2010
@@ -207,9 +207,6 @@
" audio Get audio destination\n"
" video Get video destination\n"
"\n"
- "chan_iax2 provides the following additional options:\n"
- "R/W osptoken Get or set the OSP token information for a call\n"
- "\n"
"Additional items may be available from the channel driver providing\n"
"the channel; see its documentation for details.\n"
"\n"
More information about the asterisk-commits
mailing list