Hello,
I’m setting up an asterisk server to use between a raspberry and a flutter app.
I did it by implementig websocket transport in my pjsip.conf. I have logs that tells me it is ringing and I can see it in my app but when I answer the call, asterisk tells me everyone is busy. Because flutter may require dtls, I wanted to add a dtls config to my configuration but my phone can’t register. This are my config files:
// pjsip.conf
[general]
[transport-ws]
type=transport
protocol=ws
bind=0.0.0.0
allow_reload=yes
Thanks a lot for your responses. Actually it works I can register and the communication begins but only in one way. The audio only transfert from the raspberry (udp) to my flutter app (ws). If you have an idea for this bug.
It’s not a bug but a network problem. In asterisk set rtp debug on and see if you have rtp traffic as it should. You could also run tcpdump on your raspberry to see if rtp is going in and out. Finally check your firewall/router/… if you have something related to SIP activated like ALG for example.
After turning on the rtp debug, I also see that it gets data from the raspberry and send it to the app but not the opposite. I will check if this comes from the socket handling in the app.
after checking with wireshark, from the app to the raspberry I have an “unreachable port” error. this is my rtp.conf :
[general]
rtpstart=10000
rtpend=50000
icesupport=true
and this is the log from asterisk during a call :
Executing [0645361771@diese:1] Dial(“PJSIP/106-00000000”, “PJSIP/0645361771”) in new stack
– Called PJSIP/0645361771
– PJSIP/0645361771-00000001 is ringing
> 0x7f60fc0508b0 – Strict RTP learning after remote address set to: 46.218.10.43:45419
– PJSIP/0645361771-00000001 answered PJSIP/106-00000000
> 0x7f60fc011f90 – Strict RTP learning after remote address set to: 172.16.1.6:4008
– Channel PJSIP/0645361771-00000001 joined ‘simple_bridge’ basic-bridge
– Channel PJSIP/106-00000000 joined ‘simple_bridge’ basic-bridge
> 0x7f60fc0508b0 – Strict RTP learning after ICE completion
> 0x7f60fc0508b0 – Strict RTP learning after remote address set to: 46.218.10.43:45419
> 0x7f60fc011f90 – Strict RTP qualifying stream type: audio
> 0x7f60fc011f90 – Strict RTP switching source address to 178.33.26.236:4008
> 0x7f60fc0508b0 – Strict RTP switching to RTP target address 46.218.10.43:45419 as source
> 0x7f60fc011f90 – Strict RTP learning complete - Locking on source address 178.33.26.236:4008
> 0x7f60fc0508b0 – Strict RTP learning complete - Locking on source address 46.218.10.43:45419