[OpenSIPS-Users] drouting rule_id is empty

Bogdan-Andrei Iancu bogdan at opensips.org
Tue May 22 06:33:50 EDT 2018


Hi Kirill,

I see you use partitions, and your lookup is over partition "1". So, in 
the dr_partitions table, when defining the partition "1", have you set 
the "|rule_id_avp" field to "|$avp(dr_rule_id)" ?

http://www.opensips.org/Documentation/Install-DBSchema-2-3#GEN-DB-DR-PARTITIONS

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam

On 05/21/2018 06:06 PM, Kirill Galinurov wrote:
> Hi i use opensips  2.3 (OpenSIPS (2.3.3 (x86_64/linux)) drouting
> And I need rule_id variable to store in CDR.
> modparam("drouting", "use_partitions", 1)
> modparam("drouting", "carrier_id_avp", '$avp(carrier_id)')
> modparam("drouting", "partition_id_pvar", "$var(matched_partition)")
> modparam("drouting", "rule_id_avp", '$avp(dr_rule_id)')
>
> if(!do_routing("*:1","W",,,"$avp(gateway_attr)","$avp(dr_rule_from)")) {
>           xlog("do_routing: No rules matching the URI/n");
>           send_reply("503","No rules matching the URI");
>           exit;
>        } else {
>          xlog("do_routing: to operator $avp(carrier_id)/n");
>         xlog("L_INFO", "get_route: rule_id $avp(dr_rule_id)\n");
> }
> But in output
> Opensips: May 21 18:06:18 [26575] get_route: rule_id   - <null>
>
>
>
>
>
> _______________________________________________
> 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/20180522/bbef59e9/attachment-0001.html>


More information about the Users mailing list