Note that despite my support for using http_async_query, I do agree with this point: If queries are more than very occasional, I'd build a purpose driven kamailio instance for handling a SIP to HTTP bridge.
HOWEVER given the original post context and code, it appears that this is their goal. Given the number of services that are offered -ONLY- over http, the response of "TL;DR don't do HTTP queries from Kamailio. Just don’t," can easily be taken to mean "don't use kamailio, because it can't do HTTP request", which I completely reject. Be smart, understand the intricacies of using it, but don't act like it is a world killer. Kaufman Senior Voice Engineer E: [email protected] SIP.US Client Support: 800.566.9810 | SIPTRUNK Client Support: 800.250.6510 | Flowroute Client Support: 855.356.9768 [img]<https://www.sip.us/> [img]<https://www.siptrunk.com/> [img]<https://www.flowroute.com/> ________________________________ From: Alex Balashov via sr-users <[email protected]> Sent: Thursday, December 19, 2024 11:14 AM To: [email protected] <[email protected]> Cc: Alex Balashov <[email protected]> Subject: [SR-Users] Re: Kamailio not receiving packets on high CPS CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. > On Dec 19, 2024, at 12:09 pm, Olle E. Johansson <[email protected]> wrote: > >> YES! You've just summarised the central thesis about async that I made in >> this blog post: >> >> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fblog.evaristesys.com%2F2016%2F02%2F15%2Ftuning-kamailio-for-high-throughput-and-performance%2F&data=05%7C02%7Cbkaufman%40bcmone.com%7C6b2591343afa49801a5708dd20511afb%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C638702254897756984%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=YkyNUsEFgNMQ6F58OGveNqq099m9jXZ%2F0EpNh5gDty8%3D&reserved=0<https://blog.evaristesys.com/2016/02/15/tuning-kamailio-for-high-throughput-and-performance/> >> >> TL;DR don't do HTTP queries from Kamailio. Just don’t > > Well, you can set up a cluster of background workers and use the normal > http_client. That will speed up the process to read from the network as the > network client processes are freed up by you suspending the transaction and > continuing in a background process (which you need many of). This will make > life better in some cases, but not all. Indeed, and this is what I do when I absolutely must use HTTP. We've built some relatively performant SIP-to-HTTP data query bridges that way. But when something is a poor fit, it's a poor fit. Kamailio is not a natural habitat for HTTP queries. -- Alex -- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fevaristesys.com%2F&data=05%7C02%7Cbkaufman%40bcmone.com%7C6b2591343afa49801a5708dd20511afb%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C638702254897788085%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=oayC9GKRMasQkfHGZ%2FbtEouFs%2BXbSssCWRlJdtW%2BjFc%3D&reserved=0<https://evaristesys.com/> Tel: +1-706-510-6800 __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
__________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
