[Freeswitch-users] user access

Gonzalo Servat gservat at gmail.com
Tue Aug 5 21:39:21 PDT 2008

On Wed, Aug 6, 2008 at 1:00 AM, Roberto Hernandez <rh at bluevisor.com> wrote:

> Anyone have suggestions on how to the enable the following scenario?  Allow
> internal but control external per user.
> More importantly how to disable or enable PSTN access for a specific user
> in a domain (profile)?
> user1 at domain1.com <--> FS <--> Allowed PSTN
> user1 at domain1.com <--> FS <--> user2 at domain1.com
> user2 at domain1.com <--> FS <--> Not Allowed PSTN
> user2 at domain1.com <--> FS <--> user1 at domain1.com
Hi Roberto,

I'm real new at FS so there may well be a better way of doing this. Anyway,
I've got a similar need to you (office phones can dial PSTN, remote logged
in users cannot) and I want to use the same context for both. My idea was to
use something similar to this:

(taken from http://wiki.freeswitch.org/wiki/Dialplan_XML#Example_1)

<extension name="DialPSTN">
  <condition field="destination_number" expression="^9(\d+)$"/>
  <condition field="network_addr" expression="^192\.168\.1\.\d{1,3}$"/>
    <action application="bridge" data="sofia/gateway/external/$1"/>
    <anti-action ... (play a sound file saying "invalid extension"??) />

So, as you can see, if the network address of the user matches 192.168.1.*,
then bridge away. Otherwise, do something else or simply remove the
anti-action line. Does this suit your needs?

- Gonzalo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080806/20926229/attachment-0002.html 

More information about the FreeSWITCH-users mailing list