Files | |
file | app_adsiprog.c |
Program Asterisk ADSI Scripts into phone. | |
file | app_alarmreceiver.c |
Central Station Alarm receiver for Ademco Contact ID. | |
file | app_authenticate.c |
Execute arbitrary authenticate commands. | |
file | app_cdr.c |
Applications connected with CDR engine. | |
file | app_chanisavail.c |
Check if Channel is Available. | |
file | app_channelredirect.c |
ChannelRedirect application. | |
file | app_chanspy.c |
ChanSpy: Listen in on any channel. | |
file | app_controlplayback.c |
Trivial application to control playback of a sound file. | |
file | app_dahdibarge.c |
DAHDI Barge support. | |
file | app_dahdiras.c |
Execute an ISDN RAS. | |
file | app_dahdiscan.c |
DAHDI Scanner. | |
file | app_db.c |
Database access functions. | |
file | app_dial.c |
dial() & retrydial() - Trivial application to dial a channel and send an URL on answer | |
file | app_dictate.c |
Virtual Dictation Machine Application For Asterisk. | |
file | app_directed_pickup.c |
Directed Call Pickup Support. | |
file | app_directory.c |
Provide a directory of extensions. | |
file | app_disa.c |
DISA -- Direct Inward System Access Application. | |
file | app_dumpchan.c |
Application to dump channel variables. | |
file | app_echo.c |
Echo application -- play back what you hear to evaluate latency. | |
file | app_exec.c |
Exec application. | |
file | app_externalivr.c |
External IVR application interface. | |
file | app_festival.c |
Connect to festival. | |
file | app_flash.c |
App to flash a DAHDI trunk. | |
file | app_followme.c |
Find-Me Follow-Me application. | |
file | app_forkcdr.c |
Fork CDR application. | |
file | app_getcpeid.c |
Get ADSI CPE ID. | |
file | app_ices.c |
Stream to an icecast server via ICES (see contrib/asterisk-ices.xml). | |
file | app_image.c |
App to transmit an image. | |
file | app_ivrdemo.c |
IVR Demo application. | |
file | app_jack.c |
Jack Application. | |
file | app_macro.c |
Dial plan macro Implementation. | |
file | app_meetme.c |
Meet me conference bridge and Shared Line Appearances. | |
file | app_milliwatt.c |
Digital Milliwatt Test. | |
file | app_minivm.c |
MiniVoiceMail - A Minimal Voicemail System for Asterisk. | |
file | app_mixmonitor.c |
MixMonitor() - Record a call and mix the audio during the recording. | |
file | app_morsecode.c |
Morsecode application. | |
file | app_mp3.c |
Silly application to play an MP3 file -- uses mpg123. | |
file | app_nbscat.c |
Silly application to play an NBScat file -- uses nbscat8k. | |
file | app_osplookup.c |
Open Settlement Protocol (OSP) Applications. | |
file | app_page.c |
page() - Paging application | |
file | app_parkandannounce.c |
ParkAndAnnounce application for Asterisk. | |
file | app_playback.c |
Trivial application to playback a sound file. | |
file | app_privacy.c |
Block all calls without Caller*ID, require phone # to be entered. | |
file | app_queue.c |
True call queues with optional send URL on answer. | |
file | app_read.c |
Trivial application to read a variable. | |
file | app_readexten.c |
Trivial application to read an extension into a variable. | |
file | app_readfile.c |
ReadFile application -- Reads in a File for you. | |
file | app_record.c |
Trivial application to record a sound file. | |
file | app_sayunixtime.c |
SayUnixTime application. | |
file | app_senddtmf.c |
App to send DTMF digits. | |
file | app_sendtext.c |
App to transmit a text message. | |
file | app_setcallerid.c |
App to set callerid presentation. | |
file | app_skel.c |
Skeleton application. | |
file | app_sms.c |
SMS application - ETSI ES 201 912 protocol 1 implementation. | |
file | app_softhangup.c |
SoftHangup application. | |
file | app_speech_utils.c |
Speech Recognition Utility Applications. | |
file | app_stack.c |
Stack applications Gosub, Return, etc. | |
file | app_system.c |
Execute arbitrary system commands. | |
file | app_talkdetect.c |
Playback a file with audio detect. | |
file | app_test.c |
Applications to test connection and produce report in text file. | |
file | app_transfer.c |
Transfer a caller. | |
file | app_url.c |
App to transmit a URL. | |
file | app_userevent.c |
UserEvent application -- send manager event. | |
file | app_verbose.c |
Verbose logging application. | |
file | app_voicemail.c |
Comedian Mail - Voicemail System. | |
file | app_waitforring.c |
Wait for Ring Application. | |
file | app_waitforsilence.c |
Wait for Silence
| |
file | app_waituntil.c |
Sleep until the given epoch. | |
file | app_while.c |
While Loop Implementation. | |
file | app_zapateller.c |
Playback the special information tone to get rid of telemarketers. | |
file | res_ael_share.c |
Shareable AEL code -- mainly between internal and external modules. | |
file | res_realtime.c |
RealTime CLI. | |
Functions | |
static int | iax2_prov_app (struct ast_channel *chan, void *data) |
static int | pbx_builtin_answer (struct ast_channel *, void *) |
static int | pbx_builtin_background (struct ast_channel *, void *) |
static int | pbx_builtin_busy (struct ast_channel *, void *) |
static int | pbx_builtin_congestion (struct ast_channel *, void *) |
static int | pbx_builtin_execiftime (struct ast_channel *, void *) |
static int | pbx_builtin_goto (struct ast_channel *, void *) |
static int | pbx_builtin_gotoiftime (struct ast_channel *, void *) |
static int | pbx_builtin_hangup (struct ast_channel *, void *) |
static int | pbx_builtin_proceeding (struct ast_channel *, void *) |
static int | pbx_builtin_progress (struct ast_channel *, void *) |
static int | pbx_builtin_resetcdr (struct ast_channel *, void *) |
static int | pbx_builtin_ringing (struct ast_channel *, void *) |
static int | pbx_builtin_setamaflags (struct ast_channel *, void *) |
static int | pbx_builtin_wait (struct ast_channel *, void *) |
static int | pbx_builtin_waitexten (struct ast_channel *, void *) |
static int iax2_prov_app | ( | struct ast_channel * | chan, | |
void * | data | |||
) | [static] |
iax2provision
Definition at line 10093 of file chan_iax2.c.
References ast_inet_ntoa(), ast_log(), ast_strdupa, ast_strlen_zero(), ast_verb, chan, iax2_provision(), iax2_tech, LOG_NOTICE, PTR_TO_CALLNO, create_addr_info::sockfd, ast_channel::tech, and ast_channel::tech_pvt.
Referenced by load_module().
10094 { 10095 int res; 10096 char *sdata; 10097 char *opts; 10098 int force =0; 10099 unsigned short callno = PTR_TO_CALLNO(chan->tech_pvt); 10100 if (ast_strlen_zero(data)) 10101 data = "default"; 10102 sdata = ast_strdupa(data); 10103 opts = strchr(sdata, '|'); 10104 if (opts) 10105 *opts='\0'; 10106 10107 if (chan->tech != &iax2_tech) { 10108 ast_log(LOG_NOTICE, "Can't provision a non-IAX device!\n"); 10109 return -1; 10110 } 10111 if (!callno || !iaxs[callno] || !iaxs[callno]->addr.sin_addr.s_addr) { 10112 ast_log(LOG_NOTICE, "Can't provision something with no IP?\n"); 10113 return -1; 10114 } 10115 res = iax2_provision(&iaxs[callno]->addr, iaxs[callno]->sockfd, NULL, sdata, force); 10116 ast_verb(3, "Provisioned IAXY at '%s' with '%s'= %d\n", 10117 ast_inet_ntoa(iaxs[callno]->addr.sin_addr), 10118 sdata, res); 10119 return res; 10120 }
static int pbx_builtin_answer | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 7887 of file pbx.c.
References __ast_answer(), ast_channel::_state, AST_STATE_UP, ast_strlen_zero(), and chan.
07888 { 07889 int delay = 0; 07890 07891 if ((chan->_state != AST_STATE_UP) && !ast_strlen_zero(data)) 07892 delay = atoi(data); 07893 07894 if (delay < 0) { 07895 delay = 0; 07896 } 07897 07898 return __ast_answer(chan, delay, 1); 07899 }
static int pbx_builtin_background | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 8156 of file pbx.c.
References ast_channel::_state, ast_answer(), AST_APP_ARG, ast_app_parse_options(), ast_copy_string(), AST_DECLARE_APP_ARGS, AST_DIGIT_ANY, ast_log(), AST_STANDARD_APP_ARGS, AST_STATE_UP, ast_stopstream(), ast_strdupa, ast_streamfile(), ast_strlen_zero(), ast_test_flag, ast_waitstream(), ast_waitstream_exten(), BACKGROUND_MATCHEXTEN, BACKGROUND_NOANSWER, background_opts, BACKGROUND_PLAYBACK, BACKGROUND_SKIP, chan, ast_channel::context, ast_channel::exten, ast_flags::flags, ast_channel::language, LOG_WARNING, ast_channel::name, parse(), pbx_builtin_setvar_helper(), ast_channel::priority, and strsep().
08157 { 08158 int res = 0; 08159 int mres = 0; 08160 struct ast_flags flags = {0}; 08161 char *parse; 08162 AST_DECLARE_APP_ARGS(args, 08163 AST_APP_ARG(filename); 08164 AST_APP_ARG(options); 08165 AST_APP_ARG(lang); 08166 AST_APP_ARG(context); 08167 ); 08168 08169 if (ast_strlen_zero(data)) { 08170 ast_log(LOG_WARNING, "Background requires an argument (filename)\n"); 08171 return -1; 08172 } 08173 08174 parse = ast_strdupa(data); 08175 08176 AST_STANDARD_APP_ARGS(args, parse); 08177 08178 if (ast_strlen_zero(args.lang)) 08179 args.lang = (char *)chan->language; /* XXX this is const */ 08180 08181 if (ast_strlen_zero(args.context)) 08182 args.context = chan->context; 08183 08184 if (args.options) { 08185 if (!strcasecmp(args.options, "skip")) 08186 flags.flags = BACKGROUND_SKIP; 08187 else if (!strcasecmp(args.options, "noanswer")) 08188 flags.flags = BACKGROUND_NOANSWER; 08189 else 08190 ast_app_parse_options(background_opts, &flags, NULL, args.options); 08191 } 08192 08193 /* Answer if need be */ 08194 if (chan->_state != AST_STATE_UP) { 08195 if (ast_test_flag(&flags, BACKGROUND_SKIP)) { 08196 goto done; 08197 } else if (!ast_test_flag(&flags, BACKGROUND_NOANSWER)) { 08198 res = ast_answer(chan); 08199 } 08200 } 08201 08202 if (!res) { 08203 char *back = args.filename; 08204 char *front; 08205 08206 ast_stopstream(chan); /* Stop anything playing */ 08207 /* Stream the list of files */ 08208 while (!res && (front = strsep(&back, "&")) ) { 08209 if ( (res = ast_streamfile(chan, front, args.lang)) ) { 08210 ast_log(LOG_WARNING, "ast_streamfile failed on %s for %s\n", chan->name, (char*)data); 08211 res = 0; 08212 mres = 1; 08213 break; 08214 } 08215 if (ast_test_flag(&flags, BACKGROUND_PLAYBACK)) { 08216 res = ast_waitstream(chan, ""); 08217 } else if (ast_test_flag(&flags, BACKGROUND_MATCHEXTEN)) { 08218 res = ast_waitstream_exten(chan, args.context); 08219 } else { 08220 res = ast_waitstream(chan, AST_DIGIT_ANY); 08221 } 08222 ast_stopstream(chan); 08223 } 08224 } 08225 if (strcmp(args.context, chan->context) && res) { 08226 snprintf(chan->exten, sizeof(chan->exten), "%c", res); 08227 ast_copy_string(chan->context, args.context, sizeof(chan->context)); 08228 chan->priority = 0; 08229 res = 0; 08230 } 08231 done: 08232 pbx_builtin_setvar_helper(chan, "BACKGROUNDSTATUS", mres ? "FAILED" : "SUCCESS"); 08233 return res; 08234 }
static int pbx_builtin_busy | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 7857 of file pbx.c.
References ast_channel::_state, ast_cdr_busy(), AST_CONTROL_BUSY, ast_indicate(), ast_setstate(), AST_STATE_BUSY, AST_STATE_UP, chan, and wait_for_hangup().
07858 { 07859 ast_indicate(chan, AST_CONTROL_BUSY); 07860 /* Don't change state of an UP channel, just indicate 07861 busy in audio */ 07862 if (chan->_state != AST_STATE_UP) { 07863 ast_setstate(chan, AST_STATE_BUSY); 07864 ast_cdr_busy(chan->cdr); 07865 } 07866 wait_for_hangup(chan, data); 07867 return -1; 07868 }
static int pbx_builtin_congestion | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 7873 of file pbx.c.
References ast_channel::_state, AST_CONTROL_CONGESTION, ast_indicate(), ast_setstate(), AST_STATE_BUSY, AST_STATE_UP, chan, and wait_for_hangup().
07874 { 07875 ast_indicate(chan, AST_CONTROL_CONGESTION); 07876 /* Don't change state of an UP channel, just indicate 07877 congestion in audio */ 07878 if (chan->_state != AST_STATE_UP) 07879 ast_setstate(chan, AST_STATE_BUSY); 07880 wait_for_hangup(chan, data); 07881 return -1; 07882 }
static int pbx_builtin_execiftime | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 8023 of file pbx.c.
References app, ast_build_timing(), ast_check_timing(), ast_log(), ast_strdupa, ast_strlen_zero(), chan, LOG_WARNING, pbx_exec(), pbx_findapp(), s, S_OR, and strsep().
08024 { 08025 char *s, *appname; 08026 struct ast_timing timing; 08027 struct ast_app *app; 08028 static const char *usage = "ExecIfTime requires an argument:\n <time range>,<days of week>,<days of month>,<months>?<appname>[(<appargs>)]"; 08029 08030 if (ast_strlen_zero(data)) { 08031 ast_log(LOG_WARNING, "%s\n", usage); 08032 return -1; 08033 } 08034 08035 appname = ast_strdupa(data); 08036 08037 s = strsep(&appname, "?"); /* Separate the timerange and application name/data */ 08038 if (!appname) { /* missing application */ 08039 ast_log(LOG_WARNING, "%s\n", usage); 08040 return -1; 08041 } 08042 08043 if (!ast_build_timing(&timing, s)) { 08044 ast_log(LOG_WARNING, "Invalid Time Spec: %s\nCorrect usage: %s\n", s, usage); 08045 return -1; 08046 } 08047 08048 if (!ast_check_timing(&timing)) /* outside the valid time window, just return */ 08049 return 0; 08050 08051 /* now split appname(appargs) */ 08052 if ((s = strchr(appname, '('))) { 08053 char *e; 08054 *s++ = '\0'; 08055 if ((e = strrchr(s, ')'))) 08056 *e = '\0'; 08057 else 08058 ast_log(LOG_WARNING, "Failed to find closing parenthesis\n"); 08059 } 08060 08061 08062 if ((app = pbx_findapp(appname))) { 08063 return pbx_exec(chan, app, S_OR(s, "")); 08064 } else { 08065 ast_log(LOG_WARNING, "Cannot locate application %s\n", appname); 08066 return -1; 08067 } 08068 }
static int pbx_builtin_goto | ( | struct ast_channel * | chan, | |
void * | data | |||
) | [static] |
Goto
Definition at line 8239 of file pbx.c.
References ast_parseable_goto(), ast_verb, chan, ast_channel::context, ast_channel::exten, and ast_channel::priority.
Referenced by pbx_builtin_gotoif(), and pbx_builtin_gotoiftime().
08240 { 08241 int res = ast_parseable_goto(chan, data); 08242 if (!res) 08243 ast_verb(3, "Goto (%s,%s,%d)\n", chan->context, chan->exten, chan->priority + 1); 08244 return res; 08245 }
static int pbx_builtin_gotoiftime | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 7989 of file pbx.c.
References ast_build_timing(), ast_check_timing(), ast_debug, ast_log(), ast_strdupa, ast_strlen_zero(), chan, LOG_WARNING, pbx_builtin_goto(), s, and strsep().
07990 { 07991 char *s, *ts, *branch1, *branch2, *branch; 07992 struct ast_timing timing; 07993 07994 if (ast_strlen_zero(data)) { 07995 ast_log(LOG_WARNING, "GotoIfTime requires an argument:\n <time range>,<days of week>,<days of month>,<months>?'labeliftrue':'labeliffalse'\n"); 07996 return -1; 07997 } 07998 07999 ts = s = ast_strdupa(data); 08000 08001 /* Separate the Goto path */ 08002 strsep(&ts, "?"); 08003 branch1 = strsep(&ts,":"); 08004 branch2 = strsep(&ts,""); 08005 08006 /* struct ast_include include contained garbage here, fixed by zeroing it on get_timerange */ 08007 if (ast_build_timing(&timing, s) && ast_check_timing(&timing)) 08008 branch = branch1; 08009 else 08010 branch = branch2; 08011 08012 if (ast_strlen_zero(branch)) { 08013 ast_debug(1, "Not taking any branch\n"); 08014 return 0; 08015 } 08016 08017 return pbx_builtin_goto(chan, branch); 08018 }
static int pbx_builtin_hangup | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 7959 of file pbx.c.
References AST_CAUSE_NORMAL_CLEARING, ast_log(), ast_str2cause(), ast_strlen_zero(), chan, ast_channel::hangupcause, and LOG_WARNING.
07960 { 07961 if (!ast_strlen_zero(data)) { 07962 int cause; 07963 char *endptr; 07964 07965 if ((cause = ast_str2cause(data)) > -1) { 07966 chan->hangupcause = cause; 07967 return -1; 07968 } 07969 07970 cause = strtol((const char *) data, &endptr, 10); 07971 if (cause != 0 || (data != endptr)) { 07972 chan->hangupcause = cause; 07973 return -1; 07974 } 07975 07976 ast_log(LOG_WARNING, "Invalid cause given to Hangup(): \"%s\"\n", (char *) data); 07977 } 07978 07979 if (!chan->hangupcause) { 07980 chan->hangupcause = AST_CAUSE_NORMAL_CLEARING; 07981 } 07982 07983 return -1; 07984 }
static int pbx_builtin_proceeding | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 7830 of file pbx.c.
References AST_CONTROL_PROCEEDING, ast_indicate(), and chan.
07831 { 07832 ast_indicate(chan, AST_CONTROL_PROCEEDING); 07833 return 0; 07834 }
static int pbx_builtin_progress | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 7839 of file pbx.c.
References AST_CONTROL_PROGRESS, ast_indicate(), and chan.
07840 { 07841 ast_indicate(chan, AST_CONTROL_PROGRESS); 07842 return 0; 07843 }
static int pbx_builtin_resetcdr | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 7931 of file pbx.c.
References ast_app_parse_options(), ast_cdr_reset(), ast_strdupa, ast_strlen_zero(), ast_channel::cdr, chan, ast_flags::flags, and resetcdr_opts.
07932 { 07933 char *args; 07934 struct ast_flags flags = { 0 }; 07935 07936 if (!ast_strlen_zero(data)) { 07937 args = ast_strdupa(data); 07938 ast_app_parse_options(resetcdr_opts, &flags, NULL, args); 07939 } 07940 07941 ast_cdr_reset(chan->cdr, &flags); 07942 07943 return 0; 07944 }
static int pbx_builtin_ringing | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 7848 of file pbx.c.
References AST_CONTROL_RINGING, ast_indicate(), and chan.
07849 { 07850 ast_indicate(chan, AST_CONTROL_RINGING); 07851 return 0; 07852 }
static int pbx_builtin_setamaflags | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 7949 of file pbx.c.
References ast_cdr_setamaflags(), and chan.
07950 { 07951 /* Copy the AMA Flags as specified */ 07952 ast_cdr_setamaflags(chan, data ? data : ""); 07953 return 0; 07954 }
static int pbx_builtin_wait | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 8073 of file pbx.c.
References ast_safe_sleep(), chan, and s.
08074 { 08075 double s; 08076 int ms; 08077 08078 /* Wait for "n" seconds */ 08079 if (data && (s = atof(data)) > 0.0) { 08080 ms = s * 1000.0; 08081 return ast_safe_sleep(chan, ms); 08082 } 08083 return 0; 08084 }
static int pbx_builtin_waitexten | ( | struct ast_channel * | , | |
void * | ||||
) | [static] |
Definition at line 8089 of file pbx.c.
References AST_APP_ARG, ast_app_parse_options(), AST_CONTROL_HOLD, AST_CONTROL_UNHOLD, AST_DECLARE_APP_ARGS, ast_exists_extension(), ast_get_indication_tone(), ast_indicate(), ast_indicate_data(), ast_log(), ast_playtones_start(), ast_playtones_stop(), AST_SOFTHANGUP_TIMEOUT, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), ast_test_flag, ast_tonepair_start(), ast_verb, ast_waitfordigit(), chan, ast_channel::context, tone_zone_sound::data, ast_flags::flags, LOG_WARNING, parse(), ast_channel::pbx, ast_pbx::rtimeoutms, s, set_ext_pri(), WAITEXTEN_DIALTONE, WAITEXTEN_MOH, waitexten_opts, and ast_channel::zone.
08090 { 08091 int ms, res; 08092 double s; 08093 struct ast_flags flags = {0}; 08094 char *opts[1] = { NULL }; 08095 char *parse; 08096 AST_DECLARE_APP_ARGS(args, 08097 AST_APP_ARG(timeout); 08098 AST_APP_ARG(options); 08099 ); 08100 08101 if (!ast_strlen_zero(data)) { 08102 parse = ast_strdupa(data); 08103 AST_STANDARD_APP_ARGS(args, parse); 08104 } else 08105 memset(&args, 0, sizeof(args)); 08106 08107 if (args.options) 08108 ast_app_parse_options(waitexten_opts, &flags, opts, args.options); 08109 08110 if (ast_test_flag(&flags, WAITEXTEN_MOH) && !opts[0] ) { 08111 ast_log(LOG_WARNING, "The 'm' option has been specified for WaitExten without a class.\n"); 08112 } else if (ast_test_flag(&flags, WAITEXTEN_MOH)) { 08113 ast_indicate_data(chan, AST_CONTROL_HOLD, opts[0], strlen(opts[0])); 08114 } else if (ast_test_flag(&flags, WAITEXTEN_DIALTONE)) { 08115 const struct tone_zone_sound *ts = ast_get_indication_tone(chan->zone, "dial"); 08116 if (ts) 08117 ast_playtones_start(chan, 0, ts->data, 0); 08118 else 08119 ast_tonepair_start(chan, 350, 440, 0, 0); 08120 } 08121 /* Wait for "n" seconds */ 08122 if (args.timeout && (s = atof(args.timeout)) > 0) 08123 ms = s * 1000.0; 08124 else if (chan->pbx) 08125 ms = chan->pbx->rtimeoutms; 08126 else 08127 ms = 10000; 08128 08129 res = ast_waitfordigit(chan, ms); 08130 if (!res) { 08131 if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 1, chan->cid.cid_num)) { 08132 ast_verb(3, "Timeout on %s, continuing...\n", chan->name); 08133 } else if (chan->_softhangup == AST_SOFTHANGUP_TIMEOUT) { 08134 ast_verb(3, "Call timeout on %s, checking for 'T'\n", chan->name); 08135 res = -1; 08136 } else if (ast_exists_extension(chan, chan->context, "t", 1, chan->cid.cid_num)) { 08137 ast_verb(3, "Timeout on %s, going to 't'\n", chan->name); 08138 set_ext_pri(chan, "t", 0); /* 0 will become 1, next time through the loop */ 08139 } else { 08140 ast_log(LOG_WARNING, "Timeout but no rule 't' in context '%s'\n", chan->context); 08141 res = -1; 08142 } 08143 } 08144 08145 if (ast_test_flag(&flags, WAITEXTEN_MOH)) 08146 ast_indicate(chan, AST_CONTROL_UNHOLD); 08147 else if (ast_test_flag(&flags, WAITEXTEN_DIALTONE)) 08148 ast_playtones_stop(chan); 08149 08150 return res; 08151 }