[OpenSIPS-Users] Load Balancer Group ID with AVP variable

2014-12-09 Thread bluerain
Is it possible to use avp variable instead?  I've tried, it seems not
working, I have to put some numeric value for it to work.  Or is my syntax
wrong somewhere?

load_balance($avp(GroupID),PSTN)



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Load-Balancer-Group-ID-with-AVP-variable-tp7594642.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Group ID with AVP variable

2014-12-09 Thread campusvtv

Hello,

theoretically you can use a variable (OpenSIPs 1.11.X):

grp- group id for the destinations; the destination may be grouped in 
several groups you can you for different scenarios; this can be a number 
or a variable containing a numerical value.


Are you sure $avp(GroupID) contain a numerical value?

If $avp(GroupID) contain a numerical value, try to assign to a different 
variable before invoking load_balance function:


$var(a)=$avp(GroupID)

then

load_balance($var(a),PSTN)


Regards

El 09/12/2014 10:18, bluerain escribió:

Is it possible to use avp variable instead?  I've tried, it seems not
working, I have to put some numeric value for it to work.  Or is my syntax
wrong somewhere?

load_balance($avp(GroupID),PSTN)



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Load-Balancer-Group-ID-with-AVP-variable-tp7594642.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Group ID with AVP variable

2014-12-09 Thread bluerain
Oh yes, I figured out, I just forgot to remove the thread.  It seems the
database data type matters in this case.  If that field in the DB table is
varchar (I am using MSSQL) avp variable under load balancer module will not
work.  You have to use one of the interger data type in order for this to
work.

But thank you!



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Load-Balancer-Group-ID-with-AVP-variable-tp7594642p7594645.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users