[OpenSIPS-Users] Feature request? Script Var / AVP variables in route function.

xaled xaled at web.de
Fri Sep 22 09:05:15 EDT 2017


There could be a constrain in OpenSIPS that the route name should be defined at the start of opensips process. Otherwise if a variable value for some reason does not match any defined route there will be a problem. 

 

Greetings,

xaled

 

From: Users [mailto:users-bounces at lists.opensips.org] On Behalf Of Jim DeVito
Sent: Donnerstag, 21. September 2017 14:58
To: OpenSIPS users mailling list <users at lists.opensips.org>
Subject: Re: [OpenSIPS-Users] Feature request? Script Var / AVP variables in route function.

 

Hmmm. I want to use the contents of $avp(carrier_id) as the route name. So if $avp(carrier_id) is 25 I want it to call the routing block route[25].

 

On Thu, Sep 21, 2017 at 8:52 AM, Răzvan Crainea <razvan at opensips.org <mailto:razvan at opensips.org> > wrote:

Hi, Jim!

You should have a name for the route, such as:

route(route_name, $avp(carrier_id));

Best regards,



Răzvan Crainea
OpenSIPS Developer
www.opensips-solutions.com <http://www.opensips-solutions.com> 

On 09/21/2017 03:43 PM, Jim DeVito wrote:

Hi Razvan, 

 

So what am I doing wrong with 

 

route($avp(carrier_id));

 

It produces...

 

...line 318, column 53-54: bad routeargument

 

Thanks!!

 

On Thu, Sep 21, 2017 at 8:31 AM, Răzvan Crainea <razvan at opensips.org <mailto:razvan at opensips.org> > wrote:

Hi, Jim!

Script variables or AVPs are PV (pseudo-variables) themselves, so you should be able to use them.

Best regards,



Răzvan Crainea
OpenSIPS Developer
www.opensips-solutions.com <http://www.opensips-solutions.com> 

On 09/21/2017 03:14 PM, Jim DeVito wrote:

Hi All,

 

It's my understanding only PV, integers and strings can be used in the core route function. Is there a reason I don't understand why we can not use script variables or AVP's?

 

 

Thanks!!

 

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

Jim DeVito

Mobile 216.507.9497 <tel:%28216%29%20507-9497> 

 

_______________________________________________
Users mailing list
Users at lists.opensips.org <mailto:Users at lists.opensips.org> 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 


_______________________________________________
Users mailing list
Users at lists.opensips.org <mailto:Users at lists.opensips.org> 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





 

-- 

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

Jim DeVito

Mobile 216.507.9497 <tel:(216)%20507-9497> 

 

_______________________________________________
Users mailing list
Users at lists.opensips.org <mailto:Users at lists.opensips.org> 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 


_______________________________________________
Users mailing list
Users at lists.opensips.org <mailto:Users at lists.opensips.org> 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





 

-- 

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

Jim DeVito

Mobile 216.507.9497

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170922/63f94e43/attachment.html>


More information about the Users mailing list