[OpenSIPS-Users] dr_rules does not load all DB records

Brett Nemeroff brett at nemeroff.com
Tue May 8 19:42:45 CEST 2012


Marcio,
Try:
$(avp(name){s.int})

Typecasting it will fix this problem

-Brett

-Brett

On May 8, 2012, at 11:51 AM, Marcio Veloso Antunes <
mveloso at tecnologiaip.com.br> wrote:

 Bogdan,

 I've found the problem.

 The AVP cannot be a string also, i've changed to an integer groupid (even
on DB), but it continue not finding the routes.

 I read once again the documentation and it is said there that "an AVP
specification (value must be numerical type, string types are ignored!)?" I
apologize for not reading carefully the documentation.

 Thanks for your help.

 Marcio Veloso

Em terça-feira. 08/maio/2012, às 12:36:37, Bogdan-Andrei Iancu escreveu:

> Marcio,

>

> the group must be an integer value, not a string, so try:

>

> $avp(dr_group_id)= 5;

>

> xlog( "L_DBG", "TRACE: [R120] will do_routing( '$avp(dr_group_id)')");

> if ( !do_routing( "$avp(dr_group_id)") )

> {

> xlog( "L_DBG", "TRACE: [R120] No Rules matching the URI. GroupID:

> '$avp(dr_group_id)' From-Uri: $fu To-URI: $tu R-URI: $ru"); ......

>

> Regards,

> Bogdan

>

> On 05/08/2012 06:31 PM, Marcio Veloso Antunes wrote:

> > Bogdan,

> >

> > I have found an error message (error level, not debug) that says:

> > ERROR:drouting:do_routing: failed to get group id

> >

> > But i am calling do_routing, passing the string "05" through
$avp(dr_group_id) as you can see in the script section below:

> > ...

> >

> > xlog( "L_DBG", "TRACE: [R120] will do_routing( '$avp(dr_group_id)')");

> > if ( !do_routing( "$avp(dr_group_id)") )

> > {

> >

> > xlog( "L_DBG", "TRACE: [R120] No Rules matching the URI. GroupID:

> > '$avp(dr_group_id)' From-Uri: $fu To-URI: $tu R-URI: $ru");

> >

> > ...

> >

> > The log generated confirms that:

> >

> > TRACE: [R120] will do_routing( '05')

> > TRACE: [R120] No Rules matching the URI. GroupID: '05' From-Uri:

> > sip:02130053004 at tecnologiaip.com.br To-URI:

> > sip:0000502126434378 at sip2.tecnologiaip.com.br:5061;user=phone R-URI:

> > sip:552126434378 at sip2.tecnologiaip.com.br:5061;user=phone

> >

> > Am i doing something wrong or it is really odd?

> >

> > Marcio Veloso

> >

> > Em terça-feira. 08/maio/2012, às 10:14:09, Marcio Veloso Antunes
escreveu:

> >> Bogdan,

> >>

> >> The only messages i have in the log that have 'do_routing' are listed

> >>

> >> below. I am sure the function is being called.

> >>

> >> May 5 12:04:11 perseu opensips: DBG:core:find_cmd_export_t: found

> >> <do_routing>(1) in module drouting

> >> [/usr/local/opensips/lib/opensips/modules/]

> >> May 5 12:04:11 perseu opensips: DBG:core:fix_actions: fixing

> >> do_routing, line 1145 May 5 12:07:48 perseu opensips: TRACE: [R120]

> >> will do_routing( '05') May 5 12:08:10 perseu opensips: TRACE: [R120]

> >> will do_routing( '05')

> >>

> >> Do you think i should downgrade from 1.7.2 to some other version?

> >>

> >> Thanks,

> >> Marcio

> >>

> >> Em terça-feira. 08/maio/2012, às 08:47:13, Bogdan-Andrei Iancu
escreveu:

> >>> Marcio,

> >>>

> >>> debug=4 should do it . Search for "do_routing:" string in the logs.
And

> >>> be sure you are calling the function :)

> >>>

> >>> Regards,

> >>> Bogdan

> >>>

> >>> On 05/07/2012 03:58 PM, Marcio Veloso Antunes wrote:

> >>>> Bogdan,

> >>>>

> >>>> What level of debug is necessary to show do_routing function

> >>>> debug? I am

> >>>>

> >>>> using level 7 but i could not find any debug at all. I was the first

> >>>> thing i've looked for.

> >>>>

> >>>> Thanks again,

> >>>>

> >>>> Em segunda-feira. 07/maio/2012, às 08:55:45, Bogdan-Andrei Iancu

> >>>> escreveu:

-- 

Atenciosamente,

 Marcio Veloso Antunes

Tel.+55.11.3588.0802 Ext.106

Tel.+55.21.3005.3004 Ext.106

Cel. +55.21.8539.2949

_______________________________________________
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/20120508/41130631/attachment.htm>


More information about the Users mailing list