WSS: extension 'undefined'

I am testing WebRTC to make and receive calls.

Sometimes, there is a noisy sound when a call between extensions within the same Asterisk system is connected after the other party answers. I noticed that this occurs every time this message appears:

[2023-05-31 09:17:44] NOTICE[11010] res_pjsip_session.c: Call from '7002' (WSS:200.240.249.34:50779) to extension 'undefined' rejected because extension not found in context 'ddd'.
[2023-05-31 09:17:45] NOTICE[2346] res_pjsip_session.c: Call from '7002' (WSS:200.240.249.34:50779) to extension 'undefined' rejected because extension not found in context 'ddd'.

7002 is the source and 7052 is the destination.
Extension 7052 initiates the call, but when extension 7052 answers, it doesn’t hear anything.
Extension 7002, which originated the call, experiences noisy sound on the line.

200.240.249.34 is the IP address where the WebRTC application is running.

This problem occurs occasionally, where multiple calls are made without any issues until eventually one of them experiences this problem.

Can anyone explain why this happens and how to solve it?

The logging is because Asterisk received a SIP INVITE with a request user of “undefined” probably due to some Javascript thing. The noise thing is also probably due to the client.

I believe those errors were just a coincidence, as I ran some additional tests and experienced some noise for the caller while the destination didn’t hear anything, and no errors were generated in the console.

I tried with a different web client, and after several attempts, I encountered the same error. Is there any specific client you recommend or suggest for me to test?

Not really. The ones I know of are libraries that you then use to write your own client, and underneath it is using browser functionality to actually do the audio side. You’ve entered the area where you need to understand the library, the Javascript, browser behavior, and the fundamentals of WebRTC (ICE / STUN / DTLS-SRTP), in order to isolate your problem and determine what’s up. You need to actually isolate down the problem to determine where it is.

I managed to solve it.
The issue occurred when I tried to use the Opus or G722 codecs. I switched to the ulaw codec, and the problem stopped occurring.

I don’t know how to explain why it sometimes worked when using Opus or G722, and sometimes it caused issues.

I would be grateful if someone could provide an explanation for it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.