[OpenSIPS-Users] Modify the headers after executing a MI function in B2B_LOGIC module

Li Cai Li.Cai at comtech.com
Tue Aug 30 13:32:03 UTC 2022


Hi Bogdan,

Thank you very much for the help, I have located the issue in our script.


Thanks,
Li

From: Bogdan-Andrei Iancu <bogdan at opensips.org>
Sent: August 30, 2022 9:20 AM
To: Li Cai <Li.Cai at comtech.com>; OpenSIPS users mailling list <users at lists.opensips.org>
Subject: Re: [OpenSIPS-Users] Modify the headers after executing a MI function in B2B_LOGIC module


WARNING: External Email: Exercise Caution

Hi Li,

The INVITE in #77 is an initial INVITE, connecting to a new party (as a result of the bridging), so the TO hdr in that INVITE is dictated by the B2B logic - as you can see the TO URI is the same as RURI, pointing to the new party in the bridging.

Regards,


Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips-solutions.com%2F&data=05%7C01%7CLi.Cai%40comtech.com%7C2bec8b8171384770109208da8a8a63b2%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637974624245097901%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Y02H11JhkeX68kNhMH4gcDCBk05Gr7ILA0gQeb%2BwqyA%3D&reserved=0>

OpenSIPS Summit 27-30 Sept 2022, Athens

  https://www.opensips.org/events/Summit-2022Athens/<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips.org%2Fevents%2FSummit-2022Athens%2F&data=05%7C01%7CLi.Cai%40comtech.com%7C2bec8b8171384770109208da8a8a63b2%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637974624245097901%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=atfyMuTwfQMAmUVW%2FzPtmEsbaE6nSySyHCsgI5xpzAA%3D&reserved=0>
On 8/25/22 10:57 PM, Li Cai wrote:
[This email is resent for the last one is oversized]

Hi Bodgan,

Thanks a lot for the help, the pcap file is attached.  The call flow is as -

   #11.                 INVITE from the caller on 10.10.8.131 to B2BProxy 10.10.9.205
   #15.                 Forwarded INVITE from B2BProxy with the expected To header to SIP UA1
    .. . the call is setup and then b2b_bridge is triggered  ...
   #75.                 B2BProxy sent reINVITE to the caller
   #77.                 B2BProxy sent INVITE to SIP UA2 with the unaccepted To header
   #79.                 SIP UA2 rejected the call


The step #77 And #79 shows the problem, that the call was rejected as the To header in INVITE is not using the UA2's IP instead of B2BProxy's IP as domain name, which is required in our system.

In our opensips.cfg script, we have already included clauses like remove_hf("To") and append_hf("To ...") but seems like they only work before b2b_bridge occurs.




Thanks,
Li




From: Bogdan-Andrei Iancu <bogdan at opensips.org<mailto:bogdan at opensips.org>>
Sent: August 25, 2022 3:05 AM
To: Li Cai <Li.Cai at comtech.com<mailto:Li.Cai at comtech.com>>; OpenSIPS users mailling list <users at lists.opensips.org<mailto:users at lists.opensips.org>>
Subject: Re: [OpenSIPS-Users] Modify the headers after executing a MI function in B2B_LOGIC module


WARNING: External Email: Exercise Caution
Hi Li,

Somehow we are going in circles here :). So, could you post a pcap for call going via your B2B  (showing all in and out SIP messages) and mention which frame is the outgoing request you cannot modify ?

Regards,

Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips-solutions.com%2F&data=05%7C01%7CLi.Cai%40comtech.com%7C2bec8b8171384770109208da8a8a63b2%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637974624245097901%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Y02H11JhkeX68kNhMH4gcDCBk05Gr7ILA0gQeb%2BwqyA%3D&reserved=0>

OpenSIPS Summit 27-30 Sept 2022, Athens

  https://www.opensips.org/events/Summit-2022Athens/<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips.org%2Fevents%2FSummit-2022Athens%2F&data=05%7C01%7CLi.Cai%40comtech.com%7C2bec8b8171384770109208da8a8a63b2%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637974624245097901%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=atfyMuTwfQMAmUVW%2FzPtmEsbaE6nSySyHCsgI5xpzAA%3D&reserved=0>
On 8/24/22 6:50 PM, Li Cai wrote:
Hi Bogdan,

Thanks for the explanation. I mean that the local_route can take effect for the forwarded INVITE(from incoming ones) in our proxy, but not after b2b_bridge. I'll do more debugging on it since the messages should be visible. Thank you very much.


Thanks,
Li

From: Bogdan-Andrei Iancu <bogdan at opensips.org><mailto:bogdan at opensips.org>
Sent: August 24, 2022 10:33 AM
To: Li Cai <Li.Cai at comtech.com><mailto:Li.Cai at comtech.com>; OpenSIPS users mailling list <users at lists.opensips.org><mailto:users at lists.opensips.org>
Subject: Re: [OpenSIPS-Users] Modify the headers after executing a MI function in B2B_LOGIC module


WARNING: External Email: Exercise Caution


Hi Li,

All SIP requests generated by `b2b_bridge` are to be visible in local_route. And on the contrary, the incoming (received) requests DO NOT trigger local route.

Regards,



Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips-solutions.com%2F&data=05%7C01%7CLi.Cai%40comtech.com%7C2bec8b8171384770109208da8a8a63b2%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637974624245097901%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Y02H11JhkeX68kNhMH4gcDCBk05Gr7ILA0gQeb%2BwqyA%3D&reserved=0>

OpenSIPS Summit 27-30 Sept 2022, Athens

  https://www.opensips.org/events/Summit-2022Athens/<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips.org%2Fevents%2FSummit-2022Athens%2F&data=05%7C01%7CLi.Cai%40comtech.com%7C2bec8b8171384770109208da8a8a63b2%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637974624245097901%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=atfyMuTwfQMAmUVW%2FzPtmEsbaE6nSySyHCsgI5xpzAA%3D&reserved=0>
On 8/24/22 4:34 PM, Li Cai wrote:
Hi Bogdan,

Yes, we have put the changes by calling remove_hf() and append_hf() in the 'local_route', those functions for new incoming INVITE but not the INVITE sent out by 'b2b_bridge'.


Thanks,
Li

From: Bogdan-Andrei Iancu <bogdan at opensips.org><mailto:bogdan at opensips.org>
Sent: August 24, 2022 7:18 AM
To: OpenSIPS users mailling list <users at lists.opensips.org><mailto:users at lists.opensips.org>; Li Cai <Li.Cai at comtech.com><mailto:Li.Cai at comtech.com>
Subject: Re: [OpenSIPS-Users] Modify the headers after executing a MI function in B2B_LOGIC module


WARNING: External Email: Exercise Caution



Hi Li,

Have you tried to use the local_route in order to do custom changes on the outgoing requests generated by the B2B bridging ?

Best regards,




Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips-solutions.com%2F&data=05%7C01%7CLi.Cai%40comtech.com%7C2bec8b8171384770109208da8a8a63b2%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637974624245097901%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Y02H11JhkeX68kNhMH4gcDCBk05Gr7ILA0gQeb%2BwqyA%3D&reserved=0>

OpenSIPS Summit 27-30 Sept 2022, Athens

  https://www.opensips.org/events/Summit-2022Athens/<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips.org%2Fevents%2FSummit-2022Athens%2F&data=05%7C01%7CLi.Cai%40comtech.com%7C2bec8b8171384770109208da8a8a63b2%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637974624245097901%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=atfyMuTwfQMAmUVW%2FzPtmEsbaE6nSySyHCsgI5xpzAA%3D&reserved=0>
On 8/23/22 10:34 PM, Li Cai wrote:
Hi,

I'm working on a change for a B2BUA based on OpenSIPs 2.4, but not sure if the function is supported or if it has been supported in the later versions.

We have used the MI command b2b_bridge to bridge existing calls from one entity to another and it works, the scenario is the same as expected. While besides this, we also need to modify one of the headers of the INVITEs sending to the new destination in this scenario,  our scripts in the opensips.cfg can't take any effect.


Thanks,
Li
NOTICE TO RECIPIENT: This email, including attachments, may contain information which is confidential, proprietary, attorney-client privileged and / or controlled under U.S. export laws and regulations and may be restricted from disclosure by applicable State and Federal law. Nothing in this email shall create any legal binding agreement between the parties unless expressly stated herein and provided by an authorized representative of Comtech Telecommunications Corp. or its subsidiaries. If you are not the intended recipient of this message, be advised that any dissemination, distribution, or use of the contents of this message is strictly prohibited. If you received this message in error, please notify us immediately by return email and permanently delete all copies of the original email and any attached documentation from any computer or other media.




_______________________________________________

Users mailing list

Users at lists.opensips.org<mailto:Users at lists.opensips.org>

http://lists.opensips.org/cgi-bin/mailman/listinfo/users<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=05%7C01%7CLi.Cai%40comtech.com%7C2bec8b8171384770109208da8a8a63b2%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637974624245097901%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=4UrRAVutVZi494WbLzs9rE1kzvB%2BDuwNqBOCgrlDXsQ%3D&reserved=0>




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20220830/50b6f2f7/attachment-0001.html>


More information about the Users mailing list