Skip to content

Commit 5955d64

Browse files
authored
Force ipv4
1 parent beea2e6 commit 5955d64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client-samples/asterisk-ari/vosk_ari.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ async def rtp_handler(self, connection):
3434
async def init(self, client, channel):
3535
self.port = 45000 + len(channels)
3636
self.rec = vosk.KaldiRecognizer(model, 16000)
37-
self.udp = aioudp.serve("localhost", self.port, self.rtp_handler)
37+
self.udp = aioudp.serve("127.0.0.1", self.port, self.rtp_handler)
3838
await self.udp.__aenter__()
3939

4040
bridge = await client.bridges.create(type='mixing')
4141
media_id = client.generate_id()
42-
await client.channels.externalMedia(channelId=media_id, app=client._app, external_host='localhost:' + str(self.port), format='slin16')
42+
await client.channels.externalMedia(channelId=media_id, app=client._app, external_host='127.0.0.1:' + str(self.port), format='slin16')
4343
await bridge.addChannel(channel=[media_id, channel.id])
4444

4545
async def statis_handler(objs, ev, client):

0 commit comments

Comments
 (0)