[Freeswitch-users] Automatically authenticating client

Martyn Davies martyn at magiccow.co.uk
Tue Jan 5 11:32:29 UTC 2021


I'm trying to support a downstream client (actually a phone on a VoIP
gateway) that must work without sending a registration to Freeswitch.
I have a definition in the client directory that looks like this:

<include>
  <user id="0101" cidr="192.168.1.0/24">
    <variables>
    :
      <variable name="user_context" value="default"/>

So, I'm assuming that if the source address matches 192.168.1.x, an invite
from 0101 will automatically be authenticated, and the user context will
be set to 'default' to go through the dialplan.

However, what seems to happen is that the dialplan gets executed in the
public context, 0101 doesn't match anything, and so the call fails.

I also tried adding entries to the acl.conf file, e.g.

e.g.
    <list name="lan" default="allow">
      <node type="allow" cidr="192.168.1.0/24"/>
    </list>


 or

    <list name="localnet.auto" default="allow">
       <node type="allow" cidr="192.168.1.0/24"/>
    </list>

or adding an 'allow' line to the existing 'domains' list.

When I run 'reloadacl', it looks like the rules are being picked up, e.g.

2021-01-05 11:06:07.631090 [NOTICE] switch_utils.c:642 Adding 192.168.1.0/24
(allow) [] to list localnet.auto
2021-01-05 11:06:07.631090 [NOTICE] switch_utils.c:642 Adding
192.168.1.97/32 (allow) [0101 at 192.168.1.241] to list domains


However, none of this works, and I still end up in the public context when
a call is placed.

I would appreciate any examples or advice that people could offer to get my
client authenticated, or could anyone give me pointers on
how to debug the authentication process when the invite arrives?


Regards,
Martyn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20210105/73cb787b/attachment.html>


More information about the FreeSWITCH-users mailing list