[asterisk-users] Re: How to separate outgoing extens from the contexts from sip.conf?

Eric "ManxPower" Wieling eric at fnords.org
Wed Feb 21 16:39:54 MST 2007


Put your phones in the context=toll-access in sip.conf or zapata.conf
Put the phone "lines" in context=incoming in sip.conf or zapata.conf

extensions.conf:

[extensions]

exten => 667,1,Dial(SIP/whatever)
...
more exten lines to dial your phones here

[incoming] ; this is where calls from untrusted sources should land

include => extensons

[toll-trunks]

exten => _91NXXNXXXXXX,1,Dial(Zap/g1/${EXTEN:1}
...
more exten lines to dial outside numbers here

[toll-access]

include => extensions
inclide => toll-trunks



Larry Alkoff wrote:
> Benny Amorsen wrote:
>>>>>>> "LA" == Larry Alkoff <labradley at mindspring.com> writes:
>>
>> LA> I have a sip.conf with stanzas for sip phones that have
>> LA> 'context=sip-incoming for some Grandstream phones and another
>> LA> stanza for a Sipura SPA3000 with context=pstn-incoming.
>>
>> LA> Reviewing the code today, I was dismayed to see that all my
>> LA> outgoing extens were mixed into those two. I have been told this
>> LA> is very insecure.
>>
>> It shouldn't be insecure. It is perhaps a bit unusual to have calls
>> coming from your own phones labeled "incoming". That is probably the
>> source of the confusion.
>>
>>
>> /Benny
> 
> Thanks for the response /Benny
> 
> My understanding is that the 'context=whatever' in sip.conf is the name 
> of the context that handles incoming calls from the outside - that's 
> what I meant by 'incoming'.
> 
> I'm quite clear that 'incoming' means calls coming in from the outside.
> 
> The 'insecure' part is that knowlegable callers _could_ call in and use 
> various methods to make outside possibly expensive calls _if_ the 
> outgoing extens were in the same context.  I don't want that!
> 
> That's why I want a clear separation between the incoming calls from 
> outside and calls to the outside made by my phones on the inside.
> 
> The problem is I don't know how to use a context in extensions.conf 
> without referring to it in sip.conf (context=something).
> 
> Do you know of a way?
> 
> Larry



More information about the asterisk-users mailing list