[asterisk-app-dev] AGI stream audio from URI

Naftoli Gugenheim naftoligug at gmail.com
Fri Jul 20 15:09:40 CDT 2018


In one terminal tab:

$ sudo nc -kl 80

In another (note: asterisk is running in docker with --net=host):

$ docker-compose exec asterisk cat /etc/hosts
127.0.0.1    localhost
127.0.0.1    example.com
127.0.1.1    naftoli-ThinkPad-W540

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

$ docker-compose exec asterisk curl http://example.com/dummyfile.wav
^CāŽ

The HTTP request headers show up in nc.

However,

$ docker-compose exec asterisk asterisk -rvvvvvddddddT
Seeding global EID '5c:51:4f:a5:bf:59' from 'wlp3s0' using 'siocgifhwaddr'
Parsing /etc/asterisk/asterisk.conf
Asterisk 15.5.0, Copyright (C) 1999 - 2016, Digium, Inc. and others.
Created by Mark Spencer <<a href="mailto:markster at digium.com"
target="_blank">markster at digium.com</a>>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty'
for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 15.5.0 currently running on
naftoli-ThinkPad-W540 (pid = 8)
Core debug is still 6.
[Jul 20 20:00:16] == Setting global variable 'SIPDOMAIN' to 'localhost'
[Jul 20 20:00:16] -- Executing [1400 at inbound:1]
Set("PJSIP/local-0000004e", "JITTERBUFFER(adaptive)=default") in new
stack
[Jul 20 20:00:16] -- Executing [1400 at inbound:2]
AGI("PJSIP/local-0000004e", "agi://127.0.0.1/route") in new stack
[Jul 20 20:00:16] > 0x7f9e8000cb00 -- Strict RTP learning after remote
address set to: 173.124.23.24:7078
[Jul 20 20:00:16] > 0x7f9e8000cb00 -- Strict RTP qualifying stream type: audio
[Jul 20 20:00:16] > 0x7f9e8000cb00 -- Strict RTP switching source
address to 127.0.0.1:7078
[Jul 20 20:00:16] -- AGI Script Executing Application: (MixMonitor)
Options: (/sounds/monitor-2018-07-20T20:00:16.992040Z.wav)
[Jul 20 20:00:16] == Begin MixMonitor Recording
PJSIP/local-0000004e*[Jul 20 20:00:16] WARNING[6384][C-00000050]:
file.c:772 ast_openstream_full: File http://example.com/dummyfile.wav
<http://example.com/dummyfile.wav> does not exist in any format
*[Jul 20 20:00:17] -- <PJSIP/local-0000004e> Playing
'/sounds/prompts/welcome-to.slin' (escape_digits=) (sample_offset 0)
(language 'en')
[Jul 20 20:00:17] WARNING[6384][C-00000050]: chan_iax2.c:1228
jb_warning_output: Resyncing the jb. last_delay 0, this delay
-359631367, threshold 1000, new offset 359631367
[Jul 20 20:00:18] -- <PJSIP/local-0000004e> Playing
'/sounds/prompts/some-org.slin' (escape_digits=) (sample_offset 0)
(language 'en')
[Jul 20 20:00:19] -- <PJSIP/local-0000004e> Playing
'/sounds/prompts/press-2-now-to-use-a-phone-number-other-than-the-one-you-are-calling-from-.slin'
(escape_digits=0123456789#*) (sample_offset 0) (language 'en')
[Jul 20 20:00:20] WARNING[6370]: res_pjsip_registrar.c:957
find_registrar_aor: AOR '<REDACTED>' not found for endpoint 'local'
[Jul 20 20:00:21] > 0x7f9e8000cb00 -- Strict RTP learning complete -
Locking on source address 127.0.0.1:7078
[Jul 20 20:00:21] -- <PJSIP/local-0000004e>AGI Script
agi://127.0.0.1/route completed, returning -1
[Jul 20 20:00:21] == MixMonitor close filestream (mixed)
[Jul 20 20:00:21] == End MixMonitor Recording PJSIP/local-0000004e

Nothing shows up in nc.

P.S. I have no idea why it thinks the other prompts are .slin when in
reality they are .wav

Thanks.
ā€‹
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20180720/a603318d/attachment.html>


More information about the asterisk-app-dev mailing list