Hello,
I have a Setup with Kamailio, RTPEngine, Asterisk, AudioSocket and ARI implemented by a Python Program. It is used as the base for a voice bot. I can receive Data from Audio Socket and playback .wav via POST /channels/{channelId}/play.
Unfortunately, it is not possible to stream the audio data in real time, it seems like Asterisk is discarding the audio packets and I don`t know why:
By doing a simple echo I observe:
- tcpdump shows, that data is exchanged between Asterisk and my Python program over AudioSocket in both directions
- the packets are correct, as sending intentionally wrong packets lead to the expected error logs defined in audiosocket/asterisk/res/res_audiosocket.c at master · CyCoreSystems/audiosocket · GitHub
- asterisk -rvvvvv and “rtp set debug on” only present packets coming from RTP.
– Executing [+1234…@from-kamailio:3] Stasis(“PJSIP/kamailio-01-00000006”, "audioari, sip:user@my.domain.com;tag=48e83e0c, , ") in new stack
Got RTP packet from 192.168.2.140:38354 (type 08, seq 058052, ts 1022308286, len 000160)
Got RTP packet from 192.168.2.140:38354 (type 08, seq 058056, ts 1022308926, len 000160)
– Channel Snoop/1739896844.48-0000000c joined ‘simple_bridge’ stasis-bridge
– Called localhost:8080/19746b10-ee17-11ef-8d3c-fa163edfb44b
– AudioSocket/localhost:8080-19746b10-ee17-11ef-8d3c-fa163edfb44b answered
Launching Stasis(audioari) on AudioSocket/localhost:8080-19746b10-ee17-11ef-8d3c-fa163edfb44b
– Channel AudioSocket/localhost:8080-19746b10-ee17-11ef-8d3c-fa163edfb44b joined ‘simple_bridge’ stasis-bridge
Got RTP packet from 192.168.2.140:38354 (type 08, seq 058057, ts 1022309086, len 000160)
Got RTP packet from 192.168.2.140:38354 (type 08, seq 058058, ts 1022309246, len 000160)
Got RTP packet from 192.168.2.140:38354 (type 08, seq 058059, ts 1022309406, len 000160)
Got RTP packet from 192.168.2.140:38354 (type 08, seq 058060, ts 1022309566, len 000160)
Got RTP packet from 192.168.2.140:38354 (type 08, seq 058061, ts 1022309726, len 000160)
Got RTP packet from 192.168.2.140:38354 (type 08, seq 058062, ts 1022309886, len 000160)
Got RTP packet from 192.168.2.140:38354 (type 08, seq 058063, ts 1022310046, len 000160)
Got RTP packet from 192.168.2.140:38354 (type 08, seq 058064, ts 1022310206, len 000160)
I’m sure it is not a problem with:
- NAT, as the playback over URL is working
- Transcoding, as I restricted it to alaw
Unfortunately, there is no documentation and no example that could help to solve this issue.
What mechanism stops Asterisk sending the RTP packets?
Is there a config that must be adjusted, if so, which?
Any help would be appreciated.