Merge Russell's formatting patch (bug #3838)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5234 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
2b84c4638e
commit
4a7019a16a
16
app.c
16
app.c
|
@ -58,9 +58,9 @@ int ast_app_dtget(struct ast_channel *chan, const char *context, char *collect,
|
||||||
timeout = 5;
|
timeout = 5;
|
||||||
|
|
||||||
ts = ast_get_indication_tone(chan->zone,"dial");
|
ts = ast_get_indication_tone(chan->zone,"dial");
|
||||||
if (ts && ts->data[0]) {
|
if (ts && ts->data[0])
|
||||||
res = ast_playtones_start(chan, 0, ts->data, 0);
|
res = ast_playtones_start(chan, 0, ts->data, 0);
|
||||||
} else
|
else
|
||||||
ast_log(LOG_NOTICE,"Huh....? no dial for indications?\n");
|
ast_log(LOG_NOTICE,"Huh....? no dial for indications?\n");
|
||||||
|
|
||||||
for (x = strlen(collect); strlen(collect) < maxlen; ) {
|
for (x = strlen(collect); strlen(collect) < maxlen; ) {
|
||||||
|
@ -105,8 +105,10 @@ int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int maxlen, in
|
||||||
fto = c->pbx ? c->pbx->rtimeout * 1000 : 6000;
|
fto = c->pbx ? c->pbx->rtimeout * 1000 : 6000;
|
||||||
to = c->pbx ? c->pbx->dtimeout * 1000 : 2000;
|
to = c->pbx ? c->pbx->dtimeout * 1000 : 2000;
|
||||||
|
|
||||||
if (timeout > 0) fto = to = timeout;
|
if (timeout > 0)
|
||||||
if (timeout < 0) fto = to = 1000000000;
|
fto = to = timeout;
|
||||||
|
if (timeout < 0)
|
||||||
|
fto = to = 1000000000;
|
||||||
res = ast_readstring(c, s, maxlen, to, fto, "#");
|
res = ast_readstring(c, s, maxlen, to, fto, "#");
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -122,8 +124,10 @@ int ast_app_getdata_full(struct ast_channel *c, char *prompt, char *s, int maxle
|
||||||
}
|
}
|
||||||
fto = 6000;
|
fto = 6000;
|
||||||
to = 2000;
|
to = 2000;
|
||||||
if (timeout > 0) fto = to = timeout;
|
if (timeout > 0)
|
||||||
if (timeout < 0) fto = to = 1000000000;
|
fto = to = timeout;
|
||||||
|
if (timeout < 0)
|
||||||
|
fto = to = 1000000000;
|
||||||
res = ast_readstring_full(c, s, maxlen, to, fto, "#", audiofd, ctrlfd);
|
res = ast_readstring_full(c, s, maxlen, to, fto, "#", audiofd, ctrlfd);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ static char *descrip =
|
||||||
" or 'noanswer' to read digits even if the line is not up.\n"
|
" or 'noanswer' to read digits even if the line is not up.\n"
|
||||||
" attempts -- if greater than 1, that many attempts will be made in the \n"
|
" attempts -- if greater than 1, that many attempts will be made in the \n"
|
||||||
" event no data is entered.\n"
|
" event no data is entered.\n"
|
||||||
" timeout -- if greater than 0, that value will override the default timeoft.\n\n"
|
" timeout -- if greater than 0, that value will override the default timeout.\n\n"
|
||||||
"Returns -1 on hangup or error and 0 otherwise.\n";
|
"Returns -1 on hangup or error and 0 otherwise.\n";
|
||||||
|
|
||||||
STANDARD_LOCAL_USER;
|
STANDARD_LOCAL_USER;
|
||||||
|
|
4
astmm.c
4
astmm.c
|
@ -3,9 +3,9 @@
|
||||||
*
|
*
|
||||||
* Channel Variables
|
* Channel Variables
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002, Mark Spencer
|
* Copyright (C) 2002-2005, Mark Spencer
|
||||||
*
|
*
|
||||||
* Mark Spencer <markster@linux-support.net>
|
* Mark Spencer <markster@digium.com>
|
||||||
*
|
*
|
||||||
* This program is free software, distributed under the terms of
|
* This program is free software, distributed under the terms of
|
||||||
* the GNU General Public License
|
* the GNU General Public License
|
||||||
|
|
3
cli.c
3
cli.c
|
@ -377,7 +377,7 @@ static int handle_modlist(int fd, int argc, char *argv[])
|
||||||
if (argc == 3)
|
if (argc == 3)
|
||||||
return RESULT_SHOWUSAGE;
|
return RESULT_SHOWUSAGE;
|
||||||
else if (argc >= 4) {
|
else if (argc >= 4) {
|
||||||
if ( strcmp(argv[2],"like") )
|
if (strcmp(argv[2],"like"))
|
||||||
return RESULT_SHOWUSAGE;
|
return RESULT_SHOWUSAGE;
|
||||||
like = argv[3];
|
like = argv[3];
|
||||||
}
|
}
|
||||||
|
@ -732,6 +732,7 @@ static int handle_showchan(int fd, int argc, char *argv[])
|
||||||
c->context, c->exten, c->priority, c->callgroup, c->pickupgroup, ( c->appl ? c->appl : "(N/A)" ),
|
c->context, c->exten, c->priority, c->callgroup, c->pickupgroup, ( c->appl ? c->appl : "(N/A)" ),
|
||||||
( c-> data ? (!ast_strlen_zero(c->data) ? c->data : "(Empty)") : "(None)"),
|
( c-> data ? (!ast_strlen_zero(c->data) ? c->data : "(Empty)") : "(None)"),
|
||||||
(ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)"));
|
(ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)"));
|
||||||
|
|
||||||
if(pbx_builtin_serialize_variables(c,buf,sizeof(buf)))
|
if(pbx_builtin_serialize_variables(c,buf,sizeof(buf)))
|
||||||
ast_cli(fd," Variables:\n%s\n",buf);
|
ast_cli(fd," Variables:\n%s\n",buf);
|
||||||
if(c->cdr && ast_cdr_serialize_variables(c->cdr,buf, sizeof(buf), '=', '\n', 1))
|
if(c->cdr && ast_cdr_serialize_variables(c->cdr,buf, sizeof(buf), '=', '\n', 1))
|
||||||
|
|
|
@ -330,20 +330,20 @@ ${UNIQUEID} * Current call unique identifier
|
||||||
|
|
||||||
Various application variables
|
Various application variables
|
||||||
-----------------------------
|
-----------------------------
|
||||||
${CURL} Resulting page content for curl()
|
${CURL} * Resulting page content for curl()
|
||||||
${ENUM} Result of application EnumLookup
|
${ENUM} * Result of application EnumLookup
|
||||||
${EXITCONTEXT} Context to exit to in IVR menu (app background())
|
${EXITCONTEXT} Context to exit to in IVR menu (app background())
|
||||||
or in the RetryDial() application
|
or in the RetryDial() application
|
||||||
${GROUPCOUNT} Result from groupcount()
|
${GROUPCOUNT} * Result from groupcount()
|
||||||
${MONITOR} Set to "TRUE" if the channel is/has been monitored (app monitor())
|
${MONITOR} * Set to "TRUE" if the channel is/has been monitored (app monitor())
|
||||||
${MONITOR_EXEC} Application to execute after monitoring a call
|
${MONITOR_EXEC} Application to execute after monitoring a call
|
||||||
${MONITOR_EXEC_ARGS} Arguments to application
|
${MONITOR_EXEC_ARGS} Arguments to application
|
||||||
${MONITOR_FILENAME} File for monitoring (recording) calls in queue
|
${MONITOR_FILENAME} File for monitoring (recording) calls in queue
|
||||||
${QUEUE_PRIO} Queue priority
|
${QUEUE_PRIO} Queue priority
|
||||||
${RECORDED_FILE} Recorded file in record()
|
${RECORDED_FILE} * Recorded file in record()
|
||||||
${TALK_DETECED} Result from talkdetect()
|
${TALK_DETECED} * Result from talkdetect()
|
||||||
${TOUCH_MONITOR} The filename base to use with Touch Monitor (auto record)
|
${TOUCH_MONITOR} The filename base to use with Touch Monitor (auto record)
|
||||||
${TXTCIDNAME} Result of application TXTCIDName
|
${TXTCIDNAME} * Result of application TXTCIDName
|
||||||
${VPB_GETDTMF} chan_vpb
|
${VPB_GETDTMF} chan_vpb
|
||||||
|
|
||||||
The MeetMe Conference Bridge uses the following variables:
|
The MeetMe Conference Bridge uses the following variables:
|
||||||
|
@ -353,53 +353,47 @@ ${MEETME_RECORDINGFILE} Name of file for recording a conference with
|
||||||
${MEETME_RECORDINGFORMAT} Format of file to be recorded
|
${MEETME_RECORDINGFORMAT} Format of file to be recorded
|
||||||
${MEETME_EXIT_CONTEXT} Context for exit out of meetme meeting
|
${MEETME_EXIT_CONTEXT} Context for exit out of meetme meeting
|
||||||
${MEETME_AGI_BACKGROUND} AGI script for Meetme (zap only)
|
${MEETME_AGI_BACKGROUND} AGI script for Meetme (zap only)
|
||||||
|
${MEETMESECS} * Number of seconds a user participated in a MeetMe conference
|
||||||
Meetme() sets the following variable:
|
|
||||||
${MEETMESECS} Number of seconds a user participated in a MeetMe conference
|
|
||||||
|
|
||||||
The voicemail() application uses the following variables:
|
The voicemail() application uses the following variables:
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
${VM_CATEGORY} Sets voicemail category
|
${VM_CATEGORY} Sets voicemail category
|
||||||
|
${VM_NAME} * Full name in voicemail
|
||||||
|
${VM_DUR} * Voicemail duration
|
||||||
|
${VM_MSGNUM} * Number of voicemail message in mailbox
|
||||||
|
${VM_CALLERID} * Voicemail Caller ID (Person leaving vm)
|
||||||
|
${VM_CIDNAME} * Voicemail Caller ID Name
|
||||||
|
${VM_CIDNUM} * Voicemail Caller ID Number
|
||||||
|
${VM_DATE} * Voicemail Date
|
||||||
|
|
||||||
The following variables are set by voicemail()
|
The vmauthenticate() application uses the following variables:
|
||||||
${VM_NAME} Full name in voicemail
|
|
||||||
${VM_DUR} Voicemail duration
|
|
||||||
${VM_MSGNUM} Number of voicemail message in mailbox
|
|
||||||
${VM_CALLERID} Voicemail Caller ID (Person leaving vm)
|
|
||||||
${VM_CIDNAME} Voicemail Caller ID Name
|
|
||||||
${VM_CIDNUM} Voicemail Caller ID Number
|
|
||||||
${VM_DATE} Voicemail Date
|
|
||||||
|
|
||||||
The following variables are set by vmauthenticate()
|
|
||||||
${AUTH_MAILBOX} Authenticated mailbox
|
|
||||||
${AUTH_CONTEXT} Authenticated mailbox context
|
|
||||||
${DIFF_DAY} Day difference (internal use)
|
|
||||||
|
|
||||||
Dundi() uses the following variables
|
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
${DUNDTECH} Technology
|
${AUTH_MAILBOX} * Authenticated mailbox
|
||||||
${DUNDDEST} Destination
|
${AUTH_CONTEXT} * Authenticated mailbox context
|
||||||
|
|
||||||
|
DUNDiLookup() uses the following variables
|
||||||
|
---------------------------------------------------------
|
||||||
|
${DUNDTECH} * The Technology of the result from a call to DUNDiLookup()
|
||||||
|
${DUNDDEST} * The Destination of the result from a call to DUNDiLookup()
|
||||||
|
|
||||||
The Zaptel channel sets the following variables:
|
The Zaptel channel sets the following variables:
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
${ANI2} The ANI2 Code provided by the network on the incoming call.
|
${ANI2} * The ANI2 Code provided by the network on the incoming call.
|
||||||
(ie, Code 29 identifies call as a Prison/Inmate Call)
|
(ie, Code 29 identifies call as a Prison/Inmate Call)
|
||||||
${CALLTYPE} Type of call (Speech, Digital, etc)
|
${CALLTYPE} * Type of call (Speech, Digital, etc)
|
||||||
${CALLEDTON} Type of number for incoming PRI extension
|
${CALLEDTON} * Type of number for incoming PRI extension
|
||||||
i.e. 0=unknown, 1=international, 2=domestic, 3=net_specific,
|
i.e. 0=unknown, 1=international, 2=domestic, 3=net_specific,
|
||||||
4=subscriber, 6=abbreviated, 7=reserved
|
4=subscriber, 6=abbreviated, 7=reserved
|
||||||
${CALLINGSUBADDR} Called PRI Subaddress
|
${CALLINGSUBADDR} * Called PRI Subaddress
|
||||||
${FAXEXTEN} The extension called before being redirected to "fax"
|
${FAXEXTEN} * The extension called before being redirected to "fax"
|
||||||
${PRIREDIRECTREASON} Reason for redirect, if a call was directed
|
${PRIREDIRECTREASON} * Reason for redirect, if a call was directed
|
||||||
|
|
||||||
The SIP channel sets the following variables:
|
The SIP channel sets the following variables:
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
${SIPCALLID} SIP Call-ID: header verbatim (for logging or CDR matching)
|
${SIPCALLID} * SIP Call-ID: header verbatim (for logging or CDR matching)
|
||||||
${SIPDOMAIN} SIP destination domain of an inbound call (if appropriate)
|
${SIPDOMAIN} * SIP destination domain of an inbound call (if appropriate)
|
||||||
${SIPUSERAGENT} SIP user agent
|
${SIPUSERAGENT} * SIP user agent
|
||||||
${SIPURI} SIP uri
|
${SIPURI} * SIP uri
|
||||||
|
|
||||||
The SIP channel reads the following variable:
|
|
||||||
${SIP_CODEC} Set the SIP codec for a call
|
${SIP_CODEC} Set the SIP codec for a call
|
||||||
|
|
||||||
The Agent channel uses the following variables:
|
The Agent channel uses the following variables:
|
||||||
|
@ -410,20 +404,18 @@ ${AGENTGOODBYE} Sound file to use for "Good Bye" when agent logs out
|
||||||
${AGENTACKCALL} Whether the agent should acknowledge the incoming call
|
${AGENTACKCALL} Whether the agent should acknowledge the incoming call
|
||||||
${AGENTAUTOLOGOFF} Auto logging off for an agent
|
${AGENTAUTOLOGOFF} Auto logging off for an agent
|
||||||
${AGENTWRAPUPTIME} Setting the time for wrapup between incoming calls
|
${AGENTWRAPUPTIME} Setting the time for wrapup between incoming calls
|
||||||
${AGENTNUMBER} Agent number (username) set at login
|
${AGENTNUMBER} * Agent number (username) set at login
|
||||||
${AGENTSTATUS} Status of login ( fail | on | off )
|
${AGENTSTATUS} * Status of login ( fail | on | off )
|
||||||
${AGENTEXTEN} Extension for logged in agent
|
${AGENTEXTEN} * Extension for logged in agent
|
||||||
|
|
||||||
The Dial() application sets the following variables:
|
The Dial() application uses the following variables:
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
${DIALEDPEERNAME} Dialed peer name
|
${DIALEDPEERNAME} * Dialed peer name
|
||||||
${DIALEDPEERNUMBER} Dialed peer number
|
${DIALEDPEERNUMBER} * Dialed peer number
|
||||||
${DIALEDTIME} Time for the call (seconds)
|
${DIALEDTIME} * Time for the call (seconds)
|
||||||
${ANSWEREDTIME} Time from dial to answer (seconds)
|
${ANSWEREDTIME} * Time from dial to answer (seconds)
|
||||||
${DIALSTATUS} Status of the call, one of:
|
${DIALSTATUS} * Status of the call, one of:
|
||||||
CHANUNAVAIL | CONGESTION | BUSY | NOANSWER | ANSWER | CANCEL
|
(CHANUNAVAIL | CONGESTION | BUSY | NOANSWER | ANSWER | CANCEL)
|
||||||
|
|
||||||
The dial() application reads the following variables
|
|
||||||
${LIMIT_PLAYAUDIO_CALLER} Soundfile for call limits
|
${LIMIT_PLAYAUDIO_CALLER} Soundfile for call limits
|
||||||
${LIMIT_PLAYAUDIO_CALLEE} Soundfile for call limits
|
${LIMIT_PLAYAUDIO_CALLEE} Soundfile for call limits
|
||||||
${LIMIT_WARNING_FILE} Soundfile for call limits
|
${LIMIT_WARNING_FILE} Soundfile for call limits
|
||||||
|
@ -432,19 +424,17 @@ ${LIMIT_CONNECT_FILE} Soundfile for call limits
|
||||||
${OUTBOUND_GROUP} Default groups for peer channels (as in SetGroup)
|
${OUTBOUND_GROUP} Default groups for peer channels (as in SetGroup)
|
||||||
* See "show application dial" for more information
|
* See "show application dial" for more information
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
The chanisavail() application sets the following variables:
|
The chanisavail() application sets the following variables:
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
${AVAILCHAN} return value
|
${AVAILCHAN} * the name of the available channel if one was found
|
||||||
${AVAILORIGCHAN} return value
|
${AVAILORIGCHAN} * the canonical channel name that was used to create the channel
|
||||||
${AVAILSTATUS} Status of requested channel
|
${AVAILSTATUS} * Status of requested channel
|
||||||
|
|
||||||
When using macros in the dialplan, these variables are available
|
When using macros in the dialplan, these variables are available
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
${MACRO_EXTEN} The calling extensions
|
${MACRO_EXTEN} * The calling extensions
|
||||||
${MACRO_CONTEXT} The calling context
|
${MACRO_CONTEXT} * The calling context
|
||||||
${MACRO_PRIORITY} The calling priority
|
${MACRO_PRIORITY} * The calling priority
|
||||||
${MACRO_OFFSET} Offset to add to priority at return from macro
|
${MACRO_OFFSET} Offset to add to priority at return from macro
|
||||||
|
|
||||||
If you compile with OSP support in the SIP channel, these
|
If you compile with OSP support in the SIP channel, these
|
||||||
|
|
|
@ -1343,7 +1343,7 @@ static void *accept_thread(void *ignore)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
p = getprotobyname("tcp");
|
p = getprotobyname("tcp");
|
||||||
if( p ) {
|
if (p) {
|
||||||
if( setsockopt(as, p->p_proto, TCP_NODELAY, (char *)&arg, sizeof(arg) ) < 0 ) {
|
if( setsockopt(as, p->p_proto, TCP_NODELAY, (char *)&arg, sizeof(arg) ) < 0 ) {
|
||||||
ast_log(LOG_WARNING, "Failed to set manager tcp connection to TCP_NODELAY mode: %s\n", strerror(errno));
|
ast_log(LOG_WARNING, "Failed to set manager tcp connection to TCP_NODELAY mode: %s\n", strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue