Audio not Syncing to asterisk after adding SSL and public ip

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Audio not Syncing to asterisk after adding SSL and public ip

Postby dinstar » Thu Mar 10, 2022 3:19 am

Hi Everyone, I am facing one issue when I upload a audio file to audio store, it doesn't sync to asterisk sounds folder. For now I have copying that audio file to asterisk folder. It's temporary work around, but I want to make it as older one which is more reliable and easy.


Following settings have been changed, since last working sync:
1. SSL certificate have been added to the server
2. Server has been assigned a static ip
3. 0-65535 Ports open of TCP & UDP in yastFirewall.



Earlier I have tried uploading in LAN too but in vain.

Thanks
ViciBox v.10.0.0 210901 iso installation
Asterisk 13.38.2-vici
OpenSuse Lead 15.2
Dinstar GSM Gateway 16 Ports
dinstar
 
Posts: 49
Joined: Wed Nov 10, 2021 3:18 pm

Re: Audio not Syncing to asterisk after adding SSL and publi

Postby carpenox » Sat Mar 12, 2022 11:37 am

I too have seen this on a few installs, I havent been able to debug the reason behind it yet.

Any idea Matt?

Chris
Alma Linux 9.4 | SVN Version: 3890 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2428
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Audio not Syncing to asterisk after adding SSL and publi

Postby mflorell » Sat Mar 12, 2022 4:07 pm

If you disable standard "http://" access to your system so that only "https://" will work, then the "Sounds Web Server" setting in "Admin -> System Settings" needs to be changed to include "https://" at the beginning of the field.

You can test that it works from the dialer by using the "ADMIN_audio_store_sync.pl" script.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Audio not Syncing to asterisk after adding SSL and publi

Postby carpenox » Mon Mar 14, 2022 4:17 am

good shit thx
Alma Linux 9.4 | SVN Version: 3890 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2428
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Audio not Syncing to asterisk after adding SSL and publi

Postby dinstar » Mon Mar 21, 2022 11:40 pm

mflorell wrote:If you disable standard "http://" access to your system so that only "https://" will work, then the "Sounds Web Server" setting in "Admin -> System Settings" needs to be changed to include "https://" at the beginning of the field.

You can test that it works from the dialer by using the "ADMIN_audio_store_sync.pl" script.



Hi Matt! I did as you told, I can access that webpage. Can upload the audio too. But here's the output that audio store sync script:

Also, I have enabled HTTPS, hence I can only access my server using HTTPS.

I am unable to upload audio too, as error says, bad wav format. I even tried, downloading audio, then renaming it and uploading, but it brings up same error.

Code: Select all
vicibox10:~ # /usr/share/astguiclient/ADMIN_audio_store_sync.pl --debugX

----- DEBUG -----


----- SUPER DEBUG -----


https://PUBLIC.IP/vicidial/audio_store.php?action=LIST\&audio_server_ip=192.168.1.254
REMOTE AUDIO FILES:
AUDIO FILES ON SERVER:  0
NEW DOWNLOADED:         0
NEW UPLOADED:           0

DONE. Script execution time in seconds: 0
ViciBox v.10.0.0 210901 iso installation
Asterisk 13.38.2-vici
OpenSuse Lead 15.2
Dinstar GSM Gateway 16 Ports
dinstar
 
Posts: 49
Joined: Wed Nov 10, 2021 3:18 pm

Re: Audio not Syncing to asterisk after adding SSL and publi

Postby striker » Tue Mar 22, 2022 1:20 pm

try this
cd /usr/share/astguiclient/
sed -i 's/wgetbin -q/wgetbin --no-check-certificate -q/g' ADMIN_audio_store_sync.pl

and run
/usr/share/astguiclient/ADMIN_audio_store_sync.pl --debugX
www.striker24x7.com www.youtube.com/c/striker24x7 Telegram/skype id : striker24x7
striker
 
Posts: 962
Joined: Sun Jun 06, 2010 10:25 am

Re: Audio not Syncing to asterisk after adding SSL and publi

Postby mflorell » Tue Mar 22, 2022 1:37 pm

admin.php version and build?

I just tested this on one of our production testing systems and could not replicate any issues.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Audio not Syncing to asterisk after adding SSL and publi

Postby dinstar » Wed Mar 23, 2022 10:42 pm

Hi, Matt

VERSION: 2.14-838a
BUILD: 211217-0732

This one?
I am confused where to find your given details.

pls guide.



EDIT: Striker's commands did solve the issue. I can now sync audio. But one thing is still bothering me. I cannot upload audio via audio store, as it says INVALID WAV FILE FORMAT: (IDFCNEW.wav)

Even If i download audio from audio store, then rename and re-upload it

This is the OUTPUT

Code: Select all
SUCCESS: AabharforGTPL.wav uploaded size:

INVALID WAV FILE FORMAT: (AabharforGTPL.wav)


For GSM it only shows as first line, but it doesn't get uploaded

Also, when deleting, none of the audio gets deleted.

My storage:
Code: Select all
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        4.2M     0  4.2M   0% /dev
tmpfs           4.2G     0  4.2G   0% /dev/shm
tmpfs           1.7G   18M  1.7G   2% /run
tmpfs           4.2M     0  4.2M   0% /sys/fs/cgroup
/dev/sda4       489G   17G  448G   4% /
tmpfs           6.5G     0  6.5G   0% /var/spool/asterisk/monitor
/dev/sda2        21M  1.3M   20M   6% /boot/efi
tmpfs           824M     0  824M   0% /run/user/0


Code: Select all
total 32
drwxr-x---  5 asterisk asterisk  4096 Mar 24 10:05 .
drwxr-xr-x 37 root     root      4096 Feb 26 20:02 ..
drwxr-xr-x  2 root     root      4096 Dec 20 21:02 agi-bin
-rw-r--r--  1 root     root     12288 Mar 24 10:05 astdb.sqlite3
drwxr-xr-x  2 root     root      4096 Dec 20 21:02 default
lrwxrwxrwx  1 root     root        28 Dec 20 21:02 firmware -> /usr/share/asterisk/firmware
lrwxrwxrwx  1 root     root        26 Dec 20 21:02 images -> /usr/share/asterisk/images
lrwxrwxrwx  1 root     root        23 Dec 20 21:02 moh -> /usr/share/asterisk/moh
lrwxrwxrwx  1 root     root        24 Dec 20 21:02 mohmp3 -> /usr/share/asterisk/moh/
drwxr-x---  2 asterisk asterisk  4096 Dec 20 20:53 phoneprov
lrwxrwxrwx  1 root     root        29 Dec 20 21:02 quiet-mp3 -> /usr/share/asterisk/quiet-mp3
lrwxrwxrwx  1 root     root        26 Mar 10 13:12 sounds -> /usr/share/asterisk/sounds
lrwxrwxrwx  1 root     root        32 Dec 20 21:02 static-http -> /usr/share/asterisk/static-http/


Code: Select all
vicibox10:/srv/www/htdocs # ls -la
total 140
drwxrwxrwx 8 root root  4096 Feb 27 00:43 .
drwxr-xr-x 6 root root  4096 Sep  1  2021 ..
drwxrwxrwx 7 root root  4096 Mar 21 13:25 agc
drwxrwxrwx 5 root root  4096 Dec 20 21:02 chat_customer
-rw-r--r-- 1 root root   318 Jun 28  2021 favicon.ico
-rw-r--r-- 1 root root   100 Dec 20 21:02 index.html
drwxr-xr-x 9 root root  4096 Sep  1  2021 phpMyAdmin
-rw-r--r-- 1 root root    26 Dec 20 21:02 robots.txt
drwxrwxrwx 8 root root 12288 Mar 24 10:34 vicidial
drwxr-xr-x 3 root root  4096 Feb 27 00:57 .well-known
drwxrwxr-x 2 root root 90112 Mar 10 13:10 yu1hOnAB71Q8JJ1GrVVD4ziCmJ6me5oH



Thanks
ViciBox v.10.0.0 210901 iso installation
Asterisk 13.38.2-vici
OpenSuse Lead 15.2
Dinstar GSM Gateway 16 Ports
dinstar
 
Posts: 49
Joined: Wed Nov 10, 2021 3:18 pm

Re: Audio not Syncing to asterisk after adding SSL and publi

Postby dinstar » Thu Mar 24, 2022 4:47 am

Update:

I chmod 777 to sounds directory, then I can upload the audios. It does shows up in audio file.

But, I am unable to sync the audio files again. It just counts till 99 audio files and stops.

Then, I changed sounds web server IP to local one, and then I synced and it was successful.

don't know why it didn't sync in public ip, also, output of syncing script did show audio server ip as 192.168.1.254.

i.e. http://PUB.LIC..IP/vicidial/audio_store.php?action=LIST\&audio_server_ip=192.168.1.254

Maybe that is culprit and preventing that syncing.

Thank you all!!
ViciBox v.10.0.0 210901 iso installation
Asterisk 13.38.2-vici
OpenSuse Lead 15.2
Dinstar GSM Gateway 16 Ports
dinstar
 
Posts: 49
Joined: Wed Nov 10, 2021 3:18 pm

Re: Audio not Syncing to asterisk after adding SSL and publi

Postby williamconley » Sun Jun 05, 2022 12:13 pm

dinstar wrote:Update:
But, I am unable to sync the audio files again. It just counts till 99 audio files and stops.

Then, I changed sounds web server IP to local one, and then I synced and it was successful.

don't know why it didn't sync in public ip, also, output of syncing script did show audio server ip as 192.168.1.254.


If the domain is treated differently than the IP when accessing the system: Possibly your Apache vhosts. Try:

Code: Select all
apachectl -S


dinstar wrote:But one thing is still bothering me. I cannot upload audio via audio store, as it says INVALID WAV FILE FORMAT: (IDFCNEW.wav)


WAV vs wav?
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Audio not Syncing to asterisk after adding SSL and publi

Postby middletn » Thu Nov 10, 2022 5:02 am

The issue is if you've got your server behind a firewall and it's Natted, you need to have the public IP set to the external IP for the end users to upload sounds. If you don't have Nat reflection on, the script that copies the sound files will not be able to access the directory (Sounds Web Directory). It really needs to use the internal address and not the public one in this case.
middletn
 
Posts: 34
Joined: Fri Apr 18, 2008 3:27 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 99 guests