WebRTC with Asterisk 13


I am unable to setup webRTC in asterisk 13 and when ever trying to register a sip getting the below error on my server
[Mar 5 10:35:13] DEBUG[28581]: http.c:1946 httpd_helper_thread: HTTP opening session. Top level
[Mar 5 10:35:13] DEBUG[28581]: tcptls.c:246 tcptls_stream_read: TLS transport or SSL error reading data: error:00000005:lib(0):func(0):DH lib, System call EOF
[Mar 5 10:35:13] DEBUG[28581]: http.c:1993 httpd_helper_thread: HTTP idle timeout or peer closed connection.
[Mar 5 10:35:13] DEBUG[28581]: http.c:2014 httpd_helper_thread: HTTP closing session. Top level

I am very new to webRTC concept, please guide or suggest some good article.

The problem appears to be with the HTTPS server itself. Did you generate your certificate itself? What browser are you using? Can you visit the Asterisk HTTPS address in the browser?

Hi @jcolp,

Yes, I have already generated the certificate on linux server and yes I can visit the HTTPS in the browser by manually add exception and confirm certificate.



Found the issue as I was just opening the https in the browser without the port and wss but after puting the port in the https in browser and got below different error now

[Mar 6 07:02:37] DEBUG[6767]: threadpool.c:1137 worker_idle: Worker thread idle timeout reached. Dying.
[Mar 6 07:02:37] DEBUG[2897]: threadpool.c:996 worker_thread_destroy: Destroying worker thread 4020
[Mar 6 07:02:40] DEBUG[3189]: res_odbc.c:865 _ast_odbc_request_obj2: Reusing ODBC handle 0x7f18ec026930 from class ‘asterisk’
[Mar 6 07:02:40] DEBUG[3189]: res_config_odbc.c:116 custom_prepare: Skip: 0; SQL: SELECT * FROM ps_contacts WHERE expiration_time <= ? ORDER BY expiration_time
[Mar 6 07:02:40] DEBUG[3189]: res_config_odbc.c:132 custom_prepare: Parameter 1 (‘expiration_time <=’) = ‘1520319760’
[Mar 6 07:02:40] DEBUG[3189]: res_odbc.c:714 ast_odbc_release_obj: Releasing ODBC handle 0x7f18ec026930 into pool
[Mar 6 07:02:40] DEBUG[3189]: res_pjsip_registrar_expire.c:85 check_expiration_thread: Expiring 0 contacts


Those are debug messages, not errors. If you aren’t a developer you shouldn’t have them on as they will cause you to think there are errors when there are not.

What precisely is happening now?


I am using sipML5 to test if my ext is getting registered but no error is coming and not registering too so what else steps should I take to debug more? Any suggestions?

If you are using chan_pjsip then use “pjsip set logger on” to look at the incoming traffic. If you are using chan_sip then use “sip set debug on”. If you don’t see any messages then it’s the sipml5 side. If you see messages but the registration fails, then it’s likely your configuration in Asterisk.

I should also add my normal WebRTC disclaimer - if you are planning to deploy WebRTC or use it heavily you MUST learn about how it works and the fundamentals. It WILL NOT work 100% of the time.

Yes, I am learning actually and need good documentation for the same.

And yes there is an issue with sipML5 so I used another and it is working fine atleast registration has been done successfully but no number coming but anyways, I will look into it.

Thanks for you help Josh :slight_smile:

There’s tons of documentation about the fundamentals of WebRTC across the internet, as it’s not a specific technology to Asterisk.