I have a small question, maybe you can answer it.
I want to understand if it is possible to use only the SIP protocol, while disabling RTP completely in Asterisk?
If I understand correctly, when we establish a communication session, we automatically use RTP, which reserves 2 UDP ports
In the Asterisk settings, we can specify only a range of ports.
But I need to completely disable RTP to reduce the load and use only SIP.
Perhaps you can tell me how to find a solution, maybe comment out some piece of code that includes RTP?
There is no such ability. As well you’d need to specify what “use only SIP” means. It sounds as if you’d actually want a SIP proxy like Kamailio.
I need to send information via SIP
Such as Invite
Get for example Trying, after Ringing
And then send Cancel
And not initialize the call
If the call is not answered, or session progress is not done, then while RTP is allocated media won’t be flowing.
In the documentation I found the following
" RTP in Asterisk is managed by a central API defined in
include/asterisk/rtp_engine.h . It provides a front-end to pluggable RTP engines. The core Asterisk distribution ships with two RTP engines: res_rtp_asterisk and res_rtp_multicast.
The top-level is mostly used as a front-end to the underlying engines, providing methods for creating RTP instances, setting properties (such as enabling RFC 4733 DTMF, indicating media NAT in existence), reading and writing stream data, and some other miscellaneous utilities."
Will it help if I disable the API?
There is no “disabling the API”. The SIP channel drivers are built to use it, and will fail if it’s not present. If you truly want to do this then you’re hacking up code and who knows what will happen in the end.
That is, Asterisk will use RTP anyway and allocate UDP ports?
Is it impossible to exclude this procedure? Only if you try to remove it at the code level?
RTP will be allocated including ports. If RTP doesn’t flow, then RTP doesn’t flow and nothing will happen.
You’re fundamentally asking things to work how they’re not written or expected to work, you’re in off-nominal on your own territory.
I understand you, thank you very much for the explanation and all the best!
It’s not an intended use of SIP. You may also find that your provider blocks you or surcharges you if they find an excessive number of calls that get cancelled.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.