sipgate / sipgate.io

Create custom telephony integration solutions. Play audio files, manage your devices, reject the call, present dial tone menus or just create statistics. Adapt telephony to your business needs, control your home automation with your phone or just create that funny hack to make using the phone more enjoyable. @sipgate.io, https://twitter.com/sipgateio
https://www.sipgate.io
Other
200 stars 32 forks source link

WAV not playing #146

Closed edent closed 3 years ago

edent commented 3 years ago

I'm using the PHP code from this repo. I've set the Webhook URL and turned on debug logging.

When someone calls me, the log shows this response:

HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Type: application/xml
Vary: Accept-Encoding,User-Agent,User-Agent
Date: Sun, 16 May 2021 14:45:21 GMT
Server: LiteSpeed
Content-Security-Policy: upgrade-insecure-requests;
Alt-Svc: quic=":443"; ma=2592000; v="43,46", h3-Q043=":443"; ma=2592000, h3-Q046=":443"; ma=2592000, h3-Q050=":443"; ma=2592000, h3-25=":443"; ma=2592000, h3-27=":443"; ma=2592000

<?xml version="1.0" encoding="UTF-8"?>
<Response><Play><Url>https://shkspr.mobi/test/banana.wav</Url></Play></Response>

But the caller is connected to me - no WAV files plays.

The WAV is encoded as pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s - does it need to be a different format, or have I done something wrong?

Thanks!

edent commented 3 years ago

Ah! It needs to be 8KHz!

https://www.sipgate.io/push-api/api-references#play