[asterisk-commits] rmudgett: branch rmudgett/call_waiting r251533 - /team/rmudgett/call_waiting/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Mar 9 15:50:02 CST 2010
Author: rmudgett
Date: Tue Mar 9 15:49:58 2010
New Revision: 251533
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=251533
Log:
Don't ioctl(DAHDI_AUDIOMODE) for no B channel call waiting calls.
Modified:
team/rmudgett/call_waiting/channels/chan_dahdi.c
Modified: team/rmudgett/call_waiting/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/chan_dahdi.c?view=diff&rev=251533&r1=251532&r2=251533
==============================================================================
--- team/rmudgett/call_waiting/channels/chan_dahdi.c (original)
+++ team/rmudgett/call_waiting/channels/chan_dahdi.c Tue Mar 9 15:49:58 2010
@@ -2372,10 +2372,22 @@
int audio;
int newlaw = -1;
- /* Set to audio mode at this point */
- audio = 1;
- if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_AUDIOMODE, &audio) == -1)
- ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d: %s\n", p->channel, audio, strerror(errno));
+ switch (p->sig) {
+ case SIG_PRI_LIB_HANDLE_CASES:
+ if (((struct sig_pri_chan *) p->sig_pvt)->no_b_channel) {
+ /* PRI nobch pseudo channel. Does not handle ioctl(DAHDI_AUDIOMODE) */
+ break;
+ }
+ /* Fall through */
+ default:
+ /* Set to audio mode at this point */
+ audio = 1;
+ if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_AUDIOMODE, &audio) == -1) {
+ ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d: %s\n",
+ p->channel, audio, strerror(errno));
+ }
+ break;
+ }
if (law != SIG_PRI_DEFLAW) {
dahdi_setlaw(p->subs[SUB_REAL].dfd, (law == SIG_PRI_ULAW) ? DAHDI_LAW_MULAW : DAHDI_LAW_ALAW);
More information about the asterisk-commits
mailing list