mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 03:48:02 +00:00
Got rid of un-necessary 'c' and 'd' options in app_dial.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -62,8 +62,6 @@ static char *descrip =
|
|||||||
" 'T' -- to allow the calling user to transfer the call.\n"
|
" 'T' -- to allow the calling user to transfer the call.\n"
|
||||||
" 'r' -- indicate ringing to the calling party, pass no audio until answered.\n"
|
" 'r' -- indicate ringing to the calling party, pass no audio until answered.\n"
|
||||||
" 'm' -- provide hold music to the calling party until answered.\n"
|
" 'm' -- provide hold music to the calling party until answered.\n"
|
||||||
" 'd' -- data-quality (modem) call (minimum delay).\n"
|
|
||||||
" 'c' -- clear-channel data call (PRI-PRI only).\n"
|
|
||||||
" 'H' -- allow caller to hang up by hitting *.\n"
|
" 'H' -- allow caller to hang up by hitting *.\n"
|
||||||
" 'C' -- reset call detail record for this call.\n"
|
" 'C' -- reset call detail record for this call.\n"
|
||||||
" 'P[(x)]' -- privacy mode, using 'x' as database if provided.\n"
|
" 'P[(x)]' -- privacy mode, using 'x' as database if provided.\n"
|
||||||
@@ -85,7 +83,6 @@ struct localuser {
|
|||||||
int allowredirect_out;
|
int allowredirect_out;
|
||||||
int ringbackonly;
|
int ringbackonly;
|
||||||
int musiconhold;
|
int musiconhold;
|
||||||
int dataquality;
|
|
||||||
int allowdisconnect;
|
int allowdisconnect;
|
||||||
struct localuser *next;
|
struct localuser *next;
|
||||||
};
|
};
|
||||||
@@ -350,7 +347,6 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|||||||
int privacy=0;
|
int privacy=0;
|
||||||
int announce=0;
|
int announce=0;
|
||||||
int resetcdr=0;
|
int resetcdr=0;
|
||||||
int clearchannel=0;
|
|
||||||
int cnt=0;
|
int cnt=0;
|
||||||
char numsubst[AST_MAX_EXTENSION];
|
char numsubst[AST_MAX_EXTENSION];
|
||||||
char restofit[AST_MAX_EXTENSION];
|
char restofit[AST_MAX_EXTENSION];
|
||||||
@@ -490,16 +486,9 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|||||||
if (strchr(transfer, 'm'))
|
if (strchr(transfer, 'm'))
|
||||||
tmp->musiconhold = 1;
|
tmp->musiconhold = 1;
|
||||||
else tmp->musiconhold = 0;
|
else tmp->musiconhold = 0;
|
||||||
if (strchr(transfer, 'd'))
|
|
||||||
tmp->dataquality = 1;
|
|
||||||
else tmp->dataquality = 0;
|
|
||||||
if (strchr(transfer, 'H'))
|
if (strchr(transfer, 'H'))
|
||||||
allowdisconnect = tmp->allowdisconnect = 1;
|
allowdisconnect = tmp->allowdisconnect = 1;
|
||||||
else allowdisconnect = tmp->allowdisconnect = 0;
|
else allowdisconnect = tmp->allowdisconnect = 0;
|
||||||
if (strchr(transfer, 'c'))
|
|
||||||
clearchannel = 1;
|
|
||||||
else
|
|
||||||
clearchannel = 0;
|
|
||||||
if(strchr(transfer, 'g'))
|
if(strchr(transfer, 'g'))
|
||||||
go_on=1;
|
go_on=1;
|
||||||
}
|
}
|
||||||
@@ -647,18 +636,6 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|||||||
/* Ah ha! Someone answered within the desired timeframe. Of course after this
|
/* Ah ha! Someone answered within the desired timeframe. Of course after this
|
||||||
we will always return with -1 so that it is hung up properly after the
|
we will always return with -1 so that it is hung up properly after the
|
||||||
conversation. */
|
conversation. */
|
||||||
if (!strcmp(chan->type,"Zap"))
|
|
||||||
{
|
|
||||||
int x = 2;
|
|
||||||
if (tmp->dataquality || clearchannel) x = 0;
|
|
||||||
ast_channel_setoption(chan,AST_OPTION_TONE_VERIFY,&x,sizeof(char),0);
|
|
||||||
}
|
|
||||||
if (!strcmp(peer->type,"Zap"))
|
|
||||||
{
|
|
||||||
int x = 2;
|
|
||||||
if (tmp->dataquality || clearchannel) x = 0;
|
|
||||||
ast_channel_setoption(peer,AST_OPTION_TONE_VERIFY,&x,sizeof(char),0);
|
|
||||||
}
|
|
||||||
hanguptree(outgoing, peer);
|
hanguptree(outgoing, peer);
|
||||||
outgoing = NULL;
|
outgoing = NULL;
|
||||||
/* If appropriate, log that we have a destination channel */
|
/* If appropriate, log that we have a destination channel */
|
||||||
@@ -680,12 +657,6 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|||||||
ast_log(LOG_DEBUG, "app_dial: sendurl=%s.\n", url);
|
ast_log(LOG_DEBUG, "app_dial: sendurl=%s.\n", url);
|
||||||
ast_channel_sendurl( peer, url );
|
ast_channel_sendurl( peer, url );
|
||||||
} /* /JDG */
|
} /* /JDG */
|
||||||
if (clearchannel)
|
|
||||||
{
|
|
||||||
int x = 0;
|
|
||||||
ast_channel_setoption(chan,AST_OPTION_AUDIO_MODE,&x,sizeof(char),0);
|
|
||||||
ast_channel_setoption(peer,AST_OPTION_AUDIO_MODE,&x,sizeof(char),0);
|
|
||||||
}
|
|
||||||
if (announce && announcemsg)
|
if (announce && announcemsg)
|
||||||
{
|
{
|
||||||
int res2;
|
int res2;
|
||||||
@@ -699,13 +670,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|||||||
// Ok, done. stop autoservice
|
// Ok, done. stop autoservice
|
||||||
res2 = ast_autoservice_stop(chan);
|
res2 = ast_autoservice_stop(chan);
|
||||||
}
|
}
|
||||||
res = ast_bridge_call(chan, peer, allowredir_in, allowredir_out, allowdisconnect | clearchannel);
|
res = ast_bridge_call(chan, peer, allowredir_in, allowredir_out, allowdisconnect);
|
||||||
if (clearchannel)
|
|
||||||
{
|
|
||||||
int x = 1;
|
|
||||||
ast_channel_setoption(chan,AST_OPTION_AUDIO_MODE,&x,sizeof(char),0);
|
|
||||||
ast_channel_setoption(peer,AST_OPTION_AUDIO_MODE,&x,sizeof(char),0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (res != AST_PBX_NO_HANGUP_PEER)
|
if (res != AST_PBX_NO_HANGUP_PEER)
|
||||||
ast_hangup(peer);
|
ast_hangup(peer);
|
||||||
|
|||||||
Reference in New Issue
Block a user