Analog phone can call out but can not answer incoming calls

I am having trouble getting my ptsin phones to answer incoming calls. I have requested help on the trixbox user forum, with no response.
I have installed freePBX 2.3.1.3, the latest stable version. I have installed an AT-530P voip phone as both voip and IAX2, no problem. I can call out and successfully receive calls in. My problem is with the FXO ptsin lines. I can successfully call out from these extensions. But when a call comes in from the outside I can not answer the call. It seems as if it is hanging up once I answer the call. There must be some configuration that I am missing. Below are my settings for extension 5 (the ptsin/FXO port). And the asterisk CLI output.
I hope you can point me in the right direction.

I am using
Asterisk 1.2.26.1 svn rev 79171 on a i686 running Linux on 2007-12-21 21:03:00 UTC

Extension 5
Device Options


This device uses zap technology.
channel 5
context from-internal
immediate no
signalling fxo_ks
echocancel yes
echocancelwhenbridged no
echotraining 800
busydetect yes
busycount 5
callprogress no
dial ZAP/5
accountcode
mailbox 1@default

###asterisk CLI output#####
Connected to Asterisk 1.2.26.1 svn rev 79171 currently running on asterisk1 (pid = 3670)
Verbosity is at least 7
– Starting simple switch on ‘Zap/1-1’
– Executing NoOp(“Zap/1-1”, "Entering from-zaptel with DID == ") in new stack
– Executing Ringing(“Zap/1-1”, “”) in new stack
– Executing Set(“Zap/1-1”, “DID=s”) in new stack
– Executing NoOp(“Zap/1-1”, “DID is now s”) in new stack
– Executing GotoIf(“Zap/1-1”, “1?zapok:notzap”) in new stack
– Goto (from-zaptel,s,8)
– Executing NoOp(“Zap/1-1”, “Is a Zaptel Channel”) in new stack
– Executing Set(“Zap/1-1”, “CHAN=1-1”) in new stack
– Executing Set(“Zap/1-1”, “CHAN=1”) in new stack
– Executing Macro(“Zap/1-1”, “from-zaptel-1|s|1”) in new stack
– Executing NoOp(“Zap/1-1”, “Entering macro-from-zaptel-1 with DID = s”) in new stack
– Executing Gosub(“Zap/1-1”, “app-blacklist-check|s|1”) in new stack
– Executing LookupBlacklist(“Zap/1-1”, “”) in new stack
– Executing GotoIf(“Zap/1-1”, “0?blacklisted”) in new stack
– Executing Return(“Zap/1-1”, “”) in new stack
– Executing Set(“Zap/1-1”, “__FROM_DID=s”) in new stack
– Executing GotoIf(“Zap/1-1”, “0 ?cidok”) in new stack
– Executing Set(“Zap/1-1”, “CALLERID(name)=”) in new stack
– Executing NoOp(“Zap/1-1”, “CallerID is “” <>”) in new stack
– Executing Ringing(“Zap/1-1”, “”) in new stack
– Executing Goto(“Zap/1-1”, “ivr-2|s|1”) in new stack
– Goto (ivr-2,s,1)
== Channel ‘Zap/1-1’ jumping out of macro ‘from-zaptel-1’
– Executing Set(“Zap/1-1”, “LOOPCOUNT=0”) in new stack
– Executing Set(“Zap/1-1”, “__DIR-CONTEXT=default”) in new stack
– Executing Set(“Zap/1-1”, “_IVR_CONTEXT_ivr-2=”) in new stack
– Executing Set(“Zap/1-1”, “_IVR_CONTEXT=ivr-2”) in new stack
– Executing GotoIf(“Zap/1-1”, “0?begin”) in new stack
– Executing Answer(“Zap/1-1”, “”) in new stack
– Executing Wait(“Zap/1-1”, “1”) in new stack
– Executing Set(“Zap/1-1”, “TIMEOUT(digit)=3”) in new stack
– Digit timeout set to 3
– Executing Set(“Zap/1-1”, “TIMEOUT(response)=15”) in new stack
– Response timeout set to 15
– Executing BackGround(“Zap/1-1”, “custom/Welcome”) in new stack
– Playing ‘custom/Welcome’ (language ‘en’)
== CDR updated on Zap/1-1
– Executing DBdel(“Zap/1-1”, “”) in new stack
– Executing Set(“Zap/1-1”, “__NODEST=”) in new stack
– Executing Goto(“Zap/1-1”, “from-did-direct|1|1”) in new stack
– Goto (from-did-direct,1,1)
– Executing GotoIf(“Zap/1-1”, “0?ext-local|1|1”) in new stack
– Executing Macro(“Zap/1-1”, “user-callerid|”) in new stack
– Executing NoOp(“Zap/1-1”, "user-callerid: ") in new stack
– Executing Set(“Zap/1-1”, “AMPUSER=”) in new stack
– Executing GotoIf(“Zap/1-1”, “0?report”) in new stack
– Executing GotoIf(“Zap/1-1”, “0?start”) in new stack
– Executing Set(“Zap/1-1”, “REALCALLERIDNUM=”) in new stack
– Executing NoOp(“Zap/1-1”, "REALCALLERIDNUM is ") in new stack
– Executing Set(“Zap/1-1”, “AMPUSER=”) in new stack
– Executing Set(“Zap/1-1”, “AMPUSERCIDNAME=”) in new stack
– Executing GotoIf(“Zap/1-1”, “1?report”) in new stack
– Goto (macro-user-callerid,s,13)
– Executing NoOp(“Zap/1-1”, "TTL: ARG1: ") in new stack
– Executing GotoIf(“Zap/1-1”, “0?continue”) in new stack
– Executing Set(“Zap/1-1”, “__TTL=64”) in new stack
– Executing GotoIf(“Zap/1-1”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,23)
– Executing NoOp(“Zap/1-1”, “Using CallerID “” <>”) in new stack
– Executing GotoIf(“Zap/1-1”, “1?skipdb”) in new stack
– Goto (from-did-direct,1,5)
– Executing Set(“Zap/1-1”, “__NODEST=”) in new stack
– Executing Set(“Zap/1-1”, “__BLKVM_OVERRIDE=BLKVM/1/Zap/1-1”) in new stack
– Executing Set(“Zap/1-1”, “__BLKVM_BASE=1”) in new stack
– Executing Set(“Zap/1-1”, “DB(BLKVM/1/Zap/1-1)=TRUE”) in new stack
– Executing Set(“Zap/1-1”, “RRNODEST=”) in new stack
– Executing Set(“Zap/1-1”, “__NODEST=1”) in new stack
– Executing Set(“Zap/1-1”, “RecordMethod=Group”) in new stack
– Executing Macro(“Zap/1-1”, “record-enable|1|Group”) in new stack
– Executing GotoIf(“Zap/1-1”, “0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing AGI(“Zap/1-1”, “recordingcheck|20080108-175009|1199843398.22”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“Zap/1-1”, “No recording needed”) in new stack
– Executing Set(“Zap/1-1”, “RingGroupMethod=ringallv2”) in new stack
– Executing Set(“Zap/1-1”, “_FMGRP=1”) in new stack
– Executing GotoIf(“Zap/1-1”, “0?doconfirm”) in new stack
– Executing Macro(“Zap/1-1”, “dial|35|tr|1”) in new stack
– Executing GotoIf(“Zap/1-1”, “1?dial”) in new stack
– Goto (macro-dial,s,3)
– Executing AGI(“Zap/1-1”, “dialparties.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Starting New Dialparties.agi
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Parsing ‘/etc/asterisk/manager_additional.conf’: Found
== Parsing ‘/etc/asterisk/manager_custom.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
dialparties.agi: Caller ID name is ‘unknown’ number is ‘unknown’
dialparties.agi: USE_CONFIRMATION: ‘FALSE’
dialparties.agi: RINGGROUP_INDEX: ‘’
dialparties.agi: Methodology of ring is ‘ringallv2’
– dialparties.agi: Added extension 1 to extension map

dialparties.agi: got fmgrp_prering: 15, fmgrp_grptime: 20
dialparties.agi: fmgrp_totalprering: 35
dialparties.agi: found extension in pre-ring and array
dialparties.agi: ringallv2 ring times: REALPRERING: 35, PRERING: 15
– dialparties.agi: Extension 1 cf is disabled
– dialparties.agi: Extension 1 do not disturb is disabled
dialparties.agi: extnum 1 has: cw: 1; hascfb: 0 hascfu: 0
– dialparties.agi: DbDel CALLTRACE/1 - Caller ID is not defined
dialparties.agi: NODEST: 1 adding M(auto-blkvm) to dialopts: trM(auto-blkvm)
dialparties.agi: NODEST: 1 blkvm enabled macro already in dialopts: trM(auto-blkvm)
== Manager ‘admin’ logged off from 127.0.0.1
– AGI Script dialparties.agi completed, returning 0
– Executing Dial(“Zap/1-1”, “ZAP/5|35|trM(auto-blkvm)”) in new stack
– Called 5
– Zap/5-1 is ringing
– Zap/5-1 is ringing
– Zap/5-1 answered Zap/1-1
– Executing Set(“Zap/5-1”, “__MACRO_RESULT=”) in new stack
– Executing DBdel(“Zap/5-1”, “BLKVM/1/Zap/1-1”) in new stack
– DBdel: family=BLKVM, key=1/Zap/1-1
– Hungup ‘Zap/5-1’
== Spawn extension (macro-dial, s, 10) exited non-zero on ‘Zap/1-1’ in macro ‘dial’
== Spawn extension (macro-dial, s, 10) exited non-zero on ‘Zap/1-1’
– Executing Macro(“Zap/1-1”, “hangupcall”) in new stack
– Executing ResetCDR(“Zap/1-1”, “w”) in new stack
– Executing NoCDR(“Zap/1-1”, “”) in new stack
– Executing GotoIf(“Zap/1-1”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing GotoIf(“Zap/1-1”, “0?skipblkvm”) in new stack
– Executing NoOp(“Zap/1-1”, “Cleaning Up Block VM Flag: BLKVM/1/Zap/1-1”) in new stack
– Executing DBdel(“Zap/1-1”, “BLKVM/1/Zap/1-1”) in new stack
– DBdel: family=BLKVM, key=1/Zap/1-1
– DBdel: Error deleting key from database.
– Executing GotoIf(“Zap/1-1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,11)
– Executing Hangup(“Zap/1-1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘Zap/1-1’ in macro ‘hangupcall’
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’
asterisk1*CLI>
##END asterisk CLI output##

Zaptel Driver Info

Chan Extension Context Language MusicOnHold
pseudo from-internal en
1 from-zaptel en
2 from-zaptel en
3 from-zaptel en
4 from-internal en
5 from-internal en

With four extensions:
-= Registered Asterisk Dial Plan Hints =-
203 : IAX2/203 State:Idle Watchers 0
202 : SIP/202 State:Idle Watchers 0
2 : ZAP/4 State:Idle Watchers 0
1 : ZAP/5 State:Idle Watchers 0

Any suggestions?

Set your channel to ZAP/5.

The guys at FreePBX need to put the “rollover” html code that tells you how to program each field like they did with some other things.