B
B
bacik2014-03-31 09:01:48
Asterisk
bacik, 2014-03-31 09:01:48

DAHDi - how to split incoming routes?

Good afternoon!
Available:
1. PBX on Asterisk
2. Parabel Asteroid for 30 fxo channels for mountains. lines
Needed:
Connect Asteroid to Asterix using the DAHDi driver, configure routing of incoming and outgoing calls through Asteroid.
system.conf:

dynamic=eth,eth0/00:55:55:55:55:00,30,1
fxsls=1-30
alaw=1-30
loadzone=ru
defaultzone=ru

At the moment, Asteroid is attached to Asterisk, Alarm=ok, channels are configured in chan_dahdi.conf:
[channels]
language=ru
busydetect=yes
busycount=3
echocancel=no
echocancelwhenbridged=no
signalling=fxs_ls
context=from-analog
group=1
channel=1-30
#include dahdi-channels.conf
;Include AMP configs
#include chan_dahdi_additional.conf

Incoming call extensions:
[from-analog]
exten => s,1,Answer()
exten => s,n,Dial(SIP/[email protected])
exten => s,n,Hangup()

[from-sip-external]
exten => 111,1,Answer()
exten => 111,n,Dial(SIP/[email protected])
exten => 111,n,Hangup()

The asteroid sends ALL incoming numbers to sip-number 111.
Question - please tell me how to indicate to the asterisk that, for example, from "1" fxo channel Asteroid send an incoming call to sip number 111, and from "2" fxo channel to sip number 222?
Also how to set up outgoing routing - for number 222 outgoing port for example "6"?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2014-03-31
@bacik

For incoming calls, split DAHDI channels into different contexts and/or write a small IVR that will allow the caller to select the number to be connected to.
For outgoing - the route can be determined by the caller-id of the caller, including the mask:

exten => _8XXXXXXXXXX/111, 1, Dial(DAHDI/1/${EXTEN})
exten => _8XXXXXXXXXX/_2XX, 1, Dial(DAHDI/2/${EXTEN})

N
Nikita Melikhov, 2014-04-01
@Sl1mShady

For some reason, people always forget about default configs , in which everything is documented. Look at the very end, everything is described in detail there, if anything - write in a personal, the contacts are in the habroprofile and I left my skype for you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question