Analog phone can't dial in zap channel


#1

Hello,

I have a system with two cards: a HFC-PCI ISDN and a TDM21B (2 FXO and 1 FXS), running Asterisk 1.2.4-BRIstuffed-0.3.0-PRE-1l with AMP dialplan.

I have connected an analog phone to TDM FXS port, but when I pickup the phone to make a call, Asterisk “hangs up” the call. Let me explain:

In another system, when I pickup the phone, Asterisk give me tone to dial:

Mar 23 10:51:02 VERBOSE[4527] logger.c:     -- Starting simple switch on 'Zap/1-1'
Mar 23 10:51:03 DEBUG[4527] chan_zap.c: DTMF digit: 1 on Zap/1-1
Mar 23 10:51:04 DEBUG[4527] chan_zap.c: DTMF digit: 0 on Zap/1-1
Mar 23 10:51:05 DEBUG[4527] chan_zap.c: DTMF digit: 4 on Zap/1-1
Mar 23 10:51:05 DEBUG[4527] chan_zap.c: Enabled echo cancellation on channel 1
...

But in this system, when I pickup the phone, Asterisk says:

Mar 24 16:17:27 DEBUG[3861] chan_zap.c: Enabled echo cancellation on channel 5
Mar 24 16:17:27 VERBOSE[3951] logger.c:     -- Executing Macro("Zap/5-1", "hangupcall") in new stack
Mar 24 16:17:27 VERBOSE[3951] logger.c:     -- Executing ResetCDR("Zap/5-1", "w") in new stack
Mar 24 16:17:27 DEBUG[3951] cdr_addon_mysql.c: cdr_mysql: inserting a CDR record.
Mar 24 16:17:27 DEBUG[3951] cdr_addon_mysql.c: cdr_mysql: SQL command as follows: INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dst
channel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode) VALUES ('2006-03-24 16:17:27','','','s','from-internal', 'Zap/5-1
','','ResetCDR','w',0,0,'NO ANSWER',3,'')
Mar 24 16:17:27 VERBOSE[3951] logger.c:     -- Executing NoCDR("Zap/5-1", "") in new stack
Mar 24 16:17:27 WARNING[3951] cdr.c: CDR on channel 'Zap/5-1' not posted
Mar 24 16:17:27 WARNING[3951] cdr.c: CDR on channel 'Zap/5-1' lacks end
Mar 24 16:17:27 VERBOSE[3951] logger.c:     -- Executing Wait("Zap/5-1", "5") in new stack
Mar 24 16:17:32 VERBOSE[3951] logger.c:     -- Executing Hangup("Zap/5-1", "") in new stack
Mar 24 16:17:32 VERBOSE[3951] logger.c:   == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'Zap/5-1' in macro 'hangupcall'
Mar 24 16:17:32 VERBOSE[3951] logger.c:   == Spawn extension (from-internal, s, 1) exited non-zero on 'Zap/5-1'
Mar 24 16:17:32 VERBOSE[3951] logger.c:     -- Executing Macro("Zap/5-1", "hangupcall") in new stack
Mar 24 16:17:32 VERBOSE[3951] logger.c:     -- Executing ResetCDR("Zap/5-1", "w") in new stack
Mar 24 16:17:32 VERBOSE[3951] logger.c:     -- Executing NoCDR("Zap/5-1", "") in new stack
Mar 24 16:17:32 VERBOSE[3951] logger.c:     -- Executing Wait("Zap/5-1", "5") in new stack
Mar 24 16:17:35 DEBUG[3951] chan_zap.c: DTMF digit: 1 on Zap/5-1
Mar 24 16:17:35 DEBUG[3951] chan_zap.c: DTMF digit: 1 on Zap/5-1
Mar 24 16:17:37 VERBOSE[3951] logger.c:     -- Executing Hangup("Zap/5-1", "") in new stack
Mar 24 16:17:37 VERBOSE[3951] logger.c:   == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'Zap/5-1' in macro 'hangupcall'
Mar 24 16:17:37 VERBOSE[3951] logger.c:   == Spawn extension (from-internal, h, 1) exited non-zero on 'Zap/5-1'
Mar 24 16:17:37 DEBUG[3951] chan_zap.c: Hangup: channel: 5 index = 0, normal = 20, callwait = -1, thirdcall = -1
Mar 24 16:17:37 DEBUG[3951] chan_zap.c: disabled echo cancellation on channel 5
Mar 24 16:17:37 DEBUG[3951] chan_zap.c: Set option TDD MODE, value: OFF(0) on Zap/5-1
Mar 24 16:17:37 DEBUG[3951] chan_zap.c: Updated conferencing on 5, with 0 conference users
Mar 24 16:17:37 VERBOSE[3951] logger.c:     -- Hungup 'Zap/5-1'
Mar 24 16:17:41 DEBUG[3861] chan_zap.c: disabled echo cancellation on channel 5

I don’t know why asterisk executes macro “hangupcall” when I pickup the phone… :confused:

My zaptel.conf

loadzone=es
defaultzone=es
span=1,1,3,ccs,ami
bchan=1-2
dchan=3
fxoks=5
fxsks=6-7

and my zapata.conf

[channels]
language=es
context=default
usecallerid=yes
callerid=asreceived
callwaiting=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
musiconhold=default
useincomingcalleridonzaptransfer=yes

; tarjeta rdsi hfc-s
signalling=bri_cpe_ptmp
switchtype=euroisdn
language=es
pridialplan=local
prilocaldialplan=local
rxwink=300
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
nationalprefix = 0
internationalprefix = 00
faxdetect=incoming
group=0
callgroup=1
pickupgroup=1
immediate=yes
context=from-pstn
channel => 1-2

signalling=fxo_ks
context=from-internal
callerid=asreceived
callgroup=1
pickupgroup=1
group=1
channel=>5

signalling=fxs_ks
context=from-pstn
faxdetect=incoming
callerid=asreceived
group=0
answeronpolarityswitch=yes
hanguponpolarityswitch=yes
channel=>6-7

If you need more information, please ask me. Thanks for your help.