VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
devel at starosta.org Guest
|
Posted: Sun Jun 01, 2008 4:00 pm Post subject: [asterisk-users] How to limit extension to allow only intern |
|
|
Hi all,
I'm playing with asterisk and I try to make system for my sister hotel
with aprox. 40 extensions (30 rooms, 1 reception, 2 office, 4 services
phones on each floor). I.ve installed latest version of trixbox (for
GUI) but I made manual modifications.
This is actual server:
- n.1 Pci card with 2 x FXO + 2 x FXS
- n. 2 Trunk to outside (my local Voip provider + 1 PSTN)
I've buyed also 50 telephones from ATCOM (IP530), make all
configurations and now seems all work fine, I can make calls (outside,
inside) make transfer, ecc.
My problem:
I have 4 services phones (each per floor) which must be able to make
only internal calls (not external - no PSTN nor VOiP provider), I've
just look about solution in Google, mailing list, I can't find solution,
please can someone give me an idea ?
NB: sorry for my english ...
Alberto |
|
Back to top |
|
|
asterisk.org at sedwar... Guest
|
Posted: Sun Jun 01, 2008 7:20 pm Post subject: [asterisk-users] How to limit extension to allow only intern |
|
|
On Sun, 1 Jun 2008, DEVEL STAROSTA wrote:
Quote: | I'm playing with asterisk and I try to make system for my sister hotel
with aprox. 40 extensions (30 rooms, 1 reception, 2 office, 4 services
phones on each floor). I.ve installed latest version of trixbox (for
GUI) but I made manual modifications.
This is actual server:
- n.1 Pci card with 2 x FXO + 2 x FXS
- n. 2 Trunk to outside (my local Voip provider + 1 PSTN)
I've buyed also 50 telephones from ATCOM (IP530), make all
configurations and now seems all work fine, I can make calls (outside,
inside) make transfer, ecc.
My problem:
I have 4 services phones (each per floor) which must be able to make
only internal calls (not external - no PSTN nor VOiP provider), I've
just look about solution in Google, mailing list, I can't find solution,
please can someone give me an idea ?
NB: sorry for my english ...
|
One option would be to reference a more restricted context in sip.conf for
these phones.
Thanks in advance,
------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000 |
|
Back to top |
|
|
shmaltz at gmail.com Guest
|
Posted: Sun Jun 01, 2008 7:30 pm Post subject: [asterisk-users] How to limit extension to allow only intern |
|
|
Context create the devices in contexts that don't have access to
outbound dialing. For example:
sip.conf
[phonewithoutbounddialing]
othersettingsgohere
context=all
[phoneinternal]
othersettingsgohere
context=internal
extensions.conf
[all]
exten => _1XXXXXXXXXX,1,Dial(whatever)
include => internal
[internal]
exten => _6XX,1,Dial(Sip/${EXTEN})
the above will work that any device starting in the internal context
will only be able to dial 6XX.
Hope this helps.
On Sun, Jun 1, 2008 at 5:00 PM, DEVEL STAROSTA <devel at starosta.org> wrote:
Quote: | Hi all,
I'm playing with asterisk and I try to make system for my sister hotel
with aprox. 40 extensions (30 rooms, 1 reception, 2 office, 4 services
phones on each floor). I.ve installed latest version of trixbox (for
GUI) but I made manual modifications.
This is actual server:
- n.1 Pci card with 2 x FXO + 2 x FXS
- n. 2 Trunk to outside (my local Voip provider + 1 PSTN)
I've buyed also 50 telephones from ATCOM (IP530), make all
configurations and now seems all work fine, I can make calls (outside,
inside) make transfer, ecc.
My problem:
I have 4 services phones (each per floor) which must be able to make
only internal calls (not external - no PSTN nor VOiP provider), I've
just look about solution in Google, mailing list, I can't find solution,
please can someone give me an idea ?
NB: sorry for my english ...
Alberto
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
|
|
Back to top |
|
|
rizwanhasham at gmail.com Guest
|
Posted: Mon Jun 02, 2008 4:59 am Post subject: [asterisk-users] How to limit extension to allow only intern |
|
|
There is another easier and interesting thing you can do in extensions.conf
to restrict specific dialinmg codes for specific users.
suppose your internal extensions are 4 digits long. your service phones have
did 1111, 1112, 1113.here is the dialplan for all of your phones including
service phones:
[hotel]
;for all other phones
exten=> _1XXXXXXXXXX,1,Dial(${external})
exten=> _011.,1,Dial(${internaltional})
exten=> _XXXX,1,Dial(${internal})
;for service phones
exten=> _1XXXXXXXXXX/1111,1,hangup
exten=> _1XXXXXXXXXX/1112,1,hangup
exten=> _1XXXXXXXXXX/1113,1,hangup
exten=> _1XXXXXXXXXX/1114,1,hangup
exten=> _011./1111,1,hangup
exten=> _011./1112,1,hangup
exten=> _011./1113,1,hangup
exten=> _011./1114,1,hangup
if you dont want to define separate context for every person you can match
his did just like above. This way whenever service phones try to dial a
local or international number they will hangup instead and all other phones
will be able to dialout. try it
On Mon, Jun 2, 2008 at 2:00 AM, DEVEL STAROSTA <devel at starosta.org> wrote:
Quote: | Hi all,
I'm playing with asterisk and I try to make system for my sister hotel
with aprox. 40 extensions (30 rooms, 1 reception, 2 office, 4 services
phones on each floor). I.ve installed latest version of trixbox (for
GUI) but I made manual modifications.
This is actual server:
- n.1 Pci card with 2 x FXO + 2 x FXS
- n. 2 Trunk to outside (my local Voip provider + 1 PSTN)
I've buyed also 50 telephones from ATCOM (IP530), make all
configurations and now seems all work fine, I can make calls (outside,
inside) make transfer, ecc.
My problem:
I have 4 services phones (each per floor) which must be able to make
only internal calls (not external - no PSTN nor VOiP provider), I've
just look about solution in Google, mailing list, I can't find solution,
please can someone give me an idea ?
NB: sorry for my english ...
Alberto
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
--
Best Regards
Rizwan Hisham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080602/3359ccf0/attachment.htm |
|
Back to top |
|
|
asterisk.org at sedwar... Guest
|
Posted: Mon Jun 02, 2008 10:06 am Post subject: [asterisk-users] How to limit extension to allow only intern |
|
|
Quote: | On Mon, Jun 2, 2008 at 2:00 AM, DEVEL STAROSTA <devel at starosta.org> wrote:
Quote: | I'm playing with asterisk and I try to make system for my sister hotel
with aprox. 40 extensions (30 rooms, 1 reception, 2 office, 4 services
phones on each floor). I.ve installed latest version of trixbox (for
GUI) but I made manual modifications.
My problem:
I have 4 services phones (each per floor) which must be able to make
only internal calls (not external - no PSTN nor VOiP provider), I've
just look about solution in Google, mailing list, I can't find solution,
please can someone give me an idea ?
NB: sorry for my english ...
|
|
On Mon, 2 Jun 2008, Rizwan Hisham wrote:
Quote: | There is another easier and interesting thing you can do in extensions.conf
to restrict specific dialinmg codes for specific users.
suppose your internal extensions are 4 digits long. your service phones have
did 1111, 1112, 1113.here is the dialplan for all of your phones including
service phones:
[hotel]
;for all other phones
exten=> _1XXXXXXXXXX,1,Dial(${external})
exten=> _011.,1,Dial(${internaltional})
exten=> _XXXX,1,Dial(${internal})
;for service phones
exten=> _1XXXXXXXXXX/1111,1,hangup
exten=> _1XXXXXXXXXX/1112,1,hangup
exten=> _1XXXXXXXXXX/1113,1,hangup
exten=> _1XXXXXXXXXX/1114,1,hangup
exten=> _011./1111,1,hangup
exten=> _011./1112,1,hangup
exten=> _011./1113,1,hangup
exten=> _011./1114,1,hangup
if you dont want to define separate context for every person you can match
his did just like above. This way whenever service phones try to dial a
local or international number they will hangup instead and all other phones
will be able to dialout. try it
|
You don't need a separate context for each person (phone), just 1 for each
"class" of phone.
[guests]
exten = _1XXXXXXXXXX,1, dial(${external})
exten = _011.,1, dial(${international})
exten = _XXXX,1, dial(${internal})
[service]
exten = _XXXX,1, dial(${internal})
It seems more robust, simple, and obvious to me to start with nothing (an
empty context) and specifically allow rather than allow everything and
then specifically deny.
In your example, adding a phone means remembering to modify the dialplan
in 2 places versus no change to the dial plan.
Thanks in advance,
------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000 |
|
Back to top |
|
|
devel at starosta.org Guest
|
Posted: Mon Jun 02, 2008 6:35 pm Post subject: [asterisk-users] How to limit extension to allow only intern |
|
|
Steve Edwards ha scritto:
Quote: | Quote: | On Mon, Jun 2, 2008 at 2:00 AM, DEVEL STAROSTA <devel at starosta.org> wrote:
Quote: | I'm playing with asterisk and I try to make system for my sister hotel
with aprox. 40 extensions (30 rooms, 1 reception, 2 office, 4 services
phones on each floor). I.ve installed latest version of trixbox (for
GUI) but I made manual modifications.
My problem:
I have 4 services phones (each per floor) which must be able to make
only internal calls (not external - no PSTN nor VOiP provider), I've
just look about solution in Google, mailing list, I can't find solution,
please can someone give me an idea ?
NB: sorry for my english ...
|
|
On Mon, 2 Jun 2008, Rizwan Hisham wrote:
Quote: | There is another easier and interesting thing you can do in extensions.conf
to restrict specific dialinmg codes for specific users.
suppose your internal extensions are 4 digits long. your service phones have
did 1111, 1112, 1113.here is the dialplan for all of your phones including
service phones:
[hotel]
;for all other phones
exten=> _1XXXXXXXXXX,1,Dial(${external})
exten=> _011.,1,Dial(${internaltional})
exten=> _XXXX,1,Dial(${internal})
;for service phones
exten=> _1XXXXXXXXXX/1111,1,hangup
exten=> _1XXXXXXXXXX/1112,1,hangup
exten=> _1XXXXXXXXXX/1113,1,hangup
exten=> _1XXXXXXXXXX/1114,1,hangup
exten=> _011./1111,1,hangup
exten=> _011./1112,1,hangup
exten=> _011./1113,1,hangup
exten=> _011./1114,1,hangup
if you dont want to define separate context for every person you can match
his did just like above. This way whenever service phones try to dial a
local or international number they will hangup instead and all other phones
will be able to dialout. try it
|
You don't need a separate context for each person (phone), just 1 for each
"class" of phone.
[guests]
exten = _1XXXXXXXXXX,1, dial(${external})
exten = _011.,1, dial(${international})
exten = _XXXX,1, dial(${internal})
[service]
exten = _XXXX,1, dial(${internal})
It seems more robust, simple, and obvious to me to start with nothing (an
empty context) and specifically allow rather than allow everything and
then specifically deny.
In your example, adding a phone means remembering to modify the dialplan
in 2 places versus no change to the dial plan.
Thanks in advance,
------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
| Thank all for answer.
Yours suggestion is very clear.
I want to notice that trixbox with all modules installed have a lot of
configuration files and is very hard to place solution.
So, I've added this in extensions_custom.conf (file included by
extensions.conf)
[service]
exten => _2XXX,1,Dial(SIP/${EXTEN}, 20,rT) ; this match only wth 4
digits ad with the first digit begins with "2" (nb: all internals in
hotel begin with 2: 2000-reception, 2001 - office and so on)
exten => _2XXX,n,Hangup()
after this:
exten => 2100,1,dial(${service}) ; 1-st floor telephone service
exten => 2200,1,dial(${service}) ; 2-nd floor telephone service
exten => 2300,1,dial(${service}) ; 3 floor telephone service
exten => 2400,1,dial(${service}) ; 4 floor telephone service
This will be ok ? |
|
Back to top |
|
|
asterisk.org at sedwar... Guest
|
Posted: Mon Jun 02, 2008 7:53 pm Post subject: [asterisk-users] How to limit extension to allow only intern |
|
|
On Tue, 3 Jun 2008, DEVEL STAROSTA wrote:
Quote: | I want to notice that trixbox with all modules installed have a lot of
configuration files and is very hard to place solution.
|
What's Trixbox?
Quote: | So, I've added this in extensions_custom.conf (file included by
extensions.conf)
|
Quote: | [service]
exten => _2XXX,1,Dial(SIP/${EXTEN}, 20,rT) ; this match only wth 4
digits ad with the first digit begins with "2" (nb: all internals in
hotel begin with 2: 2000-reception, 2001 - office and so on)
exten => _2XXX,n,Hangup()
after this:
exten => 2100,1,dial(${service}) ; 1-st floor telephone service
exten => 2200,1,dial(${service}) ; 2-nd floor telephone service
exten => 2300,1,dial(${service}) ; 3 floor telephone service
exten => 2400,1,dial(${service}) ; 4 floor telephone service
|
Are 2100, 2200, 2300, 2400 all supposed to dial the same destination?
You probably want something like this:
[general]
SERVICE-PHONE-1 = sip/front-desk
SERVICE-PHONE-2 = sip/service-phone-2
SERVICE-PHONE-3 = zap/1
SERVICE-PHONE-4 = zap/2
[service]
exten = 2100,1, dial(${SERVICE-PHONE-1})
exten = 2200,1, dial(${SERVICE-PHONE-2})
exten = 2300,1, dial(${SERVICE-PHONE-3})
exten = 2400,1, dial(${SERVICE-PHONE-4})
exten = _2xxx,1, dial(sip/${EXTEN},20,rT)
exten = _2xxx,n, hangup()
Note that I removed the space between "," and "2." Asterisk's parser
is not very smart in how it handles spaces (IMNSHO). Using them will
come back to bite you later when you start using expressions and if
statements.
Also note that something as obtuse as:
exten = _2[1-4]00,1, dial(${SERVICE-PHONE-${EXTEN:1:1}})
does not quite work because _2xxx is evaluated before _2[1-4]00 -- go
figure
Thanks in advance,
------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000 |
|
Back to top |
|
|
devel at starosta.org Guest
|
Posted: Tue Jun 03, 2008 3:59 pm Post subject: [asterisk-users] How to limit extension to allow only intern |
|
|
Steve Edwards ha scritto:
Quote: | On Tue, 3 Jun 2008, DEVEL STAROSTA wrote:
Quote: | I want to notice that trixbox with all modules installed have a lot of
configuration files and is very hard to place solution.
|
What's Trixbox?
Quote: | So, I've added this in extensions_custom.conf (file included by
extensions.conf)
|
Quote: | [service]
exten => _2XXX,1,Dial(SIP/${EXTEN}, 20,rT) ; this match only wth 4
digits ad with the first digit begins with "2" (nb: all internals in
hotel begin with 2: 2000-reception, 2001 - office and so on)
exten => _2XXX,n,Hangup()
after this:
exten => 2100,1,dial(${service}) ; 1-st floor telephone service
exten => 2200,1,dial(${service}) ; 2-nd floor telephone service
exten => 2300,1,dial(${service}) ; 3 floor telephone service
exten => 2400,1,dial(${service}) ; 4 floor telephone service
|
Are 2100, 2200, 2300, 2400 all supposed to dial the same destination?
You probably want something like this:
[general]
SERVICE-PHONE-1 = sip/front-desk
SERVICE-PHONE-2 = sip/service-phone-2
SERVICE-PHONE-3 = zap/1
SERVICE-PHONE-4 = zap/2
[service]
exten = 2100,1, dial(${SERVICE-PHONE-1})
exten = 2200,1, dial(${SERVICE-PHONE-2})
exten = 2300,1, dial(${SERVICE-PHONE-3})
exten = 2400,1, dial(${SERVICE-PHONE-4})
exten = _2xxx,1, dial(sip/${EXTEN},20,rT)
exten = _2xxx,n, hangup()
Note that I removed the space between "," and "2." Asterisk's parser
is not very smart in how it handles spaces (IMNSHO). Using them will
come back to bite you later when you start using expressions and if
statements.
Also note that something as obtuse as:
exten = _2[1-4]00,1, dial(${SERVICE-PHONE-${EXTEN:1:1}})
does not quite work because _2xxx is evaluated before _2[1-4]00 -- go
figure
Thanks in advance,
------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
| Trixbox is CentOS based project focused to use asterisk.
So, i need that extensions 2100,2200,2300 and 2400 can call any internal
extensions (ex: 2101,2000 and so on) but not be able to call outside
(ex: 00390541 ... or 33889088...) because some hotel client could be
make calls without any control. This extensions is usefull for example
for staff to communicate with reception, office, rooms withou must use
stairs ...
Alberto. |
|
Back to top |
|
|
asterisk.org at sedwar... Guest
|
Posted: Tue Jun 03, 2008 4:42 pm Post subject: [asterisk-users] How to limit extension to allow only intern |
|
|
On Tue, 3 Jun 2008, DEVEL STAROSTA wrote:
Quote: | Steve Edwards ha scritto:
|
Quote: | Quote: | On Tue, 3 Jun 2008, DEVEL STAROSTA wrote:
Quote: | I want to notice that trixbox with all modules installed have a lot of
configuration files and is very hard to place solution.
|
What's Trixbox?
|
|
Quote: | Trixbox is CentOS based project focused to use asterisk.
|
Unfortunately, lame attempts at humor rarely translates well.
Quote: | So, i need that extensions 2100,2200,2300 and 2400 can call any internal
extensions (ex: 2101,2000 and so on) but not be able to call outside
(ex: 00390541 ... or 33889088...) because some hotel client could be
make calls without any control. This extensions is usefull for example
for staff to communicate with reception, office, rooms withou must use
stairs ...
|
I don't see a question here.
Did the examples in previous emails not give you the tools to address your
needs?
The only other thought that comes to mind is to read up on the "include"
statement to "include" extensions common to both guests and staff.
Thanks in advance,
------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|