[OpenSIPS-Users] check_source_address()

Liviu Chircu liviu at opensips.org
Tue Apr 23 07:41:03 EDT 2019


Hi, Mark!

The best way to proceed is to add an xlog("checking $si:$sp\n") before 
check_source_address(), then some useful xlog() messages on each if 
branch, so we can confirm the theory that this is an OpenSIPS issue, and 
not a problem specific to your setup.

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 23.04.2019 14:18, Mark Farmer wrote:
> Should've added I'm running OpenSIPS 2.4.4
>
> Mark.
>
>
> On Tue, 23 Apr 2019 at 12:10, Mark Farmer <farmorg at gmail.com 
> <mailto:farmorg at gmail.com>> wrote:
>
>     Hi everyone,
>
>     I'm seeing some odd behaviour in tha initial requests are allowed
>     but RE-INVITES are resulting in 403. From my logging I can see the
>     INVITE coming in so I think it must be matching. Why would it not
>     obey and route the request?
>
>     This is the bit of my request route that identifies the source:
>
>     if (check_source_address("1","$avp(trunk_attrs)")) {
>                     # request comes from trunks
>                     xlog ("MF - $rm FROM $avp(trunk_attrs)");
>                     setflag(IS_TRUNK);
>             } else {
>                     send_reply("403","Forbidden");
>                     exit;
>             }
>
>     Many thanks
>     Mark.
>
>     -- 
>     Mark Farmer
>     farmorg at gmail.com <mailto:farmorg at gmail.com>
>
>
>
> -- 
> Mark Farmer
> farmorg at gmail.com <mailto:farmorg at gmail.com>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190423/a09f4341/attachment.html>


More information about the Users mailing list