I’m a newbie on Asterisk, and after a long time research I’ve gotten my Asterisk server work with CURL. But there are still some problems that I’m trying to resolve.
Could anyone here help me?
I configured the Asterisk server to real-timely seek SIP peers from my HTTP server via CURL. The CURL will hold the TCP connection if I keep the connection alive, and that would result in a block when the connection has not been activated long time. As a consequence, any requests from SIP clients would be blocked for a long time until the connection is thought as closed(the default value is 180s). So I have to turn the keep-alive option off at my HTTP server end. But I do not think this is the best way to deal with it.
I’ve read some source of Asterisk about real-time with CURL. And I do figure out that Asterisk only hold one CURL handle despite multiple threads, which results in that Asterisk deals with requests in parallel but has to make a WEB request (for real-timely load SIP peers) serially. And obviously, it makes the server slowly.
There are nearly no messages about Asterisk with CURL. Questions above are summarized after a lot of trials.
The version of my Asterisk is 11.3.0. Does anyone here know anything about these problems? Thanks.