Re: [OpenSIPS-Users] loose_route with opensips 3.2 B2B module
Hi Bogdan, I understood and got it working with extra_hdrs and extra_hdr_bodies. Thank you, Xaled -Original Message- From: xa...@web.de Sent: Wednesday, April 14, 2021 1:54 PM To: 'Bogdan-Andrei Iancu' ; 'users@lists.opensips.org' Subject: RE: [OpenSIPS-Users] loose_route with opensips 3.2 B2B module Hi Bogdan, I got it, the actual question is how can I add new headers (not only Route, but any header) with values to the outgoing B2B INVITE request. Please see my other mail. Thanks, Xaled -Original Message- From: Bogdan-Andrei Iancu Sent: Wednesday, April 14, 2021 12:30 PM To: xa...@web.de; users@lists.opensips.org Subject: Re: [OpenSIPS-Users] loose_route with opensips 3.2 B2B module Hi Xaled, The record routing is incompatible with the b2b, by SIP definition. The record routing is done only by a SIP proxy, not by a SIP b2b2. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 2021 online https://opensips.org/training/OpenSIPS_eBootcamp_2021/ On 4/11/21 9:32 PM, xa...@web.de wrote: > Hi, > > would it be possible to respect loose routing on the caller side of > B2B module and set route header on the callee side accordingly > > Something like this: > > Incoming INVITE: > > INVITE sip:+12345678@1.2.3.4;user=phone SIP/2.0 > Via: SIP/2.0/TCP > 4.3.2.1:5060;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb > Route: , > > > Wanted outgoing INVITE: > > INVITE sip:+87654321@1.1.1.1;user=phone SIP/2.0 > Via: SIP/2.0/TCP > test.com;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb > Route: > > I tried setting loose_route in both the original route and in the resulting > b2b route but without success. > > route[b2b_test_logic] { > > <-->loose_route(); > > if ($rm != "BYE") { > # for requests other than BYE, no special actions needs to be done, > # just pass the request to the peer > b2b_pass_request(); > exit; > } > ... > > Thanks, > Xaled > > > ___ > 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] loose_route with opensips 3.2 B2B module
Use the "local_route" for that https://www.opensips.org/Documentation/Script-Routes-3-1#toc6 Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 2021 online https://opensips.org/training/OpenSIPS_eBootcamp_2021/ On 4/14/21 2:54 PM, xa...@web.de wrote: Hi Bogdan, I got it, the actual question is how can I add new headers (not only Route, but any header) with values to the outgoing B2B INVITE request. Please see my other mail. Thanks, Xaled -Original Message- From: Bogdan-Andrei Iancu Sent: Wednesday, April 14, 2021 12:30 PM To: xa...@web.de; users@lists.opensips.org Subject: Re: [OpenSIPS-Users] loose_route with opensips 3.2 B2B module Hi Xaled, The record routing is incompatible with the b2b, by SIP definition. The record routing is done only by a SIP proxy, not by a SIP b2b2. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 2021 online https://opensips.org/training/OpenSIPS_eBootcamp_2021/ On 4/11/21 9:32 PM, xa...@web.de wrote: Hi, would it be possible to respect loose routing on the caller side of B2B module and set route header on the callee side accordingly Something like this: Incoming INVITE: INVITE sip:+12345678@1.2.3.4;user=phone SIP/2.0 Via: SIP/2.0/TCP 4.3.2.1:5060;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb Route: , Wanted outgoing INVITE: INVITE sip:+87654321@1.1.1.1;user=phone SIP/2.0 Via: SIP/2.0/TCP test.com;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb Route: I tried setting loose_route in both the original route and in the resulting b2b route but without success. route[b2b_test_logic] { <-->loose_route(); if ($rm != "BYE") { # for requests other than BYE, no special actions needs to be done, # just pass the request to the peer b2b_pass_request(); exit; } ... Thanks, Xaled ___ 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] loose_route with opensips 3.2 B2B module
Hi Bogdan, I got it, the actual question is how can I add new headers (not only Route, but any header) with values to the outgoing B2B INVITE request. Please see my other mail. Thanks, Xaled -Original Message- From: Bogdan-Andrei Iancu Sent: Wednesday, April 14, 2021 12:30 PM To: xa...@web.de; users@lists.opensips.org Subject: Re: [OpenSIPS-Users] loose_route with opensips 3.2 B2B module Hi Xaled, The record routing is incompatible with the b2b, by SIP definition. The record routing is done only by a SIP proxy, not by a SIP b2b2. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 2021 online https://opensips.org/training/OpenSIPS_eBootcamp_2021/ On 4/11/21 9:32 PM, xa...@web.de wrote: > Hi, > > would it be possible to respect loose routing on the caller side of > B2B module and set route header on the callee side accordingly > > Something like this: > > Incoming INVITE: > > INVITE sip:+12345678@1.2.3.4;user=phone SIP/2.0 > Via: SIP/2.0/TCP > 4.3.2.1:5060;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb > Route: , > > > Wanted outgoing INVITE: > > INVITE sip:+87654321@1.1.1.1;user=phone SIP/2.0 > Via: SIP/2.0/TCP > test.com;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb > Route: > > I tried setting loose_route in both the original route and in the resulting > b2b route but without success. > > route[b2b_test_logic] { > > <-->loose_route(); > > if ($rm != "BYE") { > # for requests other than BYE, no special actions needs to be done, > # just pass the request to the peer > b2b_pass_request(); > exit; > } > ... > > Thanks, > Xaled > > > ___ > 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] loose_route with opensips 3.2 B2B module
Hi Xaled, The record routing is incompatible with the b2b, by SIP definition. The record routing is done only by a SIP proxy, not by a SIP b2b2. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 2021 online https://opensips.org/training/OpenSIPS_eBootcamp_2021/ On 4/11/21 9:32 PM, xa...@web.de wrote: Hi, would it be possible to respect loose routing on the caller side of B2B module and set route header on the callee side accordingly Something like this: Incoming INVITE: INVITE sip:+12345678@1.2.3.4;user=phone SIP/2.0 Via: SIP/2.0/TCP 4.3.2.1:5060;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb Route: , Wanted outgoing INVITE: INVITE sip:+87654321@1.1.1.1;user=phone SIP/2.0 Via: SIP/2.0/TCP test.com;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb Route: I tried setting loose_route in both the original route and in the resulting b2b route but without success. route[b2b_test_logic] { <-->loose_route(); if ($rm != "BYE") { # for requests other than BYE, no special actions needs to be done, # just pass the request to the peer b2b_pass_request(); exit; } ... Thanks, Xaled ___ 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] loose_route with opensips 3.2 B2B module
Hi, Could somebody provide any advice on the issue? Thanks, Xaled -Original Message- From: Users On Behalf Of xa...@web.de Sent: Sunday, April 11, 2021 11:36 PM To: 'OpenSIPS users mailling list' Subject: Re: [OpenSIPS-Users] loose_route with opensips 3.2 B2B module Hi, I tried to use the extra_hdrs variable of b2b_client_new to set up the Route header extra_hdrs (var, optional) - AVP variable holding a list of extra headers (the header names) to be added for any request sent to this entity. But was confused by the "header names" part and it looks like that it will not accept headers with values. What is then the use of the variable? xlog("INFO: B2B $b2b_logic.ctx(next_route)"); INFO: B2B Route: $avp(route_header) = $b2b_logic.ctx(next_route); b2b_client_new("media", "sip:+87654321@1.1.1.1;user=phone", "sip:$b2b_logic.ctx(server_ip)", ,$avp(route_header)); ERROR:b2b_logic:b2bl_entity_new: header names without values! The need to have an avp for extra_hdrs is an unnecessary limitation, or is there a specific reason for it? Thanks, Xaled -Original Message- From: Users On Behalf Of xa...@web.de Sent: Sunday, April 11, 2021 8:33 PM To: 'OpenSIPS users mailling list' Subject: [OpenSIPS-Users] loose_route with opensips 3.2 B2B module Hi, would it be possible to respect loose routing on the caller side of B2B module and set route header on the callee side accordingly Something like this: Incoming INVITE: INVITE sip:+12345678@1.2.3.4;user=phone SIP/2.0 Via: SIP/2.0/TCP 4.3.2.1:5060;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb Route: , Wanted outgoing INVITE: INVITE sip:+87654321@1.1.1.1;user=phone SIP/2.0 Via: SIP/2.0/TCP test.com;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb Route: I tried setting loose_route in both the original route and in the resulting b2b route but without success. route[b2b_test_logic] { <-->loose_route(); if ($rm != "BYE") { # for requests other than BYE, no special actions needs to be done, # just pass the request to the peer b2b_pass_request(); exit; } ... Thanks, Xaled ___ 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 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] loose_route with opensips 3.2 B2B module
Hi, I tried to use the extra_hdrs variable of b2b_client_new to set up the Route header extra_hdrs (var, optional) - AVP variable holding a list of extra headers (the header names) to be added for any request sent to this entity. But was confused by the "header names" part and it looks like that it will not accept headers with values. What is then the use of the variable? xlog("INFO: B2B $b2b_logic.ctx(next_route)"); INFO: B2B Route: $avp(route_header) = $b2b_logic.ctx(next_route); b2b_client_new("media", "sip:+87654321@1.1.1.1;user=phone", "sip:$b2b_logic.ctx(server_ip)", ,$avp(route_header)); ERROR:b2b_logic:b2bl_entity_new: header names without values! The need to have an avp for extra_hdrs is an unnecessary limitation, or is there a specific reason for it? Thanks, Xaled -Original Message- From: Users On Behalf Of xa...@web.de Sent: Sunday, April 11, 2021 8:33 PM To: 'OpenSIPS users mailling list' Subject: [OpenSIPS-Users] loose_route with opensips 3.2 B2B module Hi, would it be possible to respect loose routing on the caller side of B2B module and set route header on the callee side accordingly Something like this: Incoming INVITE: INVITE sip:+12345678@1.2.3.4;user=phone SIP/2.0 Via: SIP/2.0/TCP 4.3.2.1:5060;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb Route: , Wanted outgoing INVITE: INVITE sip:+87654321@1.1.1.1;user=phone SIP/2.0 Via: SIP/2.0/TCP test.com;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb Route: I tried setting loose_route in both the original route and in the resulting b2b route but without success. route[b2b_test_logic] { <-->loose_route(); if ($rm != "BYE") { # for requests other than BYE, no special actions needs to be done, # just pass the request to the peer b2b_pass_request(); exit; } ... Thanks, Xaled ___ 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
[OpenSIPS-Users] loose_route with opensips 3.2 B2B module
Hi, would it be possible to respect loose routing on the caller side of B2B module and set route header on the callee side accordingly Something like this: Incoming INVITE: INVITE sip:+12345678@1.2.3.4;user=phone SIP/2.0 Via: SIP/2.0/TCP 4.3.2.1:5060;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb Route: , Wanted outgoing INVITE: INVITE sip:+87654321@1.1.1.1;user=phone SIP/2.0 Via: SIP/2.0/TCP test.com;branch=z9hG4bK40365b83fb9732a054d124bb46252151.7242beeb Route: I tried setting loose_route in both the original route and in the resulting b2b route but without success. route[b2b_test_logic] { <-->loose_route(); if ($rm != "BYE") { # for requests other than BYE, no special actions needs to be done, # just pass the request to the peer b2b_pass_request(); exit; } ... Thanks, Xaled ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users