I agree on the "make it a separate server" as a best practice, however I think
that unless the discussion is implementing a SIP stack in the python script, this is not
the way to go. Assuming that the question is about using KEMI for the script (either as
the entire Kamailio scripting or calling a python function inline with scripting), the
same problem remains:
You need to make WAITING for the reply to be asynchronous.
I'm not sure that you can do that in a python function and then resume the SIP
processing (i.e. Do something useful with the reply). I'm not absolutely certain on
this, but I think that is the general problem with using just the async module when 100%
(or near 100%) of your requests will follow this pattern.
Kaufman
Senior Voice Engineer
E: bkaufman(a)bcmone.com
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 <sr-users(a)lists.kamailio.org>
Sent: Monday, December 23, 2024 9:25 AM
To: sr-users(a)lists.kamailio.org <sr-users(a)lists.kamailio.org>
Cc: Alex Balashov <abalashov(a)evaristesys.com>
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 23, 2024, at 10:06 am, Sergio Charrua
<sergio.charrua(a)voip.pt> wrote:
Could creating a "middleware" python script (or any other language) that
Kamailio calls and sends required data, and then makes a HTTP request to the API be
efficient ?
100%, and this is what you should do. Just make sure it's a separate service and not a
script.
--
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web:
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fevaristes…
Tel: +1-706-510-6800
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions --
sr-users(a)lists.kamailio.org
To unsubscribe send an email to sr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!