Hello everyone
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?
" 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."
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?
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.