}
}
+static int my_have_progressdetect(void *pvt)
+{
+ struct dahdi_pvt *p = pvt;
+ if ((p->callprogress & CALLPROGRESS_PROGRESS)
+ && CANPROGRESSDETECT(p) && p->dsp && p->outgoing) {
+ return 1;
+ } else {
+ /* Don't have progress detection. */
+ return 0;
+ }
+}
static struct analog_callback dahdi_analog_callbacks =
{
.start_polarityswitch = my_start_polarityswitch,
.answer_polarityswitch = my_answer_polarityswitch,
.hangup_polarityswitch = my_hangup_polarityswitch,
+ .have_progressdetect = my_have_progressdetect,
};
/*! Round robin search locations. */
return -1;
}
+static int analog_have_progressdetect(struct analog_pvt *p)
+{
+ if (p->calls->have_progressdetect) {
+ return p->calls->have_progressdetect(p->chan_pvt);
+ }
+ /* Don't have progress detection. */
+ return 0;
+}
+
enum analog_cid_start analog_str_to_cidstart(const char *value)
{
if (!strcasecmp(value, "ring")) {
}
}
if (ast->_state == AST_STATE_DIALING) {
- if (analog_check_confirmanswer(p) || (!p->dialednone
+ if (analog_have_progressdetect(p)) {
+ ast_debug(1, "Done dialing, but waiting for progress detection before doing more...\n");
+ } else if (analog_check_confirmanswer(p) || (!p->dialednone
&& ((mysig == ANALOG_SIG_EM) || (mysig == ANALOG_SIG_EM_E1)
|| (mysig == ANALOG_SIG_EMWINK) || (mysig == ANALOG_SIG_FEATD)
|| (mysig == ANALOG_SIG_FEATDMF_TA) || (mysig == ANALOG_SIG_FEATDMF)
void (* const set_new_owner)(void *pvt, struct ast_channel *new_owner);
const char *(* const get_orig_dialstring)(void *pvt);
+ int (* const have_progressdetect)(void *pvt);
};