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;
|
||||
|
||||
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);
|
||||
} else
|
||||
else
|
||||
ast_log(LOG_NOTICE,"Huh....? no dial for indications?\n");
|
||||
|
||||
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;
|
||||
to = c->pbx ? c->pbx->dtimeout * 1000 : 2000;
|
||||
|
||||
if (timeout > 0) fto = to = timeout;
|
||||
if (timeout < 0) fto = to = 1000000000;
|
||||
if (timeout > 0)
|
||||
fto = to = timeout;
|
||||
if (timeout < 0)
|
||||
fto = to = 1000000000;
|
||||
res = ast_readstring(c, s, maxlen, to, fto, "#");
|
||||
return res;
|
||||
}
|
||||
|
@ -122,8 +124,10 @@ int ast_app_getdata_full(struct ast_channel *c, char *prompt, char *s, int maxle
|
|||
}
|
||||
fto = 6000;
|
||||
to = 2000;
|
||||
if (timeout > 0) fto = to = timeout;
|
||||
if (timeout < 0) fto = to = 1000000000;
|
||||
if (timeout > 0)
|
||||
fto = to = timeout;
|
||||
if (timeout < 0)
|
||||
fto = to = 1000000000;
|
||||
res = ast_readstring_full(c, s, maxlen, to, fto, "#", audiofd, ctrlfd);
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ static char *descrip =
|
|||
" 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"
|
||||
" 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";
|
||||
|
||||
STANDARD_LOCAL_USER;
|
||||
|
|
4
astmm.c
4
astmm.c
|
@ -3,9 +3,9 @@
|
|||
*
|
||||
* 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
|
||||
* 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)
|
||||
return RESULT_SHOWUSAGE;
|
||||
else if (argc >= 4) {
|
||||
if ( strcmp(argv[2],"like") )
|
||||
if (strcmp(argv[2],"like"))
|
||||
return RESULT_SHOWUSAGE;
|
||||
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-> data ? (!ast_strlen_zero(c->data) ? c->data : "(Empty)") : "(None)"),
|
||||
(ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)"));
|
||||
|
||||
if(pbx_builtin_serialize_variables(c,buf,sizeof(buf)))
|
||||
ast_cli(fd," Variables:\n%s\n",buf);
|
||||
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
|
||||
-----------------------------
|
||||
${CURL} Resulting page content for curl()
|
||||
${ENUM} Result of application EnumLookup
|
||||
${CURL} * Resulting page content for curl()
|
||||
${ENUM} * Result of application EnumLookup
|
||||
${EXITCONTEXT} Context to exit to in IVR menu (app background())
|
||||
or in the RetryDial() application
|
||||
${GROUPCOUNT} Result from groupcount()
|
||||
${MONITOR} Set to "TRUE" if the channel is/has been monitored (app monitor())
|
||||
${GROUPCOUNT} * Result from groupcount()
|
||||
${MONITOR} * Set to "TRUE" if the channel is/has been monitored (app monitor())
|
||||
${MONITOR_EXEC} Application to execute after monitoring a call
|
||||
${MONITOR_EXEC_ARGS} Arguments to application
|
||||
${MONITOR_FILENAME} File for monitoring (recording) calls in queue
|
||||
${QUEUE_PRIO} Queue priority
|
||||
${RECORDED_FILE} Recorded file in record()
|
||||
${TALK_DETECED} Result from talkdetect()
|
||||
${RECORDED_FILE} * Recorded file in record()
|
||||
${TALK_DETECED} * Result from talkdetect()
|
||||
${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
|
||||
|
||||
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_EXIT_CONTEXT} Context for exit out of meetme meeting
|
||||
${MEETME_AGI_BACKGROUND} AGI script for Meetme (zap only)
|
||||
|
||||
Meetme() sets the following variable:
|
||||
${MEETMESECS} Number of seconds a user participated in a MeetMe conference
|
||||
${MEETMESECS} * Number of seconds a user participated in a MeetMe conference
|
||||
|
||||
The voicemail() application uses the following variables:
|
||||
---------------------------------------------------------
|
||||
${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()
|
||||
${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
|
||||
The vmauthenticate() application uses the following variables:
|
||||
---------------------------------------------------------
|
||||
${DUNDTECH} Technology
|
||||
${DUNDDEST} Destination
|
||||
${AUTH_MAILBOX} * Authenticated mailbox
|
||||
${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:
|
||||
---------------------------------------------------------
|
||||
${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)
|
||||
${CALLTYPE} Type of call (Speech, Digital, etc)
|
||||
${CALLEDTON} Type of number for incoming PRI extension
|
||||
${CALLTYPE} * Type of call (Speech, Digital, etc)
|
||||
${CALLEDTON} * Type of number for incoming PRI extension
|
||||
i.e. 0=unknown, 1=international, 2=domestic, 3=net_specific,
|
||||
4=subscriber, 6=abbreviated, 7=reserved
|
||||
${CALLINGSUBADDR} Called PRI Subaddress
|
||||
${FAXEXTEN} The extension called before being redirected to "fax"
|
||||
${PRIREDIRECTREASON} Reason for redirect, if a call was directed
|
||||
${CALLINGSUBADDR} * Called PRI Subaddress
|
||||
${FAXEXTEN} * The extension called before being redirected to "fax"
|
||||
${PRIREDIRECTREASON} * Reason for redirect, if a call was directed
|
||||
|
||||
The SIP channel sets the following variables:
|
||||
---------------------------------------------------------
|
||||
${SIPCALLID} SIP Call-ID: header verbatim (for logging or CDR matching)
|
||||
${SIPDOMAIN} SIP destination domain of an inbound call (if appropriate)
|
||||
${SIPUSERAGENT} SIP user agent
|
||||
${SIPURI} SIP uri
|
||||
|
||||
The SIP channel reads the following variable:
|
||||
${SIPCALLID} * SIP Call-ID: header verbatim (for logging or CDR matching)
|
||||
${SIPDOMAIN} * SIP destination domain of an inbound call (if appropriate)
|
||||
${SIPUSERAGENT} * SIP user agent
|
||||
${SIPURI} * SIP uri
|
||||
${SIP_CODEC} Set the SIP codec for a call
|
||||
|
||||
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
|
||||
${AGENTAUTOLOGOFF} Auto logging off for an agent
|
||||
${AGENTWRAPUPTIME} Setting the time for wrapup between incoming calls
|
||||
${AGENTNUMBER} Agent number (username) set at login
|
||||
${AGENTSTATUS} Status of login ( fail | on | off )
|
||||
${AGENTEXTEN} Extension for logged in agent
|
||||
${AGENTNUMBER} * Agent number (username) set at login
|
||||
${AGENTSTATUS} * Status of login ( fail | on | off )
|
||||
${AGENTEXTEN} * Extension for logged in agent
|
||||
|
||||
The Dial() application sets the following variables:
|
||||
The Dial() application uses the following variables:
|
||||
---------------------------------------------------------
|
||||
${DIALEDPEERNAME} Dialed peer name
|
||||
${DIALEDPEERNUMBER} Dialed peer number
|
||||
${DIALEDTIME} Time for the call (seconds)
|
||||
${ANSWEREDTIME} Time from dial to answer (seconds)
|
||||
${DIALSTATUS} Status of the call, one of:
|
||||
CHANUNAVAIL | CONGESTION | BUSY | NOANSWER | ANSWER | CANCEL
|
||||
|
||||
The dial() application reads the following variables
|
||||
${DIALEDPEERNAME} * Dialed peer name
|
||||
${DIALEDPEERNUMBER} * Dialed peer number
|
||||
${DIALEDTIME} * Time for the call (seconds)
|
||||
${ANSWEREDTIME} * Time from dial to answer (seconds)
|
||||
${DIALSTATUS} * Status of the call, one of:
|
||||
(CHANUNAVAIL | CONGESTION | BUSY | NOANSWER | ANSWER | CANCEL)
|
||||
${LIMIT_PLAYAUDIO_CALLER} Soundfile for call limits
|
||||
${LIMIT_PLAYAUDIO_CALLEE} 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)
|
||||
* See "show application dial" for more information
|
||||
|
||||
|
||||
|
||||
The chanisavail() application sets the following variables:
|
||||
-----------------------------------------------------------
|
||||
${AVAILCHAN} return value
|
||||
${AVAILORIGCHAN} return value
|
||||
${AVAILSTATUS} Status of requested channel
|
||||
${AVAILCHAN} * the name of the available channel if one was found
|
||||
${AVAILORIGCHAN} * the canonical channel name that was used to create the channel
|
||||
${AVAILSTATUS} * Status of requested channel
|
||||
|
||||
When using macros in the dialplan, these variables are available
|
||||
---------------------------------------------------------
|
||||
${MACRO_EXTEN} The calling extensions
|
||||
${MACRO_CONTEXT} The calling context
|
||||
${MACRO_PRIORITY} The calling priority
|
||||
${MACRO_EXTEN} * The calling extensions
|
||||
${MACRO_CONTEXT} * The calling context
|
||||
${MACRO_PRIORITY} * The calling priority
|
||||
${MACRO_OFFSET} Offset to add to priority at return from macro
|
||||
|
||||
If you compile with OSP support in the SIP channel, these
|
||||
|
|
|
@ -1343,7 +1343,7 @@ static void *accept_thread(void *ignore)
|
|||
continue;
|
||||
}
|
||||
p = getprotobyname("tcp");
|
||||
if( p ) {
|
||||
if (p) {
|
||||
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));
|
||||
}
|
||||
|
|
Reference in New Issue