[asterisk-users] Sending a hook flash to a DAHDI channel

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat Feb 20 16:08:47 CST 2010


On Sat, Feb 20, 2010 at 04:16:56PM -0500, Stephen Brown wrote:
> I've got a piece of CPE equipment that has an FXS port that I have tied 
> to an FXO port on a TDM400 clone card. Normally, if I go off-hook with a 
> standard telephone connected to it, I get a dialtone. If I dial a digit, 
> and send a hookflash, the device will provide a dialtone back for the 
> next available channel on the device.
> 
> I'm trying to recreate this same behavior with Asterisk, however, it's 
> not working. I'm not sure if it's me, the CPE device, Asterisk, my 
> dialplan code or a combination of all. I am running Asterisk 1.6.0.21, 
> FreePBX 2.6, and the latest version of DAHDI.
> 
> Here's the dialplan logic I am trying to execute, this is in 
> /etc/asterisk/extensions_custom.conf:
> 
> [from-internal-custom]
> exten => 1234,1,Dial(DAHDI/2)    ; DAHDI channel 2, FXO

You only get past this point when this call is over.

> exten => 1234,n,SendDTMF(2)      ; I expect to send DTMF digit 2 after 
> the channel answers?
> exten => 1234,n,Wait(1)                  ; I added a wait statement
> exten => 1234,n,Flash()                   ; Send the hookflash

Can the CO send Flash to the CPE?

> 
> After the hookflash is when I expect to receive dialtone from the CPE 
> device, but it does not appear to ever execute the SendDTMF or Flash events:
> 
> [Feb 20 15:45:52]     -- Starting simple switch on 'DAHDI/4-1'
> [Feb 20 15:46:00]     -- Executing [1234 at from-internal:1] 
> ResetCDR("DAHDI/4-1", "") in new stack
> [Feb 20 15:46:00]     -- Executing [1234 at from-internal:2] 
> Dial("DAHDI/4-1", "DAHDI/2") in new stack
> [Feb 20 15:46:00]     -- Called 2
> [Feb 20 15:46:01] WARNING[27502]: chan_dahdi.c:2008 dahdi_enable_ec: 
> Unable to enable echo cancellation on channel 2 (No such device)
> [Feb 20 15:46:01]     -- DAHDI/2-1 answered DAHDI/4-1
> [Feb 20 15:46:01]     -- Native bridging DAHDI/4-1 and DAHDI/2-1
> [Feb 20 15:46:06] WARNING[27502]: chan_dahdi.c:2008 dahdi_enable_ec: 
> Unable to enable echo cancellation on channel 2 (No such device)
> [Feb 20 15:46:06]     -- Executing [h at from-internal:1] 
> Macro("DAHDI/4-1", "hangupcall") in new stack
> [Feb 20 15:46:06]     -- Executing [s at macro-hangupcall:1] 
> GotoIf("DAHDI/4-1", "1?skiprg") in new stack
> [Feb 20 15:46:06]     -- Goto (macro-hangupcall,s,4)
> [Feb 20 15:46:06]     -- Executing [s at macro-hangupcall:4] 
> GotoIf("DAHDI/4-1", "1?skipblkvm") in new stack
> [Feb 20 15:46:06]     -- Goto (macro-hangupcall,s,7)
> [Feb 20 15:46:06]     -- Executing [s at macro-hangupcall:7] 
> GotoIf("DAHDI/4-1", "1?theend") in new stack
> [Feb 20 15:46:06]     -- Goto (macro-hangupcall,s,9)
> [Feb 20 15:46:06]     -- Executing [s at macro-hangupcall:9] 
> Hangup("DAHDI/4-1", "") in new stack
> [Feb 20 15:46:06]   == Spawn extension (macro-hangupcall, s, 9) exited 
> non-zero on 'DAHDI/4-1' in macro 'hangupcall'
> [Feb 20 15:46:06]     -- Hungup 'DAHDI/2-1'
> [Feb 20 15:46:06]   == Spawn extension (from-internal, 1234, 2) exited 
> non-zero on 'DAHDI/4-1'
> [Feb 20 15:46:06]     -- Hungup 'DAHDI/4-1'
> 
> I've also tried it with this variation:
> exten => 1234,1,Dial(DAHDI/2/D(2))    ; DAHDI channel 2, FXO send DTMF 
> digit 2 before call gets bridged
> exten => 1234,n,Wait(1)                          ; Wait 1 second
> exten => 1234,n,Flash()                           ; Send the hookflash
> 
> This yields the results of dialing "2" to the CPE device, again I never 
> see the Flash event get executed (as evidenced from the console, it's 
> also possible my verbosity is set too low?)

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list