Restriction for extension
Hi, I have a problem that for me is compicated to explain, I use Trixbox 2.2.12 and I want to do restriction based on internal extension number.
Now I have two isdn card that referred to two different digital line, for example the first digital line is identificated such 81123456 (isdn card 1) and the second digital line is identificated such 81654321 (isdn card 2), then I have the extension 100,101,102,103.
My purpose is that the extension number 100 and 101 must be used for to external call only the isdn card 1 (81123456) and the extension number 102 and 103 must be used for external call only the isdn card 2 (81654321), unfortunately now all extension to use all isdn cards and I don't want this situation.
What parameters I must to work for to obtain my purpose ?
My conf is,
sip.conf:
[general]
#include sip_general_additional.conf
language=it
bindport = 5060
bindaddr = 0.0.0.0
disallow=all
allow=ulaw
allow=alaw
context = from-sip-external
callerid = Unknown
tos=0x68
notifyringing=yes
notifyhold=yes
limitonpeers=yes
#include sip_general_custom.conf
#include sip_nat.conf
#include sip_registrations_custom.conf
#include sip_registrations.conf
#include sip_custom.conf
#include sip_additional.conf
#include sip_custom_post.conf
zapata.conf:
[trunkgroups]
[channels]
language=it
context=from-pstn
signalling=bri_net
priindication=outofband
rxwink=300
pridialplan=local
prilocaldialplan=local
switchtype=euroisdn
pmp_l1_check=no
nodialtone=no
te_choose_channel=no
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
rxgain=0.0
txgain=0.0
group=0
channel=>1-2
channel=>4-5
callgroup=1
pickupgroup=1
immediate=no
faxdetect=incoming
#include zapata-auto.conf
group=1
context=from-pstn
channel=>1-2
channel=>4-5
#include zapata_additional.conf
#include zapata-BRI-HFC.conf
zapata-BRI-HFC:
resetinterval=never
immediate=no
switchtype=euroisdn
signalling=bri_cpe
pridialplan=dynamic
prilocaldialplan=local
nationalprefix=0
internationalprefix=00
usecallingpres=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=100
context=from-pstn
group=0
channel=>1-2
channel=>4-5
zaptel.conf:
# Span 1: ZTHFC1 "HFC-S PCI A ISDN card 1 [NT]"
span=1,1,3,ccs,ami
bchan=1-2
dchan=3
# Span 2: ZTHFC2 "HFC-S PCI A ISDN card 2 [NT]"
span=2,1,3,ccs,ami
bchan=4-5
dchan=6
Thanks.
-
Salvatore.
Create seperate outbound routes for each trunk (ISDN card 1 and ISDN card 2). Then install the custom contexts module in Freepbx (http://www.aussievoip.com/wiki/freePBX-CustomContexts). Then restrict the outbound routes for each extension in the module.
Hi and thanks for your aid, I have installed freePBX-customcontexts but I have always same question, you say me that I must create separate outbound routes for each trunk, now I have only one trunk called g0, if I have understood correctly I must create also g1 but how can I associate g0 to an ISDN card and g1 to the other ISDN card ?
Now in my configuration I have:
group=0
channel=>1-2
channel=>4-5
group=1
context=from-pstn
channel=>1-2
channel=>4-5
g0 for outgoing call and g1 for incoming call.
The second question is about freePBX-customcontexts modules, I must working about 'Internal Dialplan' for my purpose ??
Thanks.
-
Salvatore
It should look something like:
group=0
context=from-pstn
channel=>1-2
group=1
context=from-pstn
channel=>4-5
This is if channel 1-2 is on your first ISDN card and 4-5 is your second ISDN card.
Thus you would have separate g0 and g1 trunks for each of your cards .
Then create 2 outbound routes...1 for each trunk (g0 and g1 respectively)
Then I would create 2 Custom Contexts .. One for g0 and one for g1
Then I'd "Allow" all with the exception of your outbound routes at the bottom and only allow the outbound (g0) or (g1) you want to allow for each context.
Then go to extensions and each extension will let you choose the custom context in a drop down bottom near the bottom of the sip settings.
Hi, If I have understood correctly I must:
1- modify zapata.conf in this mode:
group=0
context=from-pstn
channel=>1-2
group=1
context=from-pstn
channel=>4-5
2- I must create a second ZAP Trunk called ZAP/g1
3- I must create two custom-context, for example, denominated g0 and g1 and in custom-context g0 in 'Internal Dialplan' I must choose Allow in 'ALL OUTBOUND ROUTES' and then in 'Outbound Routes' choose Allow for outbound route that reference to ZAP/g0 and Deny for outbound route that reference to ZAP/g1
4- in custom-context called g1 I must choose Allow in 'ALL OUTBOUND ROUTES' and then in 'Outbound Routes' choose Deny for outbound route that reference to ZAP/g0 and Allow for outbound route that reference to ZAP/g1
..this step are correct ?
Thanks.
-
Salvatore.
...sorry but I have writed a foolishness about:
>I must choose Allow in 'ALL OUTBOUND ROUTES'
..because I must choose Deny, and then then in 'Outbound Routes' choose Allow for outbound route that reference to ZAP/g0 and Deny for outbound route that reference to ZAP/g1.
-
Salvatore.
Looks good--Assuming channels 1-2 are your first card and 4-5 is your second card. Regarding Allow/Deny, custom context gives you lots of things to allow/deny like features. So I'd start out allowing everything by default, and selectively choose which specific routes to deny based based on your needs. Also you can create a Failover announcement if the route is restricted...
FYI, on my analog cards, the groups are set in the zapata-auto.conf., not my zapata.conf (I have to modify it each time I run genzaptelconf to put each card in a separate group."
; Span 1: WCFXO/0 "Wildcard X101P Board 1"
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 1
context=from-zaptel
group=0
channel => 1
; Span 2: WCFXO/1 "Wildcard X101P Board 2"
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 2
context=from-zaptel
group=1
channel => 2
________________________________________
With your setup, it would look like:
...
group=0
channel=>1-2
group=1
channel=>4-5
zaptel.conf:
# Span 1: ZTHFC1 "HFC-S PCI A ISDN card 1 [NT]"
span=1,1,3,ccs,ami
group=0
bchan=1-2
dchan=3
# Span 2: ZTHFC2 "HFC-S PCI A ISDN card 2 [NT]"
span=2,1,3,ccs,ami
group=1
bchan=4-5
dchan=6
Thanks.


Member Since:
2006-06-23