[OpenSIPS-Users] Fwd: Opensips 3.0 permission table not sending proper context info

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Jun 22 17:17:08 EST 2020


Vic,

I just did a quick test with

loadmodule "db_mysql.so"
loadmodule "permissions.so"
modparam("permissions", "db_url", 
"mysql://opensips:opensipsrw@localhost/opensips")

####### Routing Logic ########

startup_route {
     check_address( 1, "1.2.3.4" , 5060, "ANY", $avp(groupid));
     xlog("Call coming from trunk with $avp(groupid)\n");
}

mysql> select * from address \G
*************************** 1. row ***************************
           id: 1
          grp: 1
           ip: 1.2.3.4
         mask: 1
         port: 5060
        proto: any
      pattern: NULL
context_info: 10
1 row in set (0.00 sec)

And I got "Call coming from trunk with 10"

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com

On 6/17/20 9:15 PM, Vic Jolin wrote:
>
> Hi all, I have IP addresses setup in my mysql table address
>
> +----+-----+----------------+------+------+-------+---------+--------------+
> | id | grp | ip             | mask | port | proto | pattern | 
> context_info |
> +----+-----+----------------+------+------+-------+---------+--------------+
> |  9 |   1 | x.x.x.x   |    1 | 5060 | any   |         | 10           |
> +----+-----+----------------+------+------+-------+---------+--------------+
>
> But when I check source address in opensips.cfg
>
> check_source_address( 1, $avp(groupid))
> xlog("Call coming from trunk with $avp(groupid)\n");
>
> The output thou is:
> *Call coming from trunk with 1*
> *
> *
> Can anyone shed some light on this?
>
> _______________________________________________
> 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/20200622/b5e589b8/attachment.html>


More information about the Users mailing list