SearchSearch  Log in to check your private messagesLog in to check your private messages  recent posts Recent Posts
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
PackyOffline



Joined: Oct 26, 2007
Posts: 4

Status: Offline
Posted: Oct 26, 2007 - 03:49 PM Reply with quote Back to top
Hello,

How to build virtual PBX, two or more, on TrixBox, or how to forbid some extension to call others?

For example, I wish to have like two PBX's with extensions from 5000 to 5050, and 6000 to 6050; frobid calling from 50XX to 60XX, but enable them both to go out on the same trunks.

I have see properties "allow" and "disallow" on extension properties... What to type in those boxes, and where to make/build/type restrictions.

If you have any link or some document, please provide.

Thanks...
View user's profile Send private message
rgowerOffline
Site Admin


Joined: Jan 21, 2005
Posts: 1344
Location: Wales
Status: Offline
Posted: Oct 26, 2007 - 10:25 PM Reply with quote Back to top
Hi,
The Allow and Disallow fields are to limit the range of speech compression codecs to allow e.g. if you don't have G729 you may like to disallow g729.

It does not limit the range of what facilities may be used. The line you need for this is Context which governs what rules may be applied to the extension.

To cut a lot of follow my leader through the contents of the various extensions configuration files, dialing an extension leads to a context called ext-local in extensions_additional.conf and is controlled by another context in extensions.conf called macro-exten-vm.

You could add logic to exten-vm (or replace it with a custom one) to match $CallerID with the dialed extension, but it will be messy and not for the faint hearted or novice. Nor will you be able to use the Trixbox update system.

To be honest to do what you want, you would be better off building a custom version of Asterisk.
View user's profile Send private message
PackyOffline



Joined: Oct 26, 2007
Posts: 4

Status: Offline
Posted: Oct 30, 2007 - 10:35 AM Reply with quote Back to top
Thank you for you reply, it kept my busu for couple of days Smile.

Here with what I came up with:

in extensions_additional.conf I have add a context for the customers with the extensions 60XX (I add just one).

[customer60]

exten => 6001,1,Macro(exten-vm,6001,6001)
exten => 6001,n,Hangup
exten => 6001,hint,SIP/6001
exten => ${VM_PREFIX}6001,1,Macro(vm,6001,DIRECTDIAL)
exten => ${VM_PREFIX}6001,n,Hangup
....


In extensions.conf, in macro [macro-exten-vm] i have added logic (after the line with: exten => s,n... - book say that asterisk will chose most specific match)

[macro-exten-vm]

exten => _60XX,1,GotoIf($[${EXTTOCALL:2} = 60]?10:20)

exten => _60XX,10,Macro(dial,${RT},${DIAL_OPTIONS},${EXTTOCALL})

exten => _60XX,20,Congestion( )

So, I'm trying ti see if two first numbers are 60, if the are I proceed call to macro dial, else, for example, I play congestion.

Is this enough, and would the same method work for 50XX on the same PBX?

Any help is appriciated.

Thanks...
View user's profile Send private message


View previous topic Printable version Log in to check your private messages View next topic

Post new topic   Reply to topic
Forum Rules and Guidelines | About VoIP User | Privacy Policy


All logos and trademarks in this site are property of their respective owner.
Comments and posts are property of the poster, all the rest (c) 2003-2008 VoIP User Limited.

VoIP User Limited is incorporated in England and Wales under Company Number 6694577.

No part of this site may be reproduced without our prior consent.