[Freeswitch-users] Default vs Public context

Steven Schoch schoch+freeswitch.org at xwin32.com
Thu Mar 21 20:37:14 MSK 2013


Here is how I understand it:

   - Each network/port on which FreeSwitch listens is a separate SIP
   (sofia) "profile".
   - Each SIP profile has a default context, set in the
   sip_profiles/<profile>.xml file, in the "context" param. This context is
   usually "public".
   - Each SIP profile has an optional domain, which specifies where to look
   for id/password pairs in the "directory".  This is usually "N/A", which
   says to look in all domains.  (?)
   - When authenticated with an id/password that matches in entry in the
   "directory" configuration, a "user_context" is usually set.  This user
   context will override the default context set in the SIP profile.
   - When a user registers because of an open ACL, and thus does not match
   an id/password, a "default" record is used, probably the one that doesn't
   specify a "password" param.  This "default" user typically does
*not*set a user_context, leaving the registration with the default
context
   (usually "public" as stated above).

Based on that information, if your FS installation, for example, has 2 SIP
profiles, and one is on an internal LAN, and thus secure, you could set the
context of that SIP profile to be something other than "public". In this
case, if an unknown phone were plugged into your LAN, it could register
without a profile and then be able to dial calls.

There is probably also a way to make registrations without a password on a
particular SIP profile use a "default" directory entry that sets a
user_context, but to prevent this "default" directory entry from being used
on the "external" SIP profile, but I haven't had a need to figure out how
to do that.

-- 
Steve

On Wed, Mar 20, 2013 at 10:58 PM, Siri MM <sirimmfs at gmail.com> wrote:

> Thanks for clarifying this Avi!!
>
> Would it be safe to say this?
> 1. If user context is default, and user has registered (may be because of
> an open acl), then on receiving a call, default context is searched
> 2. If user context is default, and user has not registered, then on
> receiving a call, public context is searched
> 3. If user context is public, then on receiving a call, public context is
> searched
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130321/7dcca931/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list