<div dir="ltr">On Wed, Aug 6, 2008 at 1:00 AM, Roberto Hernandez <span dir="ltr"><<a href="mailto:rh@bluevisor.com">rh@bluevisor.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Anyone have suggestions on how to the enable the following
scenario? Allow internal but control external per user.</span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">More importantly how to disable or enable PSTN access for a
specific user in a domain (profile)?</span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"><a href="mailto:user1@domain1.com" target="_blank">user1@domain1.com</a> <--> FS <--> Allowed PSTN</span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"><a href="mailto:user1@domain1.com" target="_blank">user1@domain1.com</a> <--> FS <--> <a href="mailto:user2@domain1.com" target="_blank">user2@domain1.com</a> </span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"><a href="mailto:user2@domain1.com" target="_blank">user2@domain1.com</a> <--> FS <--> Not Allowed PSTN</span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"><a href="mailto:user2@domain1.com" target="_blank">user2@domain1.com</a> <--> FS <--> <a href="mailto:user1@domain1.com" target="_blank">user1@domain1.com</a> </span></font></p>
<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"></span></font></p></div></div></blockquote><div><br>Hi Roberto,<br><br>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:<br>
<br>(taken from <a href="http://wiki.freeswitch.org/wiki/Dialplan_XML#Example_1">http://wiki.freeswitch.org/wiki/Dialplan_XML#Example_1</a>)<br><br><pre><extension name="DialPSTN"><br> <condition field="destination_number" expression="^9(\d+)$"/><br>
<condition field="network_addr" expression="^192\.168\.1\.\d{1,3}$"/><br> <action application="bridge" data="sofia/gateway/external/$1"/><br> <anti-action ... (play a sound file saying "invalid extension"??) /><br>
</condition><br></extension><br></pre></div></div>So, as you can see, if the network address of the user matches <a href="http://192.168.1.">192.168.1.</a>*, then bridge away. Otherwise, do something else or simply remove the anti-action line. Does this suit your needs?<br>
<br>- Gonzalo<br></div>