[HELP] handling calls from multiple incoming trunks


#1

Newbie here, almost everything is working fine except… Using AAH 2.8 with a Digium TDM400P (2xFXO & 2xFXS) all ports full. Have made various hand edits to extension_custom.conf to get it working just right (nothing like vi and the cli to keep an old dog happy). Can make and receive calls from each pstn just fine. Problem - want to be able to handle incoming calls from each Zap port differently but can’t, for the life of me figure out how.

exten => s,x,x,x just grabs whatever comes in, how do I tell which Zap trunk it came in on?

Thanks
Mark


#2

OK, I’ve done a lot of work in the last few hours. Watching everything go by in the CLI it clearly says that the channel is called “Zap/4-1” and I can see that name getting passed thru the DialPlan. I am using ${CHANNEL} but no matter how hard I try I can’t seem to construct an exten that will trigger on it. Any thoughts? Here is one try. (Remember this is using AAH and this bit is in extension_custom.conf.)

[ext-did-custom]
exten => s,2,GotoIf($["${CHANNEL}" = “Zap/4-1”]?Zap/4-1,1)
exten => Zap/4-1,n,Goto(ext-local,102,1)


#3

Just an FYI – The latest version of freePBX (2.1 Beta 1 currently in Development) allows you to create Inbound Routes based on Zaptel channels.


#4

[quote=“marks”]Newbie here, almost everything is working fine except… Using AAH 2.8 with a Digium TDM400P (2xFXO & 2xFXS) all ports full. Have made various hand edits to extension_custom.conf to get it working just right (nothing like vi and the cli to keep an old dog happy). Can make and receive calls from each pstn just fine. Problem - want to be able to handle incoming calls from each Zap port differently but can’t, for the life of me figure out how.

exten => s,x,x,x just grabs whatever comes in, how do I tell which Zap trunk it came in on?

Thanks
Mark[/quote]

Define the span of each trunk via the context-line in the zapata.conf, insert a

eg.
context=incoming-analog1
after the group or channel line.

You can do this for every “group” (which is every trunk in your case).


#5

Thanks for the replies but I’m still stumped. (Djelibeybi - I’ll keep my eye out for 2.1 when it comes out of beta. I’m on 2.0.1 now.) RichardHH - Once I place the “context” lines in zapata.conf how do I refer to them in my dialplan?