Chad Brown
2004-Dec-21 21:10 UTC
[Asterisk-Users] Dialplan help - Can dial any user but not thePSTN
-----Original Message----- From: Chad Brown Sent: Tuesday, December 21, 2004 8:02 PM To: 'el_flynn@lanvik-icu.com' Subject: RE: [Asterisk-Users] Dialplan help - Can dial any user but not thePSTN Flynn, Yes, that makes sense. However, in my case I have incoming calls arriving on an IAX channel from a PSTN gateway. I think the concept is the same. That said, if incoming calls have access to the internal context so they can call internal extension doesn't that assume that hey have the ability to dial outbound as well if internal context users can? This is what my testing suggests unless I'm doing something wrong. Thanks much! Chad -----Original Message----- From: el Flynn [mailto:el_flynn@lanvik-icu.com] Sent: Tuesday, December 21, 2004 7:20 PM To: Chad Brown Subject: Re: [Asterisk-Users] Dialplan help - Can dial any user but not thePSTN Chad Brown wrote:> Flynn, > > What do you mean by "define your internal ppl to this context"? > > Thanks for responding! > > ChadHere's what I mean: extensions.conf ===============[internal] ; define your internal ppl to this context include => extensions exten => _9.,1,Dial(Zap/1/${EXTEN:1}) zapata.conf ==========[channels] ; TDM40B card signalling=fxo_ks context=internal channel => 1-4 iax.conf =======[1000] type=friend context=internal disallow=all allow=gsm host=dynamic username=1000 secret=1000 so this meanas the four extensions plugged in to the TDM40B's all will fall into the "internal" extension, as does the IAX user "1000". So if you have additional office staff at extensions "5001", "5002" and "5003" connected via SIP, in sip.conf you'd create those entries and set "context=internal" in the respective entries. Hope this helps! Flynn
Chad Brown
2004-Dec-22 00:40 UTC
[Asterisk-Users] Dialplan help - Can dial any user but not thePSTN
Yes...Crystal. Thanks Flynn -----Original Message----- From: el Flynn [mailto:el_flynn@lanvik-icu.com] Sent: Tuesday, December 21, 2004 10:31 PM To: Chad Brown Subject: Re: [Asterisk-Users] Dialplan help - Can dial any user but not thePSTN Chad Brown wrote:> Flynn, > > You are being patient with me and I appreciate that. Answer me thisone> last question which is really the reason for starting this thread... > > Could the incoming caller you are defining turn around and place an > outgoing call? This would be bad!Technically they can, but it would depend on how you have your dialplan configured. Which is why I always separate the incoming lines and internal lines into separate contexts.> Let's use your example and assume that > context [internal-extensions] can dial outbound. Wouldn't calls coming > into 1000 be able to turn around and dial back out again using your > configuration below?A further example might help. Say your extensions.conf looked like: [outgoing-calls] exten => _9.,1,SetAccount(1000) exten => _9.,2,Dial(Zap/1/${EXTEN:1},30) [internal-extensions] exten => 5000,1,Dial(IAX2/5000,30) ; John Doe's extension exten => 5001,1,Dial(SIP/5001,30) ; Jane Doe's extension [incoming] include => internal-extensions exten => s,1,Answer exten => s,2,Background(welcome-message) exten => i,1,Playback(invalid-option) exten => i,2,Hangup [internal] include => outgoing-calls include => internal-extensions exten => 8500,1,VoicemailMain And say you've defined the incoming lines to hit the "incoming" context. Here, they only have access to listen to the welcome message, and they can only dial the numbers "5000" and "5001" which was included by virtue of the include => internal-extensions directive. If they enter anything else, then it will fall into the "i" extension, where the "invalid-option" message would play and proceed to hang up the call. By the same token, your internal extensions are defined to hit the "internal" context. Here, they can dial the numbers "5000", "5001", "8500" as well as (for example) "95555555555". They can dial "95555555555" by virtue of the include => outgoing-calls directive, which is not present in the "inbound" context. See the difference? Hope this helps! Flynn