[RESOLVED] TDM400 dials digits before dialtone


#1

I suspect I am missing something very simple.

When I try to use “9” to dial out using an FXO loopstart port on the TDM400, the system seems to be dialing the digits before waiting for the central office to return dialtone.

Here is the relevant information from extensions.conf:

[Outgoing]
exten => _9X.,1,Dial(Zap/1/${EXTEN:1},T)

When an X-lite SIP softphone tries to dial 9 followed by a number, the first digit of the number is dialed BEFORE the central office provides dialtone. I can prove this by padding the number with one extra digit. If I put more channels into the Dial command, it dials ALL of the digits before the central office provides dialtone.

[Outgoing]
exten => _9X.,1,Dial(Zap/1&Zap/2/${EXTEN:1},T)

I have tried several things, including changing to kewlstart (no change) and using:

ingorepat => 9

Somewhere, there must be some timers that tell the system how long to wait before dialing digits on a Zap channel.

Can anyone point me there? Thanks.

CONFIGURATION INFORMATION:

Output from asterisk console when the user dials ‘96025501694’:

Executing Dial(“SIP/Matt-3c2b”, “Zap/1/6025501694||T”) in new stack
– Called 1/6025501694
– Zap/1-1 answered SIP/Matt-3c2b

From zaptel.conf:

fxsls=1-4
loadzone = us
defaultzone=us

Output from 'ztcfg -vvv":

Zaptel Configuration

Channel map:

Channel 01: FXS Loopstart (Default) (Slaves: 01)
Channel 02: FXS Loopstart (Default) (Slaves: 02)
Channel 03: FXS Loopstart (Default) (Slaves: 03)
Channel 04: FXS Loopstart (Default) (Slaves: 04)

4 channels configured.

From extensions.conf:

[Outgoing]

ingorepat => 9
exten => _9X.,1,Dial(Zap/1/${EXTEN:1},T)

From sip.conf:

[Matt]

username=Matt ; This is the username the device should use for authentication.

type=friend ; The friend type allows this device to authenticate both incoming
; and outgoing calls (user would be for incoming, peer for outgoing).

secret=xxxxx ; Here is the password used to authenticate this phone to the system.

qualify=2000 ; This tells the system to only connect to the phone if it is within
; 2000 milliseconds.

nat=no ; There is no NAT between this device and the system.

host=dynamic ; The device will register with us.

canreinvite=yes ; This allows Asterisk to leave the media path. If we set it to “no”,
; Asterisk will always be in the media path and will tie up CPU resources.

context=Internal ; This is the name that we must reference in extensions.conf to define
; the instructions for this device.

From zapata.conf:

; Define each of the Zapata channels.

[channels]

; Here are the default settings for all of the channels. Redefine something BEFORE defining
; the channel number if you want to change it for a particular channel.

callwaiting=no ; We do not have call waiting.

threewaycalling=yes ; Three way calling using the central office
; is enabled (while on a call, hookflash
; dial the next person, hookflash again to reconnect).
; However, I don’t know how to tell Asterisk to pass
; the hookflash through to the public network!

transfer=yes ; Transfer using the central office
; is enabled (while on a call, hookflash
; dial the destination, hangup to complete).
; However, I don’t know how to tell Asterisk to pass
; the hookflash through to the public network!

echocancel=yes ; We do want to perform echo cancellation since these
echotraining=yes ; are analog lines likely to have echo. If we set
; echotraining to yes, Asterisk sends a tone at the
; beginning of the conversation to speed up the task
; of learning the echo patterns so they can be cancelled.

context=PublicNetworkRingin ; Ring-ins go to the PublicNetworkRingin context
; in extensions.conf.

signalling=fxs_ls ; These are FXO loopstart lines, so we want them to use
; FXS loopstart signalling (the card needs to appear
; to the public network as if it is a phone).

; Define channel 1 (480-857-8671).

usercallerid=yes ; This channel has caller ID.

hidecallerid=no ; No reason to hide the caller ID info.

channel => 1 ; This defines the channel.

; Define channel 2 (480-857-1363).

usercallerid=no ; This channel DOES NOT have caller ID.

channel => 2 ; This defines the channel.


#2

Hi,
I think this with the “T” in your extension.conf. You just add “r” in place of
"T" .Check this also. Hope this will help you.

exten => _9X.,1,Dial(Zap/1/${EXTEN:1},T) change to…
exten => _9X.,1,Dial(Zap/1/${EXTEN:1},r)

Regards
ijb


#3

ijb,

Thank you for your suggestions. My research shows that the “r” flag simply tells Asterisk to provide ringback tone to the caller while Asterisk attempts to bridge the caller to the Zap FXO channel. Use of the “r” flag is GENERALLY not recommended as Asterisk will provide it’s own progress tones.

However, I tried your suggestion and the results were predictable. The user heard ringback tone while Asterisk attempted to bridge the channels, but the Zap FXO channel still dialed the first digit before receiving dialtone.

I’m beginning to suspect something went wrong during my build or install of the drivers, as this would seem to be a problem on the TDM400. Can anyone confirm that it is the TDM400 that should wait for dialtone detection, and that it is the TDM400 that should dial the digits?

Thanks.


#4

I found a workaround that works for the problem in the single channel case. I simply put a couple of "w"s at the beginning of the number to be dialed.

A “w” (probably stands for “wait”) causes the TDM400 to pause 1/2 second. By putting in two "w"s, then, I caused the TDM400 to pause for one full second before dialing.

So, my dial command now reads:

exten => _9X.,1,Dial(Zap/1/ww${EXTEN:1},T)

Here is a link to the post that helped me out:

http://www.voip-info.org/wiki/index.php?page=Asterisk+ZAP+channels

Unfortunately, that workaround does not work when more than one channel is involved. In other words, if I change extensions.conf to:

exten => _9X.,1,Dial(Zap/1&Zap/2/ww${EXTEN:1},T)

The digits still don’t get dialed.

Does anyone have a clue about this? Thanks.


#5

Thanks to the Kinsey at Digium these questions have been answered.

To start, the “w” before the outside number is sometimes required. The TDM400 does not wait to detect dialtone nor does it have any programmable timers. In many cases, you won’t need to put in the pause, it depends on the speed of your machine, the load, etc.

For my second case, I was using the wrong syntax for the dial command. Instead of:

exten => _9X.,1,Dial(Zap/1&Zap/2/${EXTEN:1},T)

I should have used:

exten => _9X.,1,Dial(Zap/1/${EXTEN:1}&Zap/2/${EXTEN:1},T)

Thanks again to Kinsey for helping out.