[Asterisk-Users] Interface * with ATA from ATA FXS port? (Here I go again)

Robert Webb asterisk at ropeguru.com
Sun Feb 27 13:29:22 MST 2005


Well, I thought I had my problem solved, but it is acting up again.
Hopefully this time I can provide enough information.

What I have is an * box setup with one X100P and TDM400 with one FXO and
one FXS. For my regular setup with interfacing with my PSTN and my
entire house with analog phones, the box is working great.

I am trying to interface a Mediatrix 1202 device to my * box via the
Mediatrix FXS port, I have VoIP service through Broadvox Direct, to one
of the FXO ports on my * box. The issues I am having are happening with
both the X100P and TDM FXO ports.

The issue I am seeing is that the FXO on * is detecting the ring and *
is picking up the line and running through the setup I have in the
extensions.conf. But the Mediatrix is not recognizing that the * box has
answered the line and continues to ring and then dump into voicemail
with Broadvox Direct.

In the output below, you will see where ZAP/1 answers but then show a
warning where it is still detecting ringing even though the port is
supposed to be off hook. 

NOTE: This never happens with a standard PSTN connection and I have
tested this on both FXO ports with the same results.

Connected to Asterisk CVS-v1-0-02/20/05-19:55:21 currently running on
asterisk1 (pid = 29658)
Verbosity is at least 4
    -- Starting simple switch on 'Zap/1-1'
    -- Executing LookupBlacklist("Zap/1-1", "") in new stack
    -- Executing DigitTimeout("Zap/1-1", "3") in new stack
    -- Set Digit Timeout to 3
    -- Executing ResponseTimeout("Zap/1-1", "5") in new stack
    -- Set Response Timeout to 5
    -- Executing Wait("Zap/1-1", "1") in new stack
    -- Executing BackGround("Zap/1-1", "custom/pls-wait") in new stack
    -- Playing 'custom/pls-wait' (language 'en')
Feb 27 15:20:49 WARNING[29659]: chan_zap.c:3428 zt_handle_event:
Ring/Off-hook in strange state 6 on channel 1
    -- Hungup 'Zap/1-1'
    -- Starting simple switch on 'Zap/1-1'
Feb 27 15:21:03 WARNING[29659]: chan_zap.c:5444 ss_thread: CallerID
returned with error on channel 'Zap/1-1'
    -- Executing LookupBlacklist("Zap/1-1", "") in new stack
    -- Executing DigitTimeout("Zap/1-1", "3") in new stack
    -- Set Digit Timeout to 3
    -- Executing ResponseTimeout("Zap/1-1", "5") in new stack
    -- Set Response Timeout to 5
    -- Executing Wait("Zap/1-1", "1") in new stack
    -- Executing BackGround("Zap/1-1", "custom/pls-wait") in new stack
    -- Playing 'custom/pls-wait' (language 'en')
    -- Hungup 'Zap/1-1'

Here is my incoming extensions.conf dialplan:

[globals]

FWDNUMBER=223611 ; your calling number
FWDCIDNAME="Robert Webb"; your caller id
FWDPASSWORD=password ; your password
FWDRINGS=IAX2/rwebb ; the phone to ring
FWDVMBOX=2002 ; the VM box for this user

ANALOGPHONE=zap/2
OFFICEPHONE=SIP/2002
LAPTOPPHONE=IAX2/rwebb

VMBOX=2000
PSTNOUT=zap/5


[fromPSTN]

exten => s,1,LookupBlacklist
exten => s,2,DigitTimeout(3)
exten => s,3,ResponseTimeout(5)
exten => s,4,Wait(1)
exten => s,5,Background(custom/pls-wait)
exten => s,102,Goto(blacklisted,s,1)

exten => t,1,Dial(${ANALOGPHONE}&${OFFICEPHONE}&${LAPTOPPHONE},15,m)
exten => t,2,Voicemail,u${VMBOX}
exten => t,3,Hangup

exten => 123,1,VoicemailMain,2000
exten => 123,2,Hangup

exten => 2001,1,Ringing
exten => 2001,2,Dial(${LAPTOPPHONE},15,m)
exten => 2001,3,VoiceMail,2001
exten => 2001,4,Hangup

exten => 2002,1,Ringing
exten => 2002,2,NoOp(CALLERID=${CALLERID})
exten => 2002,3,Dial(SIP/2002,15,m)
exten => 2002,4,VoiceMail,2002
exten => 2002,5,Hangup

exten => 999,1,WaitMusicOnHold(120)
exten => 999,2,Hangup

exten => a,1,VoicemailMain,2000
exten => a,2,Hangup

exten => i,1,Wait(1)
exten => i,2,Background(pbx-invalid)   ; "That's not valid, try again"
exten => i,3,Goto(s,105)

;exten => t,1,Background(goodbye)
;exten => t,2,Hangup


Zaptel.conf

#
# Zaptel Configuration File
#
# This file is parsed by the Zaptel Configurator, ztcfg

fxsks=5
fxsls=1
fxoks=2
loadzone = us
defaultzone=us


Zapata.conf

[channels]

context=analog
signalling=fxo_ks
echocancel=128
echocancelwhenbridged=yes
echotraining=800
relaxdtmf=yes
rxgain=0.0
txgain=5.0
busydetect=yes
busycount=6
callprogress=yes
usecallerid=yes
callwaiting=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
callreturn=yes
cancallforward=yes
adsi=yes
mailbox = 2000
faxdetect=incoming
channel => 2

context = fromPSTN
signalling=fxs_ks
rxgain=0.0
txgain=0.0
channel => 5

context = fromPSTN
signalling = fxs_ls
rxgain=-10
channel => 1



One additional note. When running the ztmonitor utility with everything
at idle and the Mediatrix plugged into the FXO port I see this:

Visual Audio Levels.
--------------------
 Use zapata.conf file to adjust the gains if needed.

( # = Audio Level  * = Max Audio Hit )
<----------------(RX)---------------->
<----------------(TX)---------------->
###################*


But as soon as I disconnect the phone cord I see:

Visual Audio Levels.
--------------------
 Use zapata.conf file to adjust the gains if needed.

( # = Audio Level  * = Max Audio Hit )
<----------------(RX)---------------->
<----------------(TX)---------------->


I have also tried several different phone cords with this same setup.

Any ideas?? 

Will be glad to provide any additional info you made need. I did not see
any type of debugging for the ZAP channels like there are for SIP and
IAX or else I would have provided some of that info also.

Robert






More information about the asterisk-users mailing list