Zaptel FXO Problem

When dialling a certain series of numbers, i am sending my call out via a FXO line on a TDM400P card with 2 FXS and 2 FXO Ports.

The dial string I am using is
exten => 10,1,Dial(Zap/g1/XXXXXXXX,5,r) (Where XXXXXXX is the number I am dialling)

In the Asterisk CLI i am getting :-

Executing Dial(“SIP/15-09669fb0”, “Zap/3/XXXXXXXX|5|r”) in new stack
– Called 3/0414499222
– Zap/3-1 answered SIP/15-09669fb0

The call goes through and works fine.

However when it dials, it dials the Zaptel line once or twice, then the Zaptel line picks up and dials the number. I am trying to get rid of the that initial dial where it dials the Zaptel Trunk. I am trying to just dial out the Zaptel Trunk, not dial the Zaptel trunk and then it dials the number.

In my zapata.conf i have setup immediate=yes but it makes no difference.

Can anyone offer any assistance??


Not sure what this means. Can you elaborate?

This feature is called ‘batphone’ for a reason - if you are not batman, take this off. (And try again.)

Basically, on the handset you are dialling you can hear one or two rings and then whilst you are looking at the CLI you can see the Zaptel Channel answer. You then get a blank line sound (if you know what i mean) and then it dials out.

I thought the way it should work is when you press the dial key you would hear the blank line and then the number dialling. Not the initial ringing before the zaptel channel answers.

Originally I had immediate=no in the zapata.conf but i thought I would try immediate=yes

Now I understand. This is a matter of perception.

The initial “rings” (called “ring back” in North America) come from ‘r’ option in Dial, faked by Asterisk. When you hear that “blank line sound” (called “dial tone” in North America), that’s when bridge to FXO succeeded, and before the actual ring back from the trunk. This sound comes from PSTN. You should also hear a quick DTMF sequence of the destination number. (Note the initial ring tone you hear before you ‘dial’ is also faked, either by the phone or by Asterisk.)

Two ways to change the experience. One is to take away ‘r’ all together. So initially you’ll hear the fake dial tone; after you dial, you’ll hear a brief silence, followed by PSTN dial tone, followed by quick sequence of DTMF tones, followed by a brief silence, followed by PSTN ring back. You may have unsmooth connection between the two dial tones due to frequency differences but the initial ringing is gone. You can try to tune the initial fake dial tone to match the PSTN dial tone. (Correct country code should cover this.)

Another way is to tune the frequency and cadence of the fake ring back to match PSTN ring back. Except a brief “reappearance” of dial tone and a second brief silence, this should mask the effect of transition.

Both are imperfect. If you use a digital line (such as BRI), use of ‘r’ option should mask all PSTN activities until call is answered. This would be the best experience you expect.

Thanks for that. I will look into it. Im not really concerned about the sounds as much as the underlying way it works.

When i issue the Dial(Zap___) command, it succeeds if the connection to the Zaptel trunk is established. I have a series of Dialstatus events that i check after the call but it will never reach these unless teh call to Zaptel failed.

I have tested this by disconnecting the telephone line from teh Zaptel trunk to simulate a dead line. When i Dial the number it just hangs on the Zaptel trunk until i hangup. So i cant get a Dialstatus of the actual Zaptel dialling. To me this seems like a problem and I cant see a way around it.

Or am I totally incorrect in this??


You are correct in the expectation. But the POTS line will not fulfill this, unfortunately. A lot of what you read is about dealing with information when it is available.