[OpenSIPS-Devel] [ opensips-Feature Requests-3538311 ] do_routing sort parameter does not accept AVP

SourceForge.net noreply at sourceforge.net
Wed Aug 29 10:45:51 CEST 2012


Feature Requests item #3538311, was opened at 2012-06-27 00:24
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=3538311&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
>Status: Closed
Priority: 5
Private: No
Submitted By: jthebert (jthebert)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: do_routing sort parameter does not accept AVP

Initial Comment:
Note
- Problem encoutered on 1.7.2 but is certainly present in previous version. 
- in 1.8.0, dynamic routing has changed a lot and function parameter are not the same

The problem: 
In the opensips script, I tried to use the following code ( using AVP for the group and sort parameters ):
if (!do_routing("$avp(routing_group)","$(avp(sda_sort)")) {

This is working well for the group parameter but not for the sort parameter. When starting opensips, I get this error:
ERROR:core:fixup_uint: bad number <$(avp(sda_sort)>


Looking at the code, in $SRC/modules/drouting/routing.c for the fixup fonction of drouting "fixup_do_routing(void** param, int param_no)", the code for the "sort" parameter is:
        if (param_no==2) {
                /* sorting algorithm */
                return fixup_uint(param);
        }

It seems that the function can only handle a regular string like "0" or "1" and not AVP ( while the group parameter can with the fixup function using much more code to handle the group parameter and expanding AVP ). 





----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-08-29 01:45

Message:
As you mentioned, this is only for 1.7 which is an old release - current
release and 1.8 and this version does not suffer of this issue.

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-06-28 03:54

Message:
This is not a bug as the function was never designed (or documented) to
accept the flags via a variable - > I will move this ticket as "feature
request" and not bug.

Regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=3538311&group_id=232389



More information about the Devel mailing list