[Freeswitch-users] Detect source IP of a call

Dominique Jeannerod dominique.jeannerod at interact-iv.com
Thu Oct 1 21:09:15 MSD 2015


Hello,
I think it's a kind of newbie question, but i'm trying to find the simplest
way of detecting the source of a call (public trunks), which of course rely
on the source IP of the call.

I already defined one ACL per trunk, to authorize only allowed IP adresses,
and test the different acls in the dialplan to identify the source trunk of
a call, and set the associated accountcode.
Example :
        <condition field="${acl(${network_addr} T_CNX_VPN)}"
expression="true" break="on-true">
            <action inline="true" application="set"
data="accountcode=T_CNX"/>
        </condition>
It works but the dialplan needs to be modified for each new trunk.

I am wondering if there is a best way to do that, using for example a
channel variable, containing the ACL which matched for the call.
I tested sip_acl_authed_by, but this seems to be available only when the
call is authenticated (?)

I'm sure a lot of people had the same question
What would be your advice ?

D. Jeannerod
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20151001/76e961ed/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list