diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_channelredirect.c | 2 | ||||
-rw-r--r-- | apps/app_chanspy.c | 16 | ||||
-rw-r--r-- | apps/app_confbridge.c | 2 | ||||
-rw-r--r-- | apps/app_dial.c | 28 | ||||
-rw-r--r-- | apps/app_disa.c | 10 | ||||
-rw-r--r-- | apps/app_dumpchan.c | 4 | ||||
-rw-r--r-- | apps/app_externalivr.c | 2 | ||||
-rw-r--r-- | apps/app_followme.c | 2 | ||||
-rw-r--r-- | apps/app_macro.c | 6 | ||||
-rw-r--r-- | apps/app_mixmonitor.c | 2 | ||||
-rw-r--r-- | apps/app_parkandannounce.c | 2 | ||||
-rw-r--r-- | apps/app_queue.c | 6 | ||||
-rw-r--r-- | apps/app_speech_utils.c | 6 | ||||
-rw-r--r-- | apps/app_stack.c | 4 | ||||
-rw-r--r-- | apps/app_talkdetect.c | 2 |
15 files changed, 47 insertions, 47 deletions
diff --git a/apps/app_channelredirect.c b/apps/app_channelredirect.c index bea7a91f1..8c98ed7b7 100644 --- a/apps/app_channelredirect.c +++ b/apps/app_channelredirect.c @@ -97,7 +97,7 @@ static int asyncgoto_exec(struct ast_channel *chan, const char *data) } if (ast_channel_pbx(chan2)) { - ast_set_flag(chan2, AST_FLAG_BRIDGE_HANGUP_DONT); /* don't let the after-bridge code run the h-exten */ + ast_set_flag(ast_channel_flags(chan2), AST_FLAG_BRIDGE_HANGUP_DONT); /* don't let the after-bridge code run the h-exten */ } res = ast_async_parseable_goto(chan2, args.label); diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index e773c4789..cafc62b39 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -489,7 +489,7 @@ static int start_spying(struct ast_autochan *autochan, const char *spychan_name, ast_set_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC | AST_AUDIOHOOK_SMALL_QUEUE); res = ast_audiohook_attach(autochan->chan, audiohook); - if (!res && ast_test_flag(autochan->chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(autochan->chan))) { + if (!res && ast_test_flag(ast_channel_flags(autochan->chan), AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(autochan->chan))) { ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE); } return res; @@ -583,7 +583,7 @@ static int channel_spy(struct ast_channel *chan, struct ast_autochan *spyee_auto } ast_channel_lock(chan); - ast_set_flag(chan, AST_FLAG_END_DTMF_ONLY); + ast_set_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY); ast_channel_unlock(chan); csth.volfactor = *volfactor; @@ -699,7 +699,7 @@ static int channel_spy(struct ast_channel *chan, struct ast_autochan *spyee_auto ast_deactivate_generator(chan); ast_channel_lock(chan); - ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY); + ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY); ast_channel_unlock(chan); if (ast_test_flag(flags, OPTION_WHISPER | OPTION_BARGE | OPTION_DTMF_SWITCH_MODES)) { @@ -787,7 +787,7 @@ static int common_exec(struct ast_channel *chan, struct ast_flags *flags, if (ast_channel_state(chan) != AST_STATE_UP) ast_answer(chan); - ast_set_flag(chan, AST_FLAG_SPYING); /* so nobody can spy on us while we are spying */ + ast_set_flag(ast_channel_flags(chan), AST_FLAG_SPYING); /* so nobody can spy on us while we are spying */ waitms = 100; @@ -800,7 +800,7 @@ static int common_exec(struct ast_channel *chan, struct ast_flags *flags, if (!res) res = ast_waitstream(chan, ""); else if (res < 0) { - ast_clear_flag(chan, AST_FLAG_SPYING); + ast_clear_flag(ast_channel_flags(chan), AST_FLAG_SPYING); break; } if (!ast_strlen_zero(exitcontext)) { @@ -831,7 +831,7 @@ static int common_exec(struct ast_channel *chan, struct ast_flags *flags, res = ast_waitfordigit(chan, waitms); if (res < 0) { iter = ast_channel_iterator_destroy(iter); - ast_clear_flag(chan, AST_FLAG_SPYING); + ast_clear_flag(ast_channel_flags(chan), AST_FLAG_SPYING); break; } if (!ast_strlen_zero(exitcontext)) { @@ -873,7 +873,7 @@ static int common_exec(struct ast_channel *chan, struct ast_flags *flags, continue; } - if (ast_check_hangup(autochan->chan) || ast_test_flag(autochan->chan, AST_FLAG_SPYING)) { + if (ast_check_hangup(autochan->chan) || ast_test_flag(ast_channel_flags(autochan->chan), AST_FLAG_SPYING)) { continue; } @@ -1024,7 +1024,7 @@ static int common_exec(struct ast_channel *chan, struct ast_flags *flags, } exit: - ast_clear_flag(chan, AST_FLAG_SPYING); + ast_clear_flag(ast_channel_flags(chan), AST_FLAG_SPYING); ast_channel_setoption(chan, AST_OPTION_TXGAIN, &zero_volume, sizeof(zero_volume), 0); diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c index 89c4354b3..866042cdd 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -1142,7 +1142,7 @@ static int alloc_playback_chan(struct conference_bridge *conference_bridge) } cap = ast_format_cap_destroy(cap); - conference_bridge->playback_chan->bridge = conference_bridge->bridge; + ast_channel_internal_bridge_set(conference_bridge->playback_chan, conference_bridge->bridge); if (ast_call(conference_bridge->playback_chan, "", 0)) { ast_hangup(conference_bridge->playback_chan); diff --git a/apps/app_dial.c b/apps/app_dial.c index 46330fc65..9ae9ea489 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -693,7 +693,7 @@ static void hanguptree(struct chanlist *outgoing, struct ast_channel *exception, if (outgoing->chan && (outgoing->chan != exception)) { if (answered_elsewhere) { /* The flag is used for local channel inheritance and stuff */ - ast_set_flag(outgoing->chan, AST_FLAG_ANSWERED_ELSEWHERE); + ast_set_flag(ast_channel_flags(outgoing->chan), AST_FLAG_ANSWERED_ELSEWHERE); /* This is for the channel drivers */ ast_channel_hangupcause_set(outgoing->chan, AST_CAUSE_ANSWERED_ELSEWHERE); } @@ -2327,12 +2327,12 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast if (outbound_group) ast_app_group_set_channel(tc, outbound_group); /* If the calling channel has the ANSWERED_ELSEWHERE flag set, inherit it. This is to support local channels */ - if (ast_test_flag(chan, AST_FLAG_ANSWERED_ELSEWHERE)) - ast_set_flag(tc, AST_FLAG_ANSWERED_ELSEWHERE); + if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_ANSWERED_ELSEWHERE)) + ast_set_flag(ast_channel_flags(tc), AST_FLAG_ANSWERED_ELSEWHERE); /* Check if we're forced by configuration */ if (ast_test_flag64(&opts, OPT_CANCEL_ELSEWHERE)) - ast_set_flag(tc, AST_FLAG_ANSWERED_ELSEWHERE); + ast_set_flag(ast_channel_flags(tc), AST_FLAG_ANSWERED_ELSEWHERE); /* Inherit context and extension */ @@ -2509,13 +2509,13 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast ast_log(LOG_ERROR, "error streaming file '%s' to callee\n", opt_args[OPT_ARG_ANNOUNCE]); } - ast_set_flag(peer, AST_FLAG_END_DTMF_ONLY); + ast_set_flag(ast_channel_flags(peer), AST_FLAG_END_DTMF_ONLY); while (ast_channel_stream(peer)) { int ms; ms = ast_sched_wait(ast_channel_sched(peer)); - if (ms < 0 && !peer->timingfunc) { + if (ms < 0 && !ast_channel_timingfunc(peer)) { ast_stopstream(peer); break; } @@ -2557,7 +2557,7 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast } ast_sched_runq(ast_channel_sched(peer)); } - ast_clear_flag(peer, AST_FLAG_END_DTMF_ONLY); + ast_clear_flag(ast_channel_flags(peer), AST_FLAG_END_DTMF_ONLY); } if (chan && peer && ast_test_flag64(&opts, OPT_GOTO) && !ast_strlen_zero(opt_args[OPT_ARG_GOTO])) { @@ -2847,8 +2847,8 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast ast_channel_exten_set(peer, "h"); ast_channel_priority_set(peer, 1); - autoloopflag = ast_test_flag(peer, AST_FLAG_IN_AUTOLOOP); /* save value to restore at the end */ - ast_set_flag(peer, AST_FLAG_IN_AUTOLOOP); + autoloopflag = ast_test_flag(ast_channel_flags(peer), AST_FLAG_IN_AUTOLOOP); /* save value to restore at the end */ + ast_set_flag(ast_channel_flags(peer), AST_FLAG_IN_AUTOLOOP); while ((res9 = ast_spawn_extension(peer, ast_channel_context(peer), ast_channel_exten(peer), ast_channel_priority(peer), @@ -2862,7 +2862,7 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast ast_debug(1, "Spawn extension (%s,%s,%d) exited non-zero on '%s'\n", ast_channel_context(peer), ast_channel_exten(peer), ast_channel_priority(peer), ast_channel_name(peer)); ast_verb(2, "Spawn extension (%s, %s, %d) exited non-zero on '%s'\n", ast_channel_context(peer), ast_channel_exten(peer), ast_channel_priority(peer), ast_channel_name(peer)); } - ast_set2_flag(peer, autoloopflag, AST_FLAG_IN_AUTOLOOP); /* set it back the way it was */ + ast_set2_flag(ast_channel_flags(peer), autoloopflag, AST_FLAG_IN_AUTOLOOP); /* set it back the way it was */ } if (!ast_check_hangup(peer) && ast_test_flag64(&opts, OPT_CALLEE_GO_ON)) { if(!ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) { @@ -2985,7 +2985,7 @@ static int retrydial_exec(struct ast_channel *chan, const char *data) int continue_exec; ast_channel_data_set(chan, "Retrying"); - if (ast_test_flag(chan, AST_FLAG_MOH)) + if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_MOH)) ast_moh_stop(chan); res = dial_exec_full(chan, args.dialdata, &peerflags, &continue_exec); @@ -3002,7 +3002,7 @@ static int retrydial_exec(struct ast_channel *chan, const char *data) ast_log(LOG_WARNING, "Announce file \"%s\" specified in Retrydial does not exist\n", args.announce); } if (!res && sleepms) { - if (!ast_test_flag(chan, AST_FLAG_MOH)) + if (!ast_test_flag(ast_channel_flags(chan), AST_FLAG_MOH)) ast_moh_start(chan, NULL, NULL); res = ast_waitfordigit(chan, sleepms); } @@ -3015,7 +3015,7 @@ static int retrydial_exec(struct ast_channel *chan, const char *data) ast_log(LOG_WARNING, "Announce file \"%s\" specified in Retrydial does not exist\n", args.announce); } if (sleepms) { - if (!ast_test_flag(chan, AST_FLAG_MOH)) + if (!ast_test_flag(ast_channel_flags(chan), AST_FLAG_MOH)) ast_moh_start(chan, NULL, NULL); if (!res) res = ast_waitfordigit(chan, sleepms); @@ -3038,7 +3038,7 @@ static int retrydial_exec(struct ast_channel *chan, const char *data) else if (res == 1) res = 0; - if (ast_test_flag(chan, AST_FLAG_MOH)) + if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_MOH)) ast_moh_stop(chan); done: return res; diff --git a/apps/app_disa.c b/apps/app_disa.c index 0432a0b61..b38da7654 100644 --- a/apps/app_disa.c +++ b/apps/app_disa.c @@ -204,7 +204,7 @@ static int disa_exec(struct ast_channel *chan, const char *data) play_dialtone(chan, args.mailbox); - ast_set_flag(chan, AST_FLAG_END_DTMF_ONLY); + ast_set_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY); for (;;) { /* if outa time, give em reorder */ @@ -220,7 +220,7 @@ static int disa_exec(struct ast_channel *chan, const char *data) } if (!(f = ast_read(chan))) { - ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY); + ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY); return -1; } @@ -228,7 +228,7 @@ static int disa_exec(struct ast_channel *chan, const char *data) if (f->data.uint32) ast_channel_hangupcause_set(chan, f->data.uint32); ast_frfree(f); - ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY); + ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY); return -1; } @@ -257,7 +257,7 @@ static int disa_exec(struct ast_channel *chan, const char *data) fp = fopen(args.passcode,"r"); if (!fp) { ast_log(LOG_WARNING,"DISA password file %s not found on chan %s\n",args.passcode,ast_channel_name(chan)); - ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY); + ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY); return -1; } pwline[0] = 0; @@ -353,7 +353,7 @@ static int disa_exec(struct ast_channel *chan, const char *data) } } - ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY); + ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY); if (k == 3) { int recheck = 0; diff --git a/apps/app_dumpchan.c b/apps/app_dumpchan.c index 403c9e079..4a80a3d13 100644 --- a/apps/app_dumpchan.c +++ b/apps/app_dumpchan.c @@ -158,7 +158,7 @@ static int serialize_showchan(struct ast_channel *c, char *buf, size_t size) hour, min, sec, - c->_bridge ? ast_channel_name(c->_bridge) : "<none>", + ast_channel_internal_bridged_channel(c) ? ast_channel_name(ast_channel_internal_bridged_channel(c)) : "<none>", ast_bridged_channel(c) ? ast_channel_name(ast_bridged_channel(c)) : "<none>", ast_channel_context(c), ast_channel_exten(c), @@ -167,7 +167,7 @@ static int serialize_showchan(struct ast_channel *c, char *buf, size_t size) ast_print_group(pgrp, sizeof(pgrp), ast_channel_pickupgroup(c)), ast_channel_appl(c) ? ast_channel_appl(c) : "(N/A)", ast_channel_data(c) ? S_OR(ast_channel_data(c), "(Empty)") : "(None)", - (ast_test_flag(c, AST_FLAG_BLOCKING) ? ast_channel_blockproc(c) : "(Not Blocking)")); + (ast_test_flag(ast_channel_flags(c), AST_FLAG_BLOCKING) ? ast_channel_blockproc(c) : "(Not Blocking)")); return 0; } diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c index 5873a6408..0dee58cea 100644 --- a/apps/app_externalivr.c +++ b/apps/app_externalivr.c @@ -640,7 +640,7 @@ static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u, } while (1) { - if (ast_test_flag(chan, AST_FLAG_ZOMBIE)) { + if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_ZOMBIE)) { ast_chan_log(LOG_ERROR, chan, "Is a zombie\n"); break; } diff --git a/apps/app_followme.c b/apps/app_followme.c index c4d1a2d67..5afa978fb 100644 --- a/apps/app_followme.c +++ b/apps/app_followme.c @@ -645,7 +645,7 @@ static struct ast_channel *wait_for_winner(struct findme_user_listptr *findme_us tmpto = ast_sched_wait(ast_channel_sched(tmpuser->ochan)); if (tmpto > 0 && tmpto < to) to = tmpto; - else if (tmpto < 0 && !tmpuser->ochan->timingfunc) { + else if (tmpto < 0 && !ast_channel_timingfunc(tmpuser->ochan)) { ast_stopstream(tmpuser->ochan); if (tmpuser->state == 1) { ast_verb(3, "Playback of the call-from file appears to be done.\n"); diff --git a/apps/app_macro.c b/apps/app_macro.c index cebfae7af..8f10d119e 100644 --- a/apps/app_macro.c +++ b/apps/app_macro.c @@ -373,8 +373,8 @@ static int _macro_exec(struct ast_channel *chan, const char *data, int exclusive argc++; } ast_channel_unlock(chan); - autoloopflag = ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP); - ast_set_flag(chan, AST_FLAG_IN_AUTOLOOP); + autoloopflag = ast_test_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP); + ast_set_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP); while (ast_exists_extension(chan, ast_channel_context(chan), ast_channel_exten(chan), ast_channel_priority(chan), S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) { struct ast_context *c; @@ -512,7 +512,7 @@ static int _macro_exec(struct ast_channel *chan, const char *data, int exclusive /* Reset the depth back to what it was when the routine was entered (like if we called Macro recursively) */ snprintf(depthc, sizeof(depthc), "%d", depth); pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc); - ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP); + ast_set2_flag(ast_channel_flags(chan), autoloopflag, AST_FLAG_IN_AUTOLOOP); for (x = 1; x < argc; x++) { /* Restore old arguments and delete ours */ diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c index 88c8f88df..a89b6cc5d 100644 --- a/apps/app_mixmonitor.c +++ b/apps/app_mixmonitor.c @@ -375,7 +375,7 @@ static int startmon(struct ast_channel *chan, struct ast_audiohook *audiohook) ast_audiohook_attach(chan, audiohook); - if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan))) + if (!res && ast_test_flag(ast_channel_flags(chan), AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan))) ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE); return res; diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c index dce000970..172f0236c 100644 --- a/apps/app_parkandannounce.c +++ b/apps/app_parkandannounce.c @@ -137,7 +137,7 @@ static int parkandannounce_exec(struct ast_channel *chan, const char *data) ast_verb(3, "Dial Tech,String: (%s,%s)\n", dialtech, args.dial); if (!ast_strlen_zero(args.return_context)) { - ast_clear_flag(chan, AST_FLAG_IN_AUTOLOOP); + ast_clear_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP); ast_parseable_goto(chan, args.return_context); } diff --git a/apps/app_queue.c b/apps/app_queue.c index 7871a3d12..ef3223b53 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3023,7 +3023,7 @@ static void hangupcalls(struct callattempt *outgoing, struct ast_channel *except /* Hangup any existing lines we have open */ if (outgoing->chan && (outgoing->chan != exception)) { if (exception || cancel_answered_elsewhere) - ast_set_flag(outgoing->chan, AST_FLAG_ANSWERED_ELSEWHERE); + ast_set_flag(ast_channel_flags(outgoing->chan), AST_FLAG_ANSWERED_ELSEWHERE); ast_hangup(outgoing->chan); } oo = outgoing; @@ -3273,7 +3273,7 @@ static int ring_entry(struct queue_ent *qe, struct callattempt *tmp, int *busies ast_channel_lock_both(tmp->chan, qe->chan); if (qe->cancel_answered_elsewhere) { - ast_set_flag(tmp->chan, AST_FLAG_ANSWERED_ELSEWHERE); + ast_set_flag(ast_channel_flags(tmp->chan), AST_FLAG_ANSWERED_ELSEWHERE); } ast_channel_appl_set(tmp->chan, "AppQueue"); ast_channel_data_set(tmp->chan, "(Outgoing Line)"); @@ -4646,7 +4646,7 @@ static int try_calling(struct queue_ent *qe, const struct ast_flags opts, char * /* if the calling channel has the ANSWERED_ELSEWHERE flag set, make sure this is inherited. (this is mainly to support chan_local) */ - if (ast_test_flag(qe->chan, AST_FLAG_ANSWERED_ELSEWHERE)) { + if (ast_test_flag(ast_channel_flags(qe->chan), AST_FLAG_ANSWERED_ELSEWHERE)) { qe->cancel_answered_elsewhere = 1; } diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c index fdf67bb90..62a8d729a 100644 --- a/apps/app_speech_utils.c +++ b/apps/app_speech_utils.c @@ -721,7 +721,7 @@ static int speech_background(struct ast_channel *chan, const char *data) /* Okay it's streaming so go into a loop grabbing frames! */ while (done == 0) { /* If the filename is null and stream is not running, start up a new sound file */ - if (!quieted && (ast_channel_streamid(chan) == -1 && chan->timingfunc == NULL) && (filename = strsep(&filename_tmp, "&"))) { + if (!quieted && (ast_channel_streamid(chan) == -1 && ast_channel_timingfunc(chan) == NULL) && (filename = strsep(&filename_tmp, "&"))) { /* Discard old stream information */ ast_stopstream(chan); /* Start new stream */ @@ -769,7 +769,7 @@ static int speech_background(struct ast_channel *chan, const char *data) switch (speech->state) { case AST_SPEECH_STATE_READY: /* If audio playback has stopped do a check for timeout purposes */ - if (ast_channel_streamid(chan) == -1 && chan->timingfunc == NULL) + if (ast_channel_streamid(chan) == -1 && ast_channel_timingfunc(chan) == NULL) ast_stopstream(chan); if (!quieted && ast_channel_stream(chan) == NULL && timeout && started == 0 && !filename_tmp) { if (timeout == -1) { @@ -795,7 +795,7 @@ static int speech_background(struct ast_channel *chan, const char *data) speech_streamfile(chan, speech->processing_sound, ast_channel_language(chan)); } } - } else if (ast_channel_streamid(chan) == -1 && chan->timingfunc == NULL) { + } else if (ast_channel_streamid(chan) == -1 && ast_channel_timingfunc(chan) == NULL) { ast_stopstream(chan); if (speech->processing_sound != NULL) { if (strlen(speech->processing_sound) > 0 && strcasecmp(speech->processing_sound, "none")) { diff --git a/apps/app_stack.c b/apps/app_stack.c index 28bd3cfb4..8f7ab0e78 100644 --- a/apps/app_stack.c +++ b/apps/app_stack.c @@ -445,10 +445,10 @@ static int gosub_exec(struct ast_channel *chan, const char *data) } if (!ast_exists_extension(chan, ast_channel_context(chan), ast_channel_exten(chan), - ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP) ? ast_channel_priority(chan) + 1 : ast_channel_priority(chan), + ast_test_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP) ? ast_channel_priority(chan) + 1 : ast_channel_priority(chan), S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) { ast_log(LOG_ERROR, "Attempt to reach a non-existent destination for gosub: (Context:%s, Extension:%s, Priority:%d)\n", - ast_channel_context(chan), ast_channel_exten(chan), ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP) ? ast_channel_priority(chan) + 1 : ast_channel_priority(chan)); + ast_channel_context(chan), ast_channel_exten(chan), ast_test_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP) ? ast_channel_priority(chan) + 1 : ast_channel_priority(chan)); ast_channel_context_set(chan, newframe->context); ast_channel_exten_set(chan, newframe->extension); ast_channel_priority_set(chan, newframe->priority - 1); diff --git a/apps/app_talkdetect.c b/apps/app_talkdetect.c index 791081db5..5ef80c33c 100644 --- a/apps/app_talkdetect.c +++ b/apps/app_talkdetect.c @@ -151,7 +151,7 @@ static int background_detect_exec(struct ast_channel *chan, const char *data) detection_start = ast_tvnow(); while (ast_channel_stream(chan)) { res = ast_sched_wait(ast_channel_sched(chan)); - if ((res < 0) && !chan->timingfunc) { + if ((res < 0) && !ast_channel_timingfunc(chan)) { res = 0; break; } |