Couldn’t add sdp streams for stream

Asterisk PBXYou try to establsish a call but it got disconnected and there is following message in Asterisk console from PJSIP Couldn’t add sdp streams for stream:

Two most common cases can cause this:

  1. You specified encryption for one of the endpoints while the endpoint does not support it, or there are no common codecs.
  2. You see the addititonal error messages in debug output of the Asterisk’s console right before the abovementioned “No SRTP module loaded, can’t setup SRTP session” “Couldn’t add crypto” “Coudn’t create sdp stream“:

In this case module is not loaded or missing.

Try to load it first in Asterisk console:

In case you see “Cannot open shared object: no such file or directory” you need to compile and install it.

Make sure you have dependencies installed.

In CentOS 8 install them

Then go to directory with Asterisk sources codes and issue ./configure command. After it completes generate menu with make menuselect command and choose res_srtp:


Then press Tab -> Save&Exit -> Enter.

Do make && make install

Now restart Asterisk and try to call again.

Good luck!

Want me to do this for you? Drop me a line: itgalaxyzzz {at} gmail [dot] com