On Wed, Aug 6, 2008 at 1:00 AM, Roberto Hernandez <rh@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@domain1.com <--> FS <--> Allowed PSTN

user1@domain1.com <--> FS <--> user2@domain1.com

 

user2@domain1.com <--> FS <--> Not Allowed PSTN

user2@domain1.com <--> FS <--> user1@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"??) />
</condition>
</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