Skip to content

Commit

Permalink
Merge pull request #546 from jstahlbaum-fibernetics/t_jstahlbaum_dev
Browse files Browse the repository at this point in the history
WIP
  • Loading branch information
dwilkie authored Mar 29, 2024
2 parents 9ddbd6f + 30661a3 commit e42629b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Binary file added components/testing/scenarios/files/tone.wav
Binary file not shown.
4 changes: 2 additions & 2 deletions components/testing/scenarios/uac_connect.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@
<!-- Play a pre-recorded PCAP file (RTP stream) -->
<nop>
<action>
<exec rtp_stream="/testing/scenarios/files/fridge.wav" />
<exec rtp_stream="/testing/scenarios/files/tone.wav" />
</action>
</nop>

<!-- Wait for caller audio to be recevied by callee -->
<pause milliseconds="3000"/>
<pause milliseconds="4000"/>

<!-- Play an out of band DTMF '1' -->
<nop>
Expand Down
12 changes: 6 additions & 6 deletions components/testing/tests/public_gateway/connect_stream_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ tshark -n -r $artifacts_dir/uac_connect.pcap -2 -R rtp -T fields -e rtp.payload
# Convert RTP to wav
sox -t al -r 8000 -c 1 $artifacts_dir/uac_connect.rtp $artifacts_dir/uac_connect_full_audio.wav
# Cut the audio from the ws server
ffmpeg -y -i $artifacts_dir/uac_connect_full_audio.wav -ss 6.3 -to 9 $artifacts_dir/uac_connect_ws_server_audio.wav 2> /dev/null
ffmpeg -y -i $artifacts_dir/uac_connect_full_audio.wav -ss 7.6 -to 10 $artifacts_dir/uac_connect_ws_server_audio.wav 2> /dev/null
# Remove silence
ffmpeg -y -i $artifacts_dir/uac_connect_ws_server_audio.wav -af silenceremove=1:0:-40dB,areverse,silenceremove=1:0:-50dB,areverse $artifacts_dir/uac_connect_trimmed_ws_server_audio.wav 2> /dev/null
ffmpeg -y -i $artifacts_dir/uac_connect_ws_server_audio.wav -af silenceremove=1:0:-30dB,areverse,silenceremove=1:0:-30dB,areverse $artifacts_dir/uac_connect_trimmed_ws_server_audio.wav 2> /dev/null
# Cut the play verb audio
ffmpeg -y -i $artifacts_dir/uac_connect_full_audio.wav -ss 9 $artifacts_dir/uac_connect_play_verb_audio.wav 2> /dev/null
ffmpeg -y -i $artifacts_dir/uac_connect_full_audio.wav -ss 11.7 -to 14.1 $artifacts_dir/uac_connect_play_verb_audio.wav 2> /dev/null
# Remove silence
ffmpeg -y -i $artifacts_dir/uac_connect_play_verb_audio.wav -af silenceremove=1:0:-40dB,areverse,silenceremove=1:0:-50dB,areverse $artifacts_dir/uac_connect_trimmed_play_verb_audio.wav 2> /dev/null
ffmpeg -y -i $artifacts_dir/uac_connect_play_verb_audio.wav -af silenceremove=1:0:-30dB,areverse,silenceremove=1:0:-30dB,areverse $artifacts_dir/uac_connect_trimmed_play_verb_audio.wav 2> /dev/null

ws_server_audio_md5=$(md5sum $artifacts_dir/uac_connect_trimmed_ws_server_audio.wav | head -c 32)
expected_ws_server_audio_md5="328489d203813f6e216a1d77c41b3ad9"
expected_ws_server_audio_md5="bf211933efe730d7cff4b2105f6dfb4a"

play_verb_audio_md5=$(md5sum $artifacts_dir/uac_connect_trimmed_play_verb_audio.wav | head -c 32)
expected_play_verb_audio_md5="bc95f79be89a5c2aee2965575af2e33d"
expected_play_verb_audio_md5="bf211933efe730d7cff4b2105f6dfb4a"

echo "Actual ws_server_audio_md5: $ws_server_audio_md5"
echo "Expected ws_server_audio_md5: $expected_ws_server_audio_md5"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ services:
AHN_CORE_HOST: freeswitch
CALL_PLATFORM_STUB_RESPONSES: "true"
CONNECT_WS_SERVER_URL: "ws://testing:3001"
AUDIO_FILE_URL: "http://testing:8000/scenarios/files/fridge.wav"
AUDIO_FILE_URL: "http://testing:8000/scenarios/files/tone.wav"
AHN_CORE_HTTP_PORT: "8080"
AWS_DEFAULT_REGION: "ap-southeast-1"
REDIS_URL: "redis://redis:6379/1"
Expand Down

0 comments on commit e42629b

Please sign in to comment.