Hey,
I need all of my kamailio's IPs in Record Routes and i can do that already. What i want to do is add different parameters to each Record-Route. Is that possible?
A sexta, 14/09/2018, 17:54, Duarte Rocha duarterocha91@gmail.com escreveu:
Greetings,
My Kamailio has 2 IP's and, as such, it will generate two Record-Routes when the Request is relayed.
I want to add one parameter to one of the Record Routes and another parameter to the other Record-Route. However, if i use add_rr_param() it will automatically add the parameters to the two Record-Route Headers.
Is there a way to do what i want without me re-writing the headers directly ?
Cheers,
Duarte Rocha
Can you show me where? I've tried add_rr_param() but it still adds every parameter to the two record-routes
Duarte Rocha writes:
Can you show me where? I've tried add_rr_param() but it still adds every parameter to the two record-routes.
I didn't quite understand your question. Perhaps you need to add the r-r headers using append_hf() function that allows you to customize them.
-- Juha
When Kamailio receives the INVITE, it relays it with two Record-Route like this :
Record-Route:sip:IP1;ftag=xxxxxxxx;vst=xxxxxxx;vsf=xxxxxxx Record-Route:sip:IP2;ftag=xxxxxxxx;vst=xxxxxxx;vsf=xxxxxxx What i want is :
Record-Route:sip:IP1;ftag=xxxxxxxx;vst=xxxxxxx;vsf=xxxxxxx;NEW_PARAMETER=10 Record-Route:sip:IP2;ftag=xxxxxxxx;vst=xxxxxxx;vsf=xxxxxxx;NEW_PARAMETER=20 I hope this make sense now.
Thanks for your help
You want to add new parameters to someone else's Record-Routes, or Kamailio's?
On Mon, Sep 17, 2018 at 03:59:14PM +0100, Duarte Rocha wrote:
When Kamailio receives the INVITE, it relays it with two Record-Route like this :
Record-Route:sip:IP1;ftag=xxxxxxxx;vst=xxxxxxx;vsf=xxxxxxx Record-Route:sip:IP2;ftag=xxxxxxxx;vst=xxxxxxx;vsf=xxxxxxx What i want is :
Record-Route:sip:IP1;ftag=xxxxxxxx;vst=xxxxxxx;vsf=xxxxxxx;NEW_PARAMETER=10 Record-Route:sip:IP2;ftag=xxxxxxxx;vst=xxxxxxx;vsf=xxxxxxx;NEW_PARAMETER=20 I hope this make sense now.
Thanks for your help
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Duarte Rocha writes:
When Kamailio receives the INVITE, it relays it with two Record-Route like this :
Record-Route:sip:IP1;ftag=xxxxxxxx;vst=xxxxxxx;vsf=xxxxxxx Record-Route:sip:IP2;ftag=xxxxxxxx;vst=xxxxxxx;vsf=xxxxxxx What i want is :
Record-Route:sip:IP1;ftag=xxxxxxxx;vst=xxxxxxx;vsf=xxxxxxx;NEW_PARAMETER=10 Record-Route:sip:IP2;ftag=xxxxxxxx;vst=xxxxxxx;vsf=xxxxxxx;NEW_PARAMETER=20
If you now call record_route(), try calling record_route_preset(string [,string2]).
-- Juha
I want to add to Kamailio's. This INVITE arrives at Kamailio with no Record-Route. It leaves Kamailio with two Record-Routes since i'm using one IP for receiving and another for sending.
Thanks for all your help.
With record_route_preset(string[,string2]) i can place the parameters as i want. The only problem is that using record_route_preset, it doesn't add all the parameters that it usually does, like "vst", vsf" and "r2", only the ftag.
However, it might be possible get those values as a variable in order to mannually add them to the Record-Route.