I have a problem with ZAP interface bridging in France (FXO interface): hangup is detected through a busy tone (no polarity inversion or whatever). When I dial out from a zap line when I receive an incoming call on another zap line (for example to redirect calls to my office when I'm not home), caller hangup is not detected because Asterisk seems to put itself out of the voice path because it bridges the two ZAP interfaces (even when I use the "t" option which is supposed to keep Asterisk in the loop): -- Executing Answer("Zap/1-1", "") in new stack -- Executing Dial("Zap/1-1", "Zap/2/0800123456|30|t") in new stack -- Called 2/0800123456 -- Zap/2-1 answered Zap/1-1 -- Attempting native bridge of Zap/1-1 and Zap/2-1 Is there a way to prevent bridging? (CVS Asterisk as of 10 minutes ago) Sam -- Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/sam
> I have a problem with ZAP interface bridging in France (FXO > interface): hangup is detected through a busy tone (no polarity > inversion or whatever). When I dial out from a zap line when I receive > an incoming call on another zap line (for example to redirect calls to > my office when I'm not home), caller hangup is not detected because > Asterisk seems to put itself out of the voice path because it bridges > the two ZAP interfaces (even when I use the "t" option which > is supposed to keep Asterisk in the loop): > > -- Executing Answer("Zap/1-1", "") in new stack > -- Executing Dial("Zap/1-1", "Zap/2/0800123456|30|t") in new stack > -- Called 2/0800123456 > -- Zap/2-1 answered Zap/1-1 > -- Attempting native bridge of Zap/1-1 and Zap/2-1Did you have this issue in earlier versions? I don't think we have this (2xFXO 3xFXS) are you using busycount=8 ?
Samuel Tardieu
2005-Feb-02 02:46 UTC
[Asterisk-Users] Re: Forbidding ZAP interface bridging
>>>>> "Sam" == Samuel Tardieu <sam@rfc1149.net> writes:Sam> Is there a way to prevent bridging? The following patch prevents bridging between Zap channel if busydetect is enabled on either of them. Does it look correct or are there cases where bridging should be enabled anyway? Index: chan_zap.c ==================================================================RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v retrieving revision 1.405 diff -u -r1.405 chan_zap.c --- chan_zap.c 28 Jan 2005 05:19:06 -0000 1.405 +++ chan_zap.c 2 Feb 2005 09:44:41 -0000 @@ -2619,6 +2619,14 @@ return -2; } + /* if busy detection is enabled on either channel, they cannot + * be bridged as hangup will not get properly detected */ + if (p0->busydetect || p1->busydetect) { + ast_mutex_unlock(&c0->lock); + ast_mutex_unlock(&c1->lock); + return -2; + } + op0 = p0 = c0->pvt->pvt; op1 = p1 = c1->pvt->pvt; ofd1 = c0->fds[0]; Sam -- Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/sam