[Asterisk-cvs] asterisk/channels chan_local.c,1.18,1.19
markster at lists.digium.com
markster at lists.digium.com
Tue Oct 7 21:10:45 CDT 2003
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv24107/channels
Modified Files:
chan_local.c
Log Message:
Add "n" option to allow disabling of masq optimization
Index: chan_local.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_local.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- chan_local.c 19 Aug 2003 19:36:52 -0000 1.18
+++ chan_local.c 8 Oct 2003 02:11:56 -0000 1.19
@@ -65,6 +65,7 @@
int cancelqueue; /* Cancel queue */
int alreadymasqed; /* Already masqueraded */
int launchedpbx; /* Did we launch the PBX */
+ int nooptimization;
struct ast_channel *owner; /* Master Channel */
struct ast_channel *chan; /* Outbound channel */
struct local_pvt *next; /* Next entity */
@@ -131,7 +132,7 @@
static void check_bridge(struct local_pvt *p, int isoutbound)
{
- if (p->alreadymasqed)
+ if (p->alreadymasqed || p->nooptimization)
return;
if (isoutbound && p->chan && p->chan->bridge && p->owner) {
/* Masquerade bridged channel into owner */
@@ -326,6 +327,7 @@
{
struct local_pvt *tmp;
char *c;
+ char *opts;
tmp = malloc(sizeof(struct local_pvt));
if (tmp) {
memset(tmp, 0, sizeof(struct local_pvt));
@@ -338,6 +340,13 @@
strncpy(tmp->context, c, sizeof(tmp->context) - 1);
} else
strncpy(tmp->context, "default", sizeof(tmp->context) - 1);
+ opts = strchr(tmp->context, '/');
+ if (opts) {
+ *opts='\0';
+ opts++;
+ if (strchr(opts, 'n'))
+ tmp->nooptimization = 1;
+ }
tmp->reqformat = format;
if (!ast_exists_extension(NULL, tmp->context, tmp->exten, 1, NULL)) {
ast_log(LOG_NOTICE, "No such extension/context %s@%s creating local channel\n", tmp->context, tmp->exten);
More information about the svn-commits
mailing list