Incoming call ended at end of ring sequence

Hi all,

I am having a very strange problem with our current board that we developed based on the BF537 Stamp board using the Zaptel FXO and FXS modules. It is running an older version of Asterisk and I do believe this could hamper so of the support I receive but just curious if anyone has seen a similar problem or can lead me done the correct path for solving it.

Basically I have a very simple setup - one FXO device and one FXS device. The FXO device is connected to our Telecom provider and the FXS device to a phone. I have set immediate to yes thus creating a hot phone and auto dial to my cellphone. This works perfectly. The problem is on incoming calls. My extension file just puts all calls to the FXS device

[incoming]
exten => s,1,Dial(Zap/1,30)

Now what seems to happen here is when I get an incoming call it detects the ring coming through and begins to dial the ZAP/1 device. The phone rings and seems fine then without hanging up the cellphone or answering the local phone the ZAP devices disconnect:

-- Starting simple switch on 'Zap/2-1'
-- Executing [s@incoming:1] Dial("Zap/2-1", "Zap/1|30") in new stack
-- Called 1
-- Zap/1-1 is ringing
-- Zap/1-1 is ringing

– Hungup ‘Zap/1-1’
== Spawn extension (incoming, s, 1) exited non-zero on ‘Zap/2-1’
– Hungup ‘Zap/2-1’

– Starting simple switch on ‘Zap/2-1’
– Executing [s@incoming:1] Dial(“Zap/2-1”, “Zap/1|30”) in new stack
– Called 1
– Zap/1-1 is ringing

I expect to just see ringing until I answer or the cellphone hangs up or the 30 seconds timesout. When I route the call to a SIP phone instead of the FXS on the softphone I see an incoming call then it suddenly ends - softphone goes back on hook and then rings again.

The problem this causes is that if you don’t answer before the hangup asterisk gives an error saying the channel is unavailable (obviously since its hung both the FXS and FXO devices up). I have included the full asterisk CLI output with debugging of the wcfxs device enabled below

What it seems to me is that for some reason the device is seeing the end of the ring sequence as a on hook signal for some reason. Please note that SIP to the local phone works perfectly it is only for incoming calls from the Teleco, I have also tested this on an office PBX and it does the same thing.

I believe the problem is during the call it gives me ZT_TXSIG_KEWL FXS 0 as the output at the end of each ring sequence which is usually only received when a hung up really occurs. I am just not sure what can trigger this event and where to look for debugging further.

Thanks

ZT_TXSIG_START FXS 0
reg 64 before: 0x11
FXS: 0 lasttxhook: 4
– Starting simple switch on ‘Zap/2-1’
– Executing [s@incoming:1] Dial(“Zap/2-1”, “Zap/1|30”) in new stack
– Called 1
– Zap/1-1 is ringing
RITE2CLI> ZT_TXSIG_OFFHOOK FXS 0
reg 64 before: 0x44
FXS: 0 lasttxhook: 1
– Zap/1-1 is ringing
RITE2
CLI> ZT_TXSIG_START FXS 0
reg 64 before: 0x11
FXS: 0 lasttxhook: 4
ZT_TXSIG_KEWL FXS 0
reg 64 before: 0x44
FXS: 0 lasttxhook: 0
– Hungup ‘Zap/1-1’
== Spawn extension (incoming, s, 1) exited non-zero on ‘Zap/2-1’
– Hungup 'Zap/2-1’
ZT_TXSIG_ONHOOK FXS 0
reg 64 before: 0x0
FXS: 0 lasttxhook: 1
ZT_TXSIG_START FXS 0
reg 64 before: 0x11
FXS: 0 lasttxhook: 4
– Starting simple switch on ‘Zap/2-1’
– Executing [s@incoming:1] Dial(“Zap/2-1”, “Zap/1|30”) in new stack
– Called 1
– Zap/1-1 is ringing
RITE2CLI> ZT_TXSIG_OFFHOOK FXS 0
reg 64 before: 0x44
FXS: 0 lasttxhook: 1
– Zap/1-1 is ringing
RITE2
CLI> ZT_TXSIG_START FXS 0
reg 64 before: 0x11
FXS: 0 lasttxhook: 4
ZT_TXSIG_KEWL FXS 0
reg 64 before: 0x44
FXS: 0 lasttxhook: 0
– Hungup ‘Zap/1-1’
== Spawn extension (incoming, s, 1) exited non-zero on ‘Zap/2-1’
– Hungup 'Zap/2-1’
ZT_TXSIG_ONHOOK FXS 0
reg 64 before: 0x0
FXS: 0 lasttxhook: 1