diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-27 19:50:56 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-27 19:50:56 +0000 |
commit | fb7d202d85815b3f4d7210aaecb47dd7d3728403 (patch) | |
tree | c3eff5ed4b3d2f75dcf302fed4451f8f433d992f | |
parent | a2041744fd2eedd0ed6473d1edac426bc42461aa (diff) |
Fix inband DTMF detection on outgoing ISDN calls.
This is a regression from the sig_pri split from chan_dahdi. When a call is
first initiated, the inband DTMF detector is not enabled if it's an outgoing
ISDN call. However, it needs to be turned on once the media path starts up.
This handling was put back in the open_media() callback of chan_dahdi. In
sig_pri, open_media() calls were added to a few places where it was needed,
including handling of PRI_EVENT_RINGING, PRI_EVENT_PROGRESS, and
PRI_EVENT_PROCEEDING.
Thanks to rmudgett for helping me with the patch!
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@279916 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_dahdi.c | 5 | ||||
-rw-r--r-- | channels/sig_pri.c | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index c24d01106..64965a38d 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -2505,6 +2505,11 @@ static void my_pri_open_media(void *p) if (res < 0) { ast_log(LOG_WARNING, "Unable to set gains on channel %d\n", pvt->channel); } + + if (pvt->dsp_features && pvt->dsp) { + ast_dsp_set_features(pvt->dsp, pvt->dsp_features); + pvt->dsp_features = 0; + } } #endif /* defined(HAVE_PRI) */ diff --git a/channels/sig_pri.c b/channels/sig_pri.c index 9d18a303b..22f9501dd 100644 --- a/channels/sig_pri.c +++ b/channels/sig_pri.c @@ -4907,6 +4907,17 @@ static void *pri_dchannel(void *vpri) pri_queue_control(pri, chanpos, AST_CONTROL_RINGING); pri->pvts[chanpos]->alerting = 1; + if ( +#ifdef PRI_PROGRESS_MASK + e->ringing.progressmask & PRI_PROG_INBAND_AVAILABLE +#else + e->ringing.progress == 8 +#endif + ) { + sig_pri_open_media(pri->pvts[chanpos]); + } + + #ifdef SUPPORT_USERUSER if (!ast_strlen_zero(e->ringing.useruserinfo)) { struct ast_channel *owner; @@ -4965,6 +4976,7 @@ static void *pri_dchannel(void *vpri) pri_queue_control(pri, chanpos, AST_CONTROL_PROGRESS); pri->pvts[chanpos]->progress = 1; sig_pri_set_dialing(pri->pvts[chanpos], 0); + sig_pri_open_media(pri->pvts[chanpos]); } sig_pri_unlock_private(pri->pvts[chanpos]); } @@ -4998,6 +5010,7 @@ static void *pri_dchannel(void *vpri) pri_queue_control(pri, chanpos, AST_CONTROL_PROGRESS); pri->pvts[chanpos]->progress = 1; sig_pri_set_dialing(pri->pvts[chanpos], 0); + sig_pri_open_media(pri->pvts[chanpos]); } sig_pri_unlock_private(pri->pvts[chanpos]); } |