Asterisk 13.34.0-vici get working with webrtc (full documented)

Hello to all this community, this is my first post and I want to make this thread to all the people facing the same issue, I made a fresh install of vicidial with asterisk Version 13.34.0-vici and everything works fine with the actual setup, but my main problem is the WebRTC, we can make calls VIA sip to softphones, and we receive and send calls, i took down the firewall for WebRTC test, but anyways, i got no sound with my actual setup, I tried the same setup on AWS ec2 but no resolution to my case.

debug to webrtc phone

2020-10-06 20:29:51 =>
displayName: gs102
uri: gs102@10.128.0.8
authorizationUser: gs102
password: ****
wsServers: wss://FQDN:8089/ws

and seems almost promising but, i feel that i missing something and i hope you can help me with that, the phone registrations works but i got no sound and checking my asterisk console, i got this error

[Oct  6 22:30:03] WARNING[2269]: sip/config_parser.c:819 sip_parse_nat_option: nat=yes is deprecated, use nat=force_rport,comedia instead
[Oct  6 22:30:03] WARNING[2269]: chan_sip.c:33172 reload_config: Cannot use 'tcp' transport with tcpenable=no. Removing from available transports.
[Oct  6 22:30:03] WARNING[2269]: chan_sip.c:33185 reload_config: No valid default transport. Selecting 'udp' as default.
[Oct  6 22:30:03]   == Using SIP CoS mark 4
[Oct  6 22:30:03] WARNING[2269]: chan_sip.c:30880 set_insecure_flags: Unknown insecure mode 'very' on line 18
[Oct  6 22:30:03] WARNING[2269]: sip/config_parser.c:819 sip_parse_nat_option: nat=yes is deprecated, use nat=force_rport,comedia instead
[Oct  6 22:30:07]   == Manager 'sendcron' logged on from 127.0.0.1
[Oct  6 22:30:07]   == Manager 'sendcron' logged off from 127.0.0.1
[Oct  6 22:30:16]     -- Reloading module 'res_musiconhold.so' (Music On Hold Resource)
[Oct  6 22:30:23] ERROR[2269]: utils.c:1499 ast_careful_fwrite: fflush() returned error: Bad file descriptor
[Oct  6 22:30:23] ERROR[2269]: tcptls.c:488 tcptls_stream_close: SSL_shutdown() failed: error:00000005:lib(0):func(0):DH lib, Underlying BIO error: Bad file descriptor
[Oct  6 22:30:23]   == WebSocket connection from '190.87.160.176:51050' forcefully closed due to fatal write error

And I tried to set up all step by step, I have knowledge about programming and values but I missing something, i will post the asterisk setup as well but resumed

[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
enablestatic=yes
tlsenable=yes          
tlsbindaddr=0.0.0.0:8089 
tlscertfile=/etc/certbot/live/FQDN/cert.pem
tlsprivatekey=/etc/certbot/live/FQDN/privkey.pem

that’s the main setup, and the ssl certs works, i mean, when load the page it says that is secure, btw, I force all the connections to ssl, this is my sip.conf code, again, resumed

[general]
transport=tcp,udp,ws,wss
avpf=yes
udpbindaddr=0.0.0.0:5060
tcpbinaddr=0.0.0.0:5060
context=trunkinbound          
allowguest=no               
allowoverlap=no  
realm=FQDN
bindport=5060                   
bindaddr=0.0.0.0               
srvlookup=yes     
disallow=all                    ; First disallow all codecs
allow=ulaw                      ; Allow codecs in order of preference
allow=gsm
mohinterpret=default
mohsuggest=default
language=en                    
relaxdtmf=yes                  
trustrpid = no                 
sendrpid = yes                  
progressinband=no  
videosupport=no   
callevents=yes  
dtmfmode = rfc2833   
rtptimeout=60 
notifyringing = yes             ;
notifyhold = yes 
externip =  MYEXTERNALIP
localnet=192.168.0.0/255.255.0.0
localnet=10.0.0.0/255.0.0.0 
localnet=172.16.0.0/12          
localnet=169.254.0.0/255.255.0.0
nat=yes                      
canreinvite=no  
jbenable = yes            
jbforce = no                
jbmaxsize = 100          
jbresyncthreshold = 1000   
jbimpl = fixed            
jblog = no                  
qualify=yes            
limitonpeer = yes  

I used Amazon ec2 to have the same system, but now i’m using Google cloud, but is the same issue and i tried to fixed the two times, but no fix with the webrtc, i had setup the websocket server, but i think i’m missing some extra configuration that I will be glad if you can help me.

The webphone error was reproduced on the vicidial agent login

[Oct  6 22:52:10]   == WebSocket connection from '190.87.160.176:8850' for protocol 'sip' accepted using version '13'
[Oct  6 22:52:10]     -- Registered SIP 'gs102' at 190.87.160.176:8850
[Oct  6 22:52:15]   == Manager 'sendcron' logged on from 127.0.0.1
[Oct  6 22:52:15]   == Using SIP RTP CoS mark 5
[Oct  6 22:52:15]     -- Called gs102
[Oct  6 22:52:16]     -- SIP/gs102-00000007 is ringing
[Oct  6 22:52:21]     -- SIP/gs102-00000007 answered
[Oct  6 22:52:21]     -- Executing [8600051@default:1] MeetMe("SIP/gs102-00000007", "8600051,F") in new stack
[Oct  6 22:52:21]     -- Created MeetMe conference 1023 for conference '8600051'
[Oct  6 22:52:21]     -- <SIP/gs102-00000007> Playing 'conf-onlyperson.gsm' (language 'en')
[Oct  6 22:52:22]   == Manager 'sendcron' logged off from 127.0.0.1
[Oct  6 22:52:25] ERROR[2269]: utils.c:1499 ast_careful_fwrite: fflush() returned error: Bad file descriptor
[Oct  6 22:52:25] ERROR[2269]: tcptls.c:488 tcptls_stream_close: SSL_shutdown() failed: error:00000005:lib(0):func(0):DH lib, Underlying BIO error: Bad file descriptor
[Oct  6 22:52:25]   == WebSocket connection from '190.87.160.176:2849' forcefully closed due to fatal write error
[Oct  6 22:52:29]        > 0x7f82ec037080 -- Strict RTP learning after ICE completion

then the hang up action

Oct  6 22:53:03]     -- Manager 'sendcron' from 127.0.0.1, hanging up channel: SIP/gs102-00000007
[Oct  6 22:53:03]     -- Hungup 'DAHDI/pseudo-1720329599'
[Oct  6 22:53:03]   == Spawn extension (default, 8600051, 1) exited non-zero on 'SIP/gs102-00000007'
[Oct  6 22:53:03]     -- Executing [h@default:1] AGI("SIP/gs102-00000007", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------------SIP 200 OK)") in new stack
[Oct  6 22:53:03]     -- <SIP/gs102-00000007>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------------SIP 200 OK) completed, returning 0
[Oct  6 22:53:03]   == Manager 'sendcron' logged on from 127.0.0.1
[Oct  6 22:53:03]     -- Called 55558600051@default
[Oct  6 22:53:03]     -- Executing [55558600051@default:1] MeetMeAdmin("Local/55558600051@default-0000000b;2", "8600051,K") in new stack
[Oct  6 22:53:03] WARNING[2651][C-00000014]: app_meetme.c:5261 admin_exec: Conference number '8600051' not found!
[Oct  6 22:53:03]     -- Executing [55558600051@default:2] Hangup("Local/55558600051@default-0000000b;2", "") in new stack
[Oct  6 22:53:03]   == Spawn extension (default, 55558600051, 2) exited non-zero on 'Local/55558600051@default-0000000b;2'
[Oct  6 22:53:03] WARNING[2651][C-00000014]: func_hangupcause.c:140 hangupcause_read: Unable to find information for channel 
[Oct  6 22:53:03]     -- Executing [h@default:1] AGI("Local/55558600051@default-0000000b;2", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------------)") in new stack
[Oct  6 22:53:03]     -- <Local/55558600051@default-0000000b;2>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------------) completed, returning 0

then i got this errors frequently

[Oct  6 22:55:20] ERROR[2269]: chan_sip.c:4294 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data
[Oct  6 22:55:34] ERROR[2269]: chan_sip.c:4294 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data
[Oct  6 22:55:48] ERROR[2269]: chan_sip.c:4294 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data

All the firewall on the cloud is open, and if you could really help me, i will be really happy :smiley:

Looks like your peer unilaterally closed the TCP connection underlying the TLS one!

Note you need to use (+) to continue a section in sip.conf and you should point out to vicidial that if they are advising the use of chan_sip, they should support it, as it is no longer supported by the core Asterisk developers. You have at least two deprecated settings in your configuration.

Can you be more specific, like a final sample code? Or what’s the steps I need to follow

Help team, i’m having this on google cloud and i don’t have any resolutions…

There is no team; this is a peer support forum.

See https://wiki.asterisk.org/wiki/display/AST/Adding+to+an+existing+section

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