Skip to main content

Zap Channel Routing

Posted by shaun on Thu, 11/22/2007

In 'Inbound Routes', it would be good if one can define Zap channels as well as 'DID/Pattern'. There are quite few scenarios where we're needed to route by zap channel.


Submitted by thirdlane on Fri, 11/23/2007 Permalink

Hi Shaun,

Are you doing this by hand now? If so, could you post the code that handles that?

Are you doing it by channel or group, or both?

Submitted by shaun on Sun, 11/25/2007 Permalink

Hi Alex,

At the moment as a interim/testing measure, I've been going by channel.

eg: GotoIf($["${CHANNEL:0:3}"="Zap"]

It would be better to define a group for each zap channel in zapata.conf (not that I have a lot experience with this). Then have the group in zap.conf map to a context/macro that dials certain extensions/applications/etc.

example:

Zap 1 is for sales (ring 200, 201, etc)

Zap 2 is for accounts (ring 300, 301, etc)

-Shaun

Submitted by isrighthere on Thu, 03/06/2008 Permalink

My method was to add the following lines to user_extensions.include and zapata.conf:

(where 01189222222 and 01189111111 are the telephone numbers on my 2 Zap analogue telehone lines)

Once done all i needed to do was add an "inbound route" for those DDIs as normal, to pass the call to wherever i needed.

---------------------------------------------------------------------------------------------

/etc/asterisk/user_extensions.include

[from-outside-zap1]

exten => s,1,Set(__INCOMINGCLI=${CALLERID(num)})

exten => s,2,Goto(from-outside-redir,01189111111,1)

[from-outside-zap2]

exten => s,1,Set(__INCOMINGCLI=${CALLERID(num)})

exten => s,2,Goto(from-outside-redir,01189222222,1)

---------------------------------------------------------------------------------------------

/etc/asterisk/zapata.conf

context=from-outside-zap1

group=1

callgroup=1

pickupgroup=1

rxgain=3.0

txgain=3.0

signalling=fxs_ks

channel => 1

context=from-outside-zap2

group=1

callgroup=1

pickupgroup=1

rxgain=3.0

txgain=3.0

signalling=fxs_ks

channel => 2