Incoming call hung-up with Sangoma 101D

Hi evrebody, I’m newbie and I try to configure an Asterisk server with FreePBX 2.4.0 and a sangoma card 101D
I have created a Zap trunk g1 and outgoing calls are working well. The zap trunk is conected to a Siemens PBX with extention 8200.
But inbound call is not working, maybe is 'a inbound routing issue ( maybe not correctly configured in Freepbx panel)
I have an inbound route without DID with set destination an extention (1001). The asterisk log, when a call from 8318 (a phone attached to Siemens pbx) is received is here:

-- Accepting call from '8318' to '8200' on channel 0/30, span 1
-- Executing [8200@from-internal:1] ResetCDR("Zap/30-1", "") in new stack
-- Executing [8200@from-internal:2] NoCDR("Zap/30-1", "") in new stack
-- Executing [8200@from-internal:3] Wait("Zap/30-1", "1") in new stack
-- Executing [8200@from-internal:4] Playback("Zap/30-1", "silence/1&cannot-complete-as-dialed&check-number-dial-again|noanswer") in new stack
-- <Zap/30-1> Playing 'silence/1' (language 'en')
-- <Zap/30-1> Playing 'cannot-complete-as-dialed' (language 'en')
-- <Zap/30-1> Playing 'check-number-dial-again' (language 'en')
-- Executing [8200@from-internal:5] Wait("Zap/30-1", "1") in new stack
-- Executing [8200@from-internal:6] Congestion("Zap/30-1", "20") in new stack
-- Channel 0/30, span 1 got hangup request, cause 16

== Spawn extension (from-internal, 8200, 6) exited non-zero on ‘Zap/30-1’
– Executing [h@from-internal:1] Macro(“Zap/30-1”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] ResetCDR(“Zap/30-1”, “w”) in new stack
– Executing [s@macro-hangupcall:2] NoCDR(“Zap/30-1”, “”) in new stack
– Executing [s@macro-hangupcall:3] GotoIf(“Zap/30-1”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing [s@macro-hangupcall:6] GotoIf(“Zap/30-1”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] GotoIf(“Zap/30-1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,11)
– Executing [s@macro-hangupcall:11] Hangup(“Zap/30-1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘Zap/30-1’ in macro ‘hangupcall’
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘Zap/30-1’
– Hungup ‘Zap/30-1’

Any help will be apreciated to undersand why the call is not routed to the 1001 extention.
Thank you.

Nobody can help me???

This looks like an inbound routing issue, but I don’t understand your setup. Are you setup like:

PSTN ==> Siemans ==> Asterisk ==> phones

or PSTN ==> Asterisk ==> Siemans ==> phones ?

You have right. was routing problem. The setiing group of Zap trunk was wrong.
Now it is work.
Thanks

How did you solved the issue?
In inbound routes I am setting an any did / any cid to receive all the calls but I have that same error.
Here is my configuration files:
zapata.conf
[trunkgroups]

[channels]

language=es
context=from-zaptel
signalling=pri_cpe
switchtype=euroisdn
;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=yes
echotraining=800
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no

;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no
;Include genzaptelconf configs
#include zapata-auto.conf

group=1
channel => 1-15
channel => 17-30

channel => 31

;Include AMP configs
#include zapata_additional.conf

and the error is:
– Executing Set(“Zap/30-1”, “DID=2658”) in new stack
– Executing Goto(“Zap/30-1”, “s|1”) in new stack
– Goto (from-zaptel,s,1)
– Executing NoOp(“Zap/30-1”, “Entering from-zaptel with DID == 2658”) in new stack
– Executing Ringing(“Zap/30-1”, “”) in new stack
– Executing Set(“Zap/30-1”, “DID=2658”) in new stack
– Executing NoOp(“Zap/30-1”, “DID is now 2658”) in new stack
– Executing GotoIf(“Zap/30-1”, “1?zapok:notzap”) in new stack
– Goto (from-zaptel,s,8)
– Executing NoOp(“Zap/30-1”, “Is a Zaptel Channel”) in new stack
– Executing Set(“Zap/30-1”, “CHAN=30-1”) in new stack
– Executing Set(“Zap/30-1”, “CHAN=30”) in new stack
– Executing Macro(“Zap/30-1”, “from-zaptel-30|2658|1”) in new stack
Apr 16 16:53:13 WARNING[18046]: app_macro.c:208 macro_exec: No such context ‘macro-from-zaptel-30’ for macro ‘from-zaptel-30’
– Executing NoOp(“Zap/30-1”, “Returned from Macro from-zaptel-30”) in new stack
– Executing Goto(“Zap/30-1”, “from-pstn|2658|1”) in new stack
– Goto (from-pstn,2658,1)
– Executing ResetCDR(“Zap/30-1”, “”) in new stack
– Executing NoCDR(“Zap/30-1”, “”) in new stack
Apr 16 16:53:13 NOTICE[18046]: cdr.c:443 ast_cdr_free: CDR on channel ‘Zap/30-1’ not posted
Apr 16 16:53:13 NOTICE[18046]: cdr.c:445 ast_cdr_free: CDR on channel ‘Zap/30-1’ lacks end
– Executing Wait(“Zap/30-1”, “1”) in new stack
– Executing Playback(“Zap/30-1”, “silence/1&cannot-complete-as-dialed&check-number-dial-again|noanswer”) in new stack
– Playing ‘silence/1’ (language ‘es’)
– Playing ‘cannot-complete-as-dialed’ (language ‘es’)

Thanks in advance.
Cantina