ERROR[701071] pjproject: icess0x7fe0381ac878 ..Error sending STUN request: Network is unreachable ERROR[1513953][C-00000313] res_srtp.c: Failed to create srtp session on rtp instance (0x7fe03811d150) - cipher failure

Hi all,

We have a Asterisk 16 server running without any problem supporting WebRTC and SIP in which calls were working well.

But suddenly, faced issue in making calls and got the below errors.

ERROR[701071] pjproject: icess0x7fe0381ac878 …Error sending STUN request: Network is unreachable
ERROR[1513953][C-00000313] res_srtp.c: Failed to create srtp session on rtp instance (0x7fe03811d150) - cipher failure
WARNING[1513953][C-00000313] res_rtp_asterisk.c: Could not set policies when setting up DTLS-SRTP on ‘0x7fe03809a7f0’
ERROR[1513953][C-00000313] res_rtp_asterisk.c: Failed to add local source ‘0x7fe03809a7f0’
WARNING[1513953][C-00000313] res_rtp_asterisk.c: RTP Read error: No such file or directory. Hanging up.
ERROR[1513957][C-00000314] res_srtp.c: Failed to create srtp session on rtp instance (0x7fe0380582c0) - cipher failure
WARNING[1513957][C-00000314] res_rtp_asterisk.c: Could not set policies when setting up DTLS-SRTP on ‘0x7fe038225fb0’
ERROR[1513957][C-00000314] res_rtp_asterisk.c: Failed to add local source ‘0x7fe038225fb0’
WARNING[1513957][C-00000314] res_rtp_asterisk.c: RTP Read error: No such file or directory. Hanging up.
ERROR[701071] pjproject: icess0x7fe0381ac878 …Error sending STUN request: Network is unreachable
ERROR[1513960][C-00000315] res_srtp.c: Failed to create srtp session on rtp instance (0x7fe038151900) - cipher failure
WARNING[1513960][C-00000315] res_rtp_asterisk.c: Could not set policies when setting up DTLS-SRTP on ‘0x7fe03810a450’
ERROR[1513960][C-00000315] res_rtp_asterisk.c: Failed to add local source ‘0x7fe03810a450’
WARNING[1513960][C-00000315] res_rtp_asterisk.c: RTP Read error: No such file or directory. Hanging up.

kindly help me to fix it .

Asterisk 16 is EOL. Upgrade to a supported version.

Additionally things don’t just stop working. Something changed. For example, was the libsrtp library updated?

Restarting the server fixed the issue.
Don’t know what fixed it.
any idea over it ?

Hi,

Asterisk 16 is running in Ubuntu 22.04. Calls were worked fine using WebRTC.
But today I noticed call gets terminated while answered immediately, getting below error.
SIP protocol calls also not working .

ERROR[1139034][C-00000252]: res_srtp.c:532 ast_srtp_create: Failed to create srtp session on rtp instance (0x7f59bc1a23b0) - cipher failure
[Apr 26 14:35:56] WARNING[1139034][C-00000252]: res_rtp_asterisk.c:2967 dtls_srtp_add_local_ssrc: Could not set policies when setting up DTLS-SRTP on ‘0x7f59bc1e2ba0’
[Apr 26 14:35:56] ERROR[1139034][C-00000252]: res_rtp_asterisk.c:3029 dtls_srtp_setup: Failed to add local source ‘0x7f59bc1e2ba0’
[Apr 26 14:35:56] WARNING[1139034][C-00000252]: res_rtp_asterisk.c:7699 ast_rtp_read: RTP Read error: No such file or directory. Hanging up.
– Channel PJSIP/5045-00000469 left ‘simple_bridge’ basic-bridge <128896b7-956f-46ae-9b93-3526970cc45f>
– Channel PJSIP/5001-00000468 left ‘simple_bridge’ basic-bridge <128896b7-956f-46ae-9b93-3526970cc45f>
== Spawn extension (from-internal, 5045, 4) exited non-zero on ‘PJSIP/5001-00000468’
[Apr 26 14:35:56] ERROR[896]: cdr_csv.c:275 writefile: Unable to open file /var/log/asterisk//cdr-csv//Master.csv : No such file or directory
[Apr 26 14:35:56] WARNING[896]: cdr_csv.c:308 csv_log: Unable to write CSV record to master ‘/var/log/asterisk//cdr-csv//Master.csv’ : No such file or directory

Network is unreachable and Unable to open file /var/log/asterisk//cdr-csv//Master.csv : No such file or directory

You have 2 problems here. Did tou check if network is working and if this file exist ?

yes network is reachable, that makes the call to work.