[asterisk-users] asterisk DTMF detection

Brent Addis brent.addis at pronet.co.nz
Sun Nov 5 20:30:00 MST 2006


Hi,

Hi All,
 I've just delved into the world of asterisk and I'm having a few dtmf  issues.
 Internally, amongst sip phones, dtmf is fine.

 Externally, if you ring from a GSM mobile, DTMF is fine, however if 
 you ring from a standard phone, DTMF fails to register.

 I am attempting to use a quad port HFC-4S Beronet Card. I've been 
 searching the web most of the last week and haven't found anything that 
 actually helps (although there seem to be a few people with DTMF 
 boggles)

 Is there anything special we need to do for these cards to detect 
 telecom dtmf tones?

 I find it a little confusing that incoming GSM, which rings in via the 
 same lines works, and telecoms phones don't. I thought it would be the 
 other way around if anything.



I have attached logs of an incoming call via telecom, and an incoming 
call via vodafone. The only difference I can see is the codec (I think) 
type.

Telecom seems to send the cal through as "Audio 3.1K" while vodafone 
uses "Speech". Would this difference do anything?

my mISDN config is also below should that be of any help.

Telecom: (No DTMF)

Connected to Asterisk 1.2.13 currently running on PROHOST100 (pid = 4481)
Verbosity is at least 3
   -- Remote UNIX connection
P[ 4] set_channel: bc->channel:0 channel:1
P[ 4] I IND :SETUP oad: dad:9298 pid:3 state:none
P[ 4]  --> channel:1 mode:TE cause:16 ocause:16 rad: cad:
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Audio 3.1k pi:3 keypad: sending_complete:1
P[ 4]  --> Bearer: Audio 3.1k
P[ 4]  --> Codec: Alaw
P[ 0]  --> * NEW CHANNEL dad:9298 oad:
P[ 4]  --> CTON: Unknown
P[ 4] EXPORT_PID: pid:3
P[ 4]  --> PRES: Restricted (0)
P[ 4]  --> SCREEN: Unscreened (0)
P[ 4] I SEND:PROCEEDING oad: dad:9298 pid:3
P[ 4]  --> bc_state:BCHAN_CLEANED
P[ 4]  --> channel:1 mode:TE cause:16 ocause:16 rad: cad:
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Audio 3.1k pi:3 keypad: sending_complete:1
   -- Executing Set("mISDN/4-1", "FROM_DID=9298") in new stack
   -- Executing Set("mISDN/4-1", "FAX_RX=disabled") in new stack
   -- Executing Goto("mISDN/4-1", "ivr-4|s|1") in new stack
   -- Goto (ivr-4,s,1)
   -- Executing Set("mISDN/4-1", "LOOPCOUNT=0") in new stack
   -- Executing Set("mISDN/4-1", "__DIR-CONTEXT=default") in new stack
   -- Executing Answer("mISDN/4-1", "") in new stack
P[ 4] * ANSWER:
P[ 4]  --> Connection is without BF encryption
P[ 4]  --> ECHO OFF
P[ 4]  --> None
P[ 4]  --> empty cad using dad
P[ 4] I SEND:CONNECT oad: dad:9298 pid:3
P[ 4]  --> bc_state:BCHAN_CLEANED
P[ 4]  --> channel:1 mode:TE cause:16 ocause:16 rad: cad:9298
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Audio 3.1k pi:3 keypad: sending_complete:1
P[ 4]  --> TRANSPARENT Mode
P[ 4] ec_enable
   -- Executing Wait("mISDN/4-1", "1") in new stack
P[ 4] BCHAN: bchan ACT Confirm pid:3
P[ 4] I IND :CONNECT_ACKNOWLEDGE  oad: dad:9298 pid:3 state:CONNECTED
P[ 4]  --> channel:1 mode:TE cause:16 ocause:16 rad: cad:9298
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Audio 3.1k pi:3 keypad: sending_complete:1
   -- Executing Set("mISDN/4-1", "TIMEOUT(digit)=3") in new stack
   -- Digit timeout set to 3
   -- Executing Set("mISDN/4-1", "TIMEOUT(response)=10") in new stack
   -- Response timeout set to 10
   -- Executing BackGround("mISDN/4-1", "custom/pronet-incoming") in 
new stack
   -- Playing 'custom/pronet-incoming' (language 'en')
P[ 4] I IND :DISCONNECT oad: dad:9298 pid:3 state:CONNECTED
P[ 4]  --> channel:1 mode:TE cause:16 ocause:16 rad: cad:9298
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Audio 3.1k pi:8 keypad: sending_complete:1
P[ 4]  --> org:2 nt:0, inbandavail:1 state:10
P[ 4] hangup_chan
P[ 4] -> queue_hangup
P[ 4] I SEND:RELEASE oad: dad:9298 pid:3
P[ 4]  --> bc_state:BCHAN_ACTIVATED
P[ 4]  --> channel:1 mode:TE cause:16 ocause:-1 rad: cad:9298
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Audio 3.1k pi:8 keypad: sending_complete:1
 == Spawn extension (ivr-4, s, 7) exited non-zero on 'mISDN/4-1'
   -- Executing Hangup("mISDN/4-1", "") in new stack
 == Spawn extension (ivr-4, h, 1) exited non-zero on 'mISDN/4-1'
P[ 4] * IND : HANGUP    pid:3 ctx:ivr-4 dad:h oad:(null) State:CONNECTED
P[ 4]  --> l3id:80003
P[ 4]  --> cause:16
P[ 4]  --> out_cause:16
P[ 4]  --> state:CONNECTED
P[ 4] Channel: mISDN/4-1 hanguped new state:CLEANING
P[ 4] $$$ CLEANUP CALLED pid:3
P[ 4] $$$ Cleaning up bc with stid :10010400 pid:3
P[ 4] ec_disable
P[ 4] Sending Control ECHOCAN_OFF
P[ 4] I IND :RELEASE_COMPLETE oad: dad: pid:3 state:CLEANING
P[ 4]  --> channel:0 mode:TE cause:16 ocause:16 rad: cad:
P[ 4]  --> info_dad: onumplan:0 dnumplan:0 rnumplan:0 cpnnumplan:0
P[ 4]  --> caps:Speech pi:0 keypad: sending_complete:0
P[ 4] ast_hangup already called, so we have no ast ptr anymore in 
event(RELEASE_COMPLETE)
P[ 4] hangup_chan
P[ 4] No need to queue hangup
P[ 4] Cannot hangup chan, no ast
P[ 4] release_chan: bc with l3id: 80003
P[ 4] BCHAN: DeACT Conf pid:3
P[ 4] BCHAN: MGR_DELLAYER|CNF pid:3
P[ 4] $$$ CLEANUP CALLED pid:0

Vodafone: (DTMF Works)

P[ 4] I IND :SETUP oad: dad:9298 pid:4 state:none
P[ 4]  --> channel:1 mode:TE cause:16 ocause:16 rad: cad:
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Speech pi:0 keypad: sending_complete:1
P[ 4]  --> Bearer: Speech
P[ 4]  --> Codec: Alaw
P[ 0]  --> * NEW CHANNEL dad:9298 oad:
P[ 4]  --> CTON: Unknown
P[ 4] EXPORT_PID: pid:4
P[ 4]  --> PRES: Restricted (0)
P[ 4]  --> SCREEN: Unscreened (0)
P[ 4] I SEND:PROCEEDING oad: dad:9298 pid:4
P[ 4]  --> bc_state:BCHAN_CLEANED
P[ 4]  --> channel:1 mode:TE cause:16 ocause:16 rad: cad:
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Speech pi:0 keypad: sending_complete:1
   -- Executing Set("mISDN/4-1", "FROM_DID=9298") in new stack
   -- Executing Set("mISDN/4-1", "FAX_RX=disabled") in new stack
   -- Executing Goto("mISDN/4-1", "ivr-4|s|1") in new stack
   -- Goto (ivr-4,s,1)
   -- Executing Set("mISDN/4-1", "LOOPCOUNT=0") in new stack
   -- Executing Set("mISDN/4-1", "__DIR-CONTEXT=default") in new stack
   -- Executing Answer("mISDN/4-1", "") in new stack
P[ 4] * ANSWER:
P[ 4]  --> Connection is without BF encryption
P[ 4]  --> ECHO OFF
P[ 4]  --> None
P[ 4]  --> empty cad using dad
P[ 4] I SEND:CONNECT oad: dad:9298 pid:4
P[ 4]  --> bc_state:BCHAN_CLEANED
P[ 4]  --> channel:1 mode:TE cause:16 ocause:16 rad: cad:9298
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Speech pi:0 keypad: sending_complete:1
P[ 4]  --> TRANSPARENT Mode
P[ 4] ec_enable
   -- Executing Wait("mISDN/4-1", "1") in new stack
P[ 4] BCHAN: bchan ACT Confirm pid:4
P[ 4] MGMT: SSTATUS: L2_ESTABLISH
P[ 4] I IND :CONNECT_ACKNOWLEDGE  oad: dad:9298 pid:4 state:CONNECTED
P[ 4]  --> channel:1 mode:TE cause:16 ocause:16 rad: cad:9298
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Speech pi:0 keypad: sending_complete:1
   -- Executing Set("mISDN/4-1", "TIMEOUT(digit)=3") in new stack
   -- Digit timeout set to 3
   -- Executing Set("mISDN/4-1", "TIMEOUT(response)=10") in new stack
   -- Response timeout set to 10
   -- Executing BackGround("mISDN/4-1", "custom/pronet-incoming") in 
new stack
   -- Playing 'custom/pronet-incoming' (language 'en')
P[ 4] I IND :DTMF_TONE oad: dad:9298 pid:4 state:CONNECTED
P[ 4]  --> channel:1 mode:TE cause:16 ocause:16 rad: cad:9298
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Speech pi:0 keypad: sending_complete:1
P[ 4]  --> DTMF:1
 == CDR updated on mISDN/4-1
   -- Executing Goto("mISDN/4-1", "timeconditions|2|1") in new stack
   -- Goto (timeconditions,2,1)
   -- Executing GotoIfTime("mISDN/4-1", 
"08:30-17:00|mon-fri|*|*?ext-queues|1|1") in new stack
   -- Goto (ext-queues,1,1)
   -- Executing Answer("mISDN/4-1", "") in new stack
   -- Executing GotoIf("mISDN/4-1", "0?USERCID:SETCID") in new stack
   -- Goto (ext-queues,1,4)
   -- Executing Set("mISDN/4-1", "CALLERID(name)=HelpDesk:") in new stack
   -- Executing Set("mISDN/4-1", 
"MONITOR_FILENAME=/var/spool/asterisk/monitor/q1-20061106-143629-1162776983.2") 
in new stack
   -- Executing Queue("mISDN/4-1", "1|t||") in new stack
   -- Started music on hold, class 'default', on mISDN/4-1
   -- Called Local/8004 at from-internal/n
   -- Executing Macro("Local/8004 at from-internal-4df7,2", 
"exten-vm|8004|8004") in new stack
   -- Executing Macro("Local/8004 at from-internal-4df7,2", 
"user-callerid") in new stack
   -- Executing GotoIf("Local/8004 at from-internal-4df7,2", "1?report") 
in new stack
   -- Goto (macro-user-callerid,s,9)
   -- Executing NoOp("Local/8004 at from-internal-4df7,2", "Using CallerID 
"HelpDesk:" <>") in new stack
   -- Executing Set("Local/8004 at from-internal-4df7,2", 
"FROMCONTEXT=exten-vm") in new stack
   -- Executing Set("Local/8004 at from-internal-4df7,2", "VMBOX=8004") in 
new stack
   -- Executing Set("Local/8004 at from-internal-4df7,2", 
"EXTTOCALL=8004") in new stack
   -- Executing Set("Local/8004 at from-internal-4df7,2", "CFUEXT=") in 
new stack
   -- Executing Set("Local/8004 at from-internal-4df7,2", "RT=15") in new 
stack
   -- Executing Macro("Local/8004 at from-internal-4df7,2", 
"record-enable|8004|IN") in new stack
   -- Executing GotoIf("Local/8004 at from-internal-4df7,2", "0 > 0?2:4") 
in new stack
   -- Goto (macro-record-enable,s,4)
   -- Executing AGI("Local/8004 at from-internal-4df7,2", 
"recordingcheck|20061106-143629|1162776989.4") in new stack
   -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
 recordingcheck|20061106-143629|1162776989.4: Inbound recording not enabled
   -- AGI Script recordingcheck completed, returning 0
   -- Executing NoOp("Local/8004 at from-internal-4df7,2", "No recording 
needed") in new stack
   -- Executing GotoIf("Local/8004 at from-internal-4df7,2", 
"1?dolocaldial|1") in new stack
   -- Goto (macro-exten-vm,dolocaldial,1)
   -- Executing Macro("Local/8004 at from-internal-4df7,2", 
"dial||tr|8004") in new stack
   -- Executing AGI("Local/8004 at from-internal-4df7,2", 
"dialparties.agi") in new stack
   -- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
 dialparties.agi: Starting New Dialparties.agi
   --  dialparties.agi: priority is 1
 dialparties.agi: Caller ID name is 'HelpDesk:' number is 'unknown'
 dialparties.agi: Methodology of ring is  'none'
   --  dialparties.agi: Added extension 8004 to extension map
   --  dialparties.agi: Extension 8004 cf is disabled
   --  dialparties.agi: Extension 8004 do not disturb is disabled
   --  dialparties.agi: DbSet CALLTRACE/8004 to unknown
   -- AGI Script dialparties.agi completed, returning 0
   -- Executing Dial("Local/8004 at from-internal-4df7,2", "SIP/8004||tr") 
in new stack
 == Everyone is busy/congested at this time (1:0/0/1)
   -- Executing NoOp("Local/8004 at from-internal-4df7,2", "Returned to 
dolocaldial with DIALSTATUS CHANUNAVAIL") in new stack
   -- Executing Hangup("Local/8004 at from-internal-4df7,2", "") in new stack
 == Spawn extension (from-internal, 8004, 2) exited non-zero on 
'Local/8004 at from-internal-4df7,2'
   -- Executing Macro("Local/8004 at from-internal-4df7,2", "hangupcall") 
in new stack
   -- Executing ResetCDR("Local/8004 at from-internal-4df7,2", "w") in new 
stack
   -- Executing NoCDR("Local/8004 at from-internal-4df7,2", "") in new stack
   -- Executing Wait("Local/8004 at from-internal-4df7,2", "5") in new stack
P[ 4] I IND :DISCONNECT oad: dad:9298 pid:4 state:CONNECTED
P[ 4]  --> channel:1 mode:TE cause:16 ocause:16 rad: cad:9298
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Speech pi:8 keypad: sending_complete:1
P[ 4]  --> org:2 nt:0, inbandavail:1 state:10
P[ 4] hangup_chan
P[ 4]     -- Stopped music on hold on mISDN/4-1
 == Spawn extension (ext-queues, 1, 6) exited non-zero on 'mISDN/4-1'
 == Spawn extension (macro-hangupcall, s, 3) exited non-zero on 
'Local/8004 at from-internal-4df7,2' in macro 'hangupcall'
P[ 4] * IND : HANGUP    pid:4 ctx:ext-queues dad:1 oad:(null) 
State:CONNECTED
 == Spawn extension (macro-hangupcall, s, 3) exited non-zero on 
'Local/8004 at from-internal-4df7,2'
P[ 4]  --> l3id:80004
P[ 4]  --> cause:16
P[ 4]  --> out_cause:16
P[ 4]  --> state:CONNECTED
P[ 4] I SEND:DISCONNECT oad: dad:9298 pid:4
P[ 4]  --> bc_state:BCHAN_ACTIVATED
P[ 4]  --> channel:1 mode:TE cause:16 ocause:16 rad: cad:9298
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Speech pi:8 keypad: sending_complete:1
P[ 4] Channel: mISDN/4-1 hanguped new state:CLEANING
-> queue_hangup
P[ 4] I SEND:RELEASE oad: dad:9298 pid:4
P[ 4]  --> bc_state:BCHAN_ACTIVATED
P[ 4]  --> channel:1 mode:TE cause:16 ocause:-1 rad: cad:9298
P[ 4]  --> info_dad: onumplan:  dnumplan:0 rnumplan:  cpnnumplan:0
P[ 4]  --> caps:Speech pi:8 keypad: sending_complete:1
P[ 4] $$$ CLEANUP CALLED pid:4
P[ 4] $$$ Cleaning up bc with stid :10010400 pid:4
P[ 4] ec_disable
P[ 4] Sending Control ECHOCAN_OFF
P[ 4] I IND :RELEASE_COMPLETE oad: dad: pid:4 state:CLEANING
P[ 4]  --> channel:0 mode:TE cause:16 ocause:16 rad: cad:
P[ 4]  --> info_dad: onumplan:0 dnumplan:0 rnumplan:0 cpnnumplan:0
P[ 4]  --> caps:Speech pi:0 keypad: sending_complete:0
P[ 4] ast_hangup already called, so we have no ast ptr anymore in 
event(RELEASE_COMPLETE)
P[ 4] hangup_chan
P[ 4] No need to queue hangup
P[ 4] Cannot hangup chan, no ast
P[ 4] release_chan: bc with l3id: 80004
P[ 4] BCHAN: DeACT Conf pid:4
P[ 4] BCHAN: MGR_DELLAYER|CNF pid:4
P[ 4] MGMT: SSTATUS: L2_RELEASED
PROHOST100*CLI>






> >
> My misdn config is below. If you need more details, please let me know!
>
>
> #
> # Configuration file for your misdn hardware
> #
> # Usage: /usr/sbin/misdn-init start|stop|restart|config|scan|help
> #
>
> #
> # Card Settings
> #
> # Syntax: card=<number>,<type>[,<option>...]
> #
> #    <number>   count your cards beginning with 1
> #    <type>     either 0x1,0x4 or 0x8 for your hfcmulti hardware,
> #               or the name of your card driver module.
> #    <option>   ulaw       - uLaw (instead of aLaw)
> #               dtmf       - enable DTMF detection on all B-channels
> #               pcm_slave  - set PCM bus into slave mode
> #               ignore_pcm_frameclock   - this E1 is NT without PCM frame
> #                                         clock
> #               rxclock    - use clocking for pcm from ST Port
> #               crystalclock - use clocking for pcm from PLL (genrated 
> on board)
> #               watchdog   - This dual E1 Board has a Watchdog for
> #                            transparent mode
> #
> #
> card=1,0x4, dtmf
>
> #
> # Port settings
> #
> # Syntax: <port_type>=<port_number>[,<port_number>...]
> #
> #    <port_type>    te_ptp              - TE-Mode, PTP
> #                   te_ptmp             - TE-Mode, PTMP
> #                   te_capi_ptp         - TE-Mode (capi), PTP
> #                   te_capi_ptmp        - TE-Mode (capi), PTMP
> #                   nt_ptp              - NT-Mode, PTP
> #                   nt_ptmp             - NT-Mode, PTMP
> #    <port_number>  port that should be considered
> #
> te_ptmp=1,2,3,4
>
> #
> # Port Options
> #
> # Syntax: option=<port_number>,<option>[,<option>...]
> #
> #    <option>  master_clock  - use master clock for this S/T interface
> #                              (only once per chip, only for HFC 8/4)
> #              optical       - optical (only HFC-E1)
> #              los           - report LOS (only HFC-E1)
> #              ais           - report AIS (only HFC-E1)
> #              slip          - report SLIP (only HFC-E1)
> #              nocrc4        - turn off crc4 mode use double frame 
> instead
> #                               (only HFC-E1)
> #
> #option=1,master_clock
> #option=2,ais,nocrc4
> #option=3,optical,los,ais,slip
>
>
> #
> # General Options for your hfcmulti hardware
> #
> # poll=<number>
> #
> #        Only one poll value must be given for all cards.
> #        Give the number of samples for each fifo process.
> #        By default 128 is used. Decrease to reduce delay, increase to
> #        reduce cpu load. If unsure, don't mess with it!!!
> #        Valid is 32, 64, 128, 256.
> #
> # pcm=<number>
> #       #        Give the id of the PCM bus. All PCM busses with the 
> same ID
> #        are expected to be connected and have equal slots.
> #        Only one chip of the PCM bus must be master, the others slave.
> #
> # debug=<number>
> #
> #        Enable debugging (see hfc_multi.h for debug options).
> #
> # dsp_options=<number>
> # #       set this to 2 and you'll have software bridging instead of
> #       hardware bridging.
> #
> #
> # dtmftreshold=<milliseconds>
> #
> #       Here you can tune the sensitivity of the dtmf tone recognizer.
> #
> poll=64
> #pcm=1,1
> # dsp_options=0
> dtmftreshold=100
> debug=0
>
> ------------------------------------------------------------------------
>
>
>
>
>
>
>




 

 



More information about the asterisk-users mailing list