get_route_param function of rr module

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

get_route_param function of rr module

Камиль Нигматуллин
Hello to all;

Starnge thing. I use rr module to add some params to RR Header as
follows; But when I want to read param from header with get_route_param
opensips cannot start with the following message:
unknown command <get_route_param>, missing loadmodule? Yes, I do
loose_route() right before calling <get_route_param>;

Unfortunaly googling this I didn't find one simular issue as if nobody
interested in this function;



--
Kamil Nigmatullin


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: get_route_param function of rr module

kamika
Does anybody ever used this funcion? I can add_rr_param but I need to read it using perl. Is there any way to fix it?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: get_route_param function of rr module

Bogdan-Andrei Iancu-2
Hi,

I'm using the function but directly from the OpenSIPs cfg.

What you mean by "to read it using perl" ?? The function sets
parameters, it does not read anything.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 08/18/2013 10:32 PM, kamika wrote:

> Does anybody ever used this funcion? I can add_rr_param but I need to read it
> using perl. Is there any way to fix it?
>
> Thanks
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/get-route-param-function-of-rr-module-tp7587523p7587543.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: get_route_param function of rr module

kamika
I mean that the function doesn't work in my opensips 1.9 with the above described error. So as a temporary solution I use perl module to read Record-Route header from the message using perl's regex and the export to AVPs.
Reply | Threaded
Open this post in threaded view
|

Re: get_route_param function of rr module

kamika
To make clear:
I send Invite to Freeswitch setting a couple of parametures in Record-Route so that I could use it in case of Ack or BYE comes from freeswitch gateway. And I use it using Recorf-Route and add_rr_param functions. Then on non-INVITE I route the call with loose_route and here I want to take my params from Route header. I should use get_route_param function, right? But it looks like this function does not exist in the RR module. However there is some references to get_route_param function in sources code or RR module. But it still complan that this function is unknown.

Reply | Threaded
Open this post in threaded view
|

Re: get_route_param function of rr module

Víctor Fernández Martínez
Hi Kamil,

get_route_param() indeed exists in the rr module. However, it is documented in
the "Developer Guide" section, not in the "Admin Guide". This means it is
available from C code for module developers but not for administrators who are
writing their opensips.cfg. If you take a look at the source code, in
modules/rr/rr_mod.c, line 82, you will see it is not in the list of exported
functions.

So if you want to use that function you would need to patch OpenSIPS.

Best regards.


On Thursday 22 August 2013 11:45:24 kamika wrote:

> To make clear:
> I send Invite to Freeswitch setting a couple of parametures in Record-Route
> so that I could use it in case of Ack or BYE comes from freeswitch gateway.
> And I use it using Recorf-Route and add_rr_param functions. Then on
> non-INVITE I route the call with loose_route and here I want to take my
> params from Route header. I should use get_route_param function, right? But
> it looks like this function does not exist in the RR module. However there
> is some references to get_route_param function in sources code or RR module.
> But it still complan that this function is unknown.
>
>
>
>
>
> --
> View this message in context:
> http://opensips-open-sip-server.1449251.n2.nabble.com/get-route-param-funct
> ion-of-rr-module-tp7587523p7587564.html Sent from the OpenSIPS - Users
> mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: get_route_param function of rr module

kamika
Thank you very much. Understood.