Asterisk sees the pots but won't answer tdm400p

OK, what I have is the digium tdm400p 4port card with 1 FXO card in the 4th port and 1 FXS card in the first port.
I am connecting to POTS through an analog port on a traditional PBX. I have a few softphones, a few cisoc 79xx phones and I can call out with those asterisk extensions
just fine. Here is where I get confused. I created a trunk (zap/g0) created extensions (phones wouldn’t work otherwise), created in and outbound routes, and it will NOT answer
an incoming call on the zap trunk.
I noticed through the FOP that asterisk is seeing the call coming in. I can even drag and drop the call to an extension and it will answer.

I sure could use some pointing in the correct direction.
here are my conf files if they help.

; Autogenerated by /usr/local/sbin/genzaptelconf – do not hand edit
; Zaptel Channels Configurations (zapata.conf)
;
; This is not intended to be a complete zapata.conf. Rather, it is intended
; to be #include-d by /etc/zapata.conf that will include the global settings
;
callerid=asreceived

; Span 1: WCTDM/0 “Wildcard TDM400P REV I Board 1”
; channel 1, WCTDM, inactive.
; channel 2, WCTDM, inactive.
; channel 3, WCTDM, inactive.
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 4
context=from-pstn
group=0
channel => 4


;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-analog
signalling=fxo_ks
rxwink=300 ; Atlas seems to use long (250ms) winks
;
; Whether or not to do distinctive ring detection on FXO lines
;
;usedistinctiveringdetection=yes

usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no
;channel => 0
;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no

;Include genzaptelconf configs
#include zapata-auto.conf

group=1

;Include AMP configs
#include zapata_additional.conf


Autogenerated by /usr/local/sbin/genzaptelconf – do not hand edit

Zaptel Configuration File

This file is parsed by the Zaptel Configurator, ztcfg

It must be in the module loading order

Span 1: WCTDM/0 “Wildcard TDM400P REV I Board 1”

channel 1, WCTDM, inactive.

channel 2, WCTDM, inactive.

channel 3, WCTDM, inactive.

fxsks=4

Global data

loadzone = us
defaultzone = us

in extensions.conf what do you have under the context from-pstn. Do you have asterisk set to pick up the calls ?

THank you for your help!!

I will have to check, but I did setup in bound and outbound routes and the trunk for the zaptel and the extensions for the phones.

Are you saying I should create an extension for the trunk?

; Asterisk Management Portal (AMP)
; Copyright © 2004 Coalescent Systems Inc

; dialparties.agi (sprackett.com/asterisk/)
; Asterisk::AGI (asterisk.gnuinter.net/)
; gsm (ibiblio.org/pub/Linux/utils/ … short.html)
; loligo sounds (loligo.com/asterisk/sounds/)
; mpg123 (voip-info.org/wiki-Asterisk+conf … nhold.conf)

; include extension contexts generated from AMP
#include extensions_additional.conf

; Customizations to this dialplan should be made in extensions_custom.conf
; See extensions_custom.conf.sample for an example
#include extensions_custom.conf

[from-trunk] ; just an alias since VoIP shouldn’t be called PSTN
include => from-pstn

[from-pstn]
include => from-pstn-custom ; create this context in extensions_custom.conf to include customizations
include => ext-findmefollow ; MODIFICATOIN (PL) for findmefollow if enabled, should be bofore ext-local
include => ext-did-direct ; MODIFICATOIN (PL) put before ext-did to take precedence
include => ext-did
exten => fax,1,Goto(ext-fax,in_fax,1)

; MODIFICATION (PL)
;
; Required to assure that direct dids go to personal ring group before local extension.
; This could be auto-generated however I it is prefered to be put here and hard coded
; so that it can be modified if ext-local should take precedence in certain situations.
; will have to decide what to do later.
;
[from-did-direct]
include => ext-findmefollow
include => ext-local

OK, it now answers on the third ring but does not go anywhere (just dead air).
Outbound dialing still works just fine and I am thinking this is simply a scripting (is that the correct word??) issue on my part.
If anyone has a simple example for inbound answering exten=> …
I would sure appreciate a look.
thank you.

Make sure that you have the context set up correct for that specific ZAP channel or channels and then add the following into that context in extensions.conf

exten => s,1,Answer ;Answer the call
exten => s,2,Musiconhold ;Play the MOH music for them
exten => s,3,hangup ; When the call is done hang up

Thank you dave!
I obviously have more serious problems here.
I put in what you said under the contexxt "incoming"
It does not see it.
I’ll keep working on it.

The softphones work great and the outbound through the pots is fine. I even got the streaming music on hold to work.

lrisley,

If you created an “incoming” context in your extensions.conf with the Dave’s code, did you change the context in your zapata.conf file from “from-pstn” to “incoming”? Or move the code from incoming to from-pstn in your extensions.conf. Your initial post show the zap channel 4 going to context from-pstn

I removed the [from-pstn] context.
I put in the following under the [incoming] context:

[incoming]
exten => s,1,Answer ;Answer the call
exten => s,2,Dial(SIP1000&SIP2000,5,tr)
exten => s,3,Voicemail,u1000
exten => s,102,Voicemail,b1000

The output I see from sterisk shows:
starting simple switch on 'Zap/4-1’
Executing Answer(Zap/4-1)
Executing Dial(“Zap/4-1”,“SIP1000&SIP2000|5|tr”)
Hangup ‘Zap/4-1’

I thought the answer and dial with the TR would answer the incoming call, dial extensions 1000 and 2000 and transfer.
All that happens is it hangs up (within 2 seconds)

if you’re still learning how this all works, it would be much less frustrating to use a distro like asterisk@home (now trixbox), since this all “just works”.