[Asterisk-Users] SIP accepts all calls

Craig Guy cguy at bigpond.net.au
Wed Oct 13 22:52:15 MST 2004


The answer will be found in how you have setup your contexts.  You will need
to specify a default context in your sip.conf or whatever the mysql table
equivalent is and then handle calls from this context appropriately in your
extensions.conf, eg (Very simplistic but you get the idea).

sip.conf (or equivalent)
[general]
context = unregistered_internal_sip    ; Default context for outgoing SIP
calls

;Define extensions here
[phone1]
context = registered_internal_sip    ; Context for registered internal SIP
devices

then in extensions.conf
[unregistered_internal_sip]
exten => _.,1,Hangup    ; Play hangup tone or whatever you want to do

Just because a device is unregistered or undefined doesn't mean that it
can't make calls, it just receives the default context.

Craig

----- Original Message ----- 
From: "david winter" <dwinter at planet-telecom.com>
To: "'Asterisk Users Mailing List - Non-Commercial Discussion'"
<asterisk-users at lists.digium.com>
Sent: Thursday, October 14, 2004 10:43 AM
Subject: RE: [Asterisk-Users] SIP accepts all calls


> I am having the same problem. I noticed it today when I removed the
section
> in sip.conf for my grandstream. I was testing the res_mysql_config
realtime
> driver, so I put the grandstream config into the sip table of my database.
*
> answered the calls into a demo ivr application as usually. So I removed
the
> row in the sip table for the phone and called again. The call was still
> answered. I am using cvs-head that I compiled today. Is there a bugtrakker
> on this issue? I assume that * should NOT answer an inbound call from a
sip
> client not listed in sip.conf or in the sip table (when using
> res_mysql_config)?
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of spkao
> Sent: Wednesday, October 13, 2004 4:07 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [Asterisk-Users] SIP accepts all calls
>
> That worked. Thx Eric.
>
> ----- Original Message -----
> From: "Eric Wieling" <eric at fnords.org>
> To: "Asterisk Users Mailing List - Non-Commercial Discussion"
> <asterisk-users at lists.digium.com>
> Sent: Wednesday, October 13, 2004 7:35 PM
> Subject: Re: [Asterisk-Users] SIP accepts all calls
>
>
> > spkao wrote:
> >
> > >Wonder if anyone has experienced this. I setup the SIP on * and I found
> that
> > >it will accept all calls does not matter if the username or secret
> matches
> > >any
> > >client definition in sip.conf or not.
> > >
> > >
> > I thought that was fixed months ago..  You are either running an older
> > Asterisk or you have insecure=very in sip.conf.  What I did to work
> > around the problem is put context=INVALID in [general] in sip.conf and
> > then put a context= line with the right context in each peer/usr/friend
> > entry in sip.conf.
> >
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
> > _______________________________________________
> > Asterisk-Users mailing list
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list