fmateo05 Posted May 24, 2018 Report Posted May 24, 2018 I have correctly set up PIN Set for outbound calling (the users must enter a kind of password through DTMF) before the carrier outbound call become placed and established. It can be useful for avoid unwanted users make calls without authorization. Based on some kazoo docs examples and also pivot call flow app, and some php scripts; When dialing 10 or 11 digits Number. Kazoo asks for 5 digits password, then the script compares the entered digits with the saved ones (in hash format); if it is correct; the call is continued and routed to carrier. More Pin numbers can be created and hashed. I hope it helps you. index.php pinset.php generate_hash.php Quote
Andres Gomez Posted June 12, 2018 Report Posted June 12, 2018 Hi fmateo05, We were able to implement your solution, up to a point. We're getting the behavior we expected but we've had to store the media files on a different server that the server running Kazoo. Can you give us any suggestions, URL pattern, etc. that would allow us to serve the audio files from the same server where Kazoo is running/? We uploaded the files to Kazoo, but we're having no luck locating them and getting them to play. I don't think we know the exact path to the uploaded audio files in Kazoo. None of our tests with various paths have had positive outcomes. The paths we tested were of the form: http://kazoo-server.com/v2/account/{ACCOUNT_ID}/media/{MEDIA_ID} and http://kazoo-server.com/v2/account/{ACCOUNT_ID}/media/audio_file_name.mp3 and http://kazoo-server.com/media/audio_file_name.mp3 etc. I suspect that we're using the wrong path to the media files at Kazoo. In your pinset.php file, I see this: {"module":"play" ,"data":{"id":"http://10.10.1.1:8888/wnn/disa-invalid_pin.wav"} } We were able to make this process work by replacing "http://10.10.1.1:8888/wnn/disa-invalid_pin.wav" with a path to our audio file on an external server. That server is pretty busy, so we'd rather not use it for serving audio files in potentially large numbers. We'd like to know if there's a general path on the Kazoo server, something like: http://kazoo-server.com/path/to/invalid_pin.wav. Also, we need to know whether it should be a secure path such as http://kazoo-server:8443/etc. We suspect not, but thought it was worth asking. Thanks in advance! Quote
fmateo05 Posted June 13, 2018 Author Report Posted June 13, 2018 (edited) Web root must be like "/var/www/html/" and then put the wnn directory containing every php and sound files If you use apache httpd as main web service, edit and change http//10.10.1.1:8888/wnn with http://kazoo-server.com/wnn in the php script files. I have used different port because of running another httpd webserver instance listening to it (security reasons). Then in the Pivot call flow app you may set the voice URL like: http://kazoo-server.com/wnn/index.php Edited June 13, 2018 by fmateo05 add some exact words for correction (see edit history) Quote
fmateo05 Posted June 13, 2018 Author Report Posted June 13, 2018 Also you can create virtualhost with listen different IP address and port (127.0.0.1:8080) or another interface that does not listen to WAN Quote
Andres Gomez Posted June 13, 2018 Report Posted June 13, 2018 Thanks, fmateo05 Unfortunately, I don't have SSH access to the server. I can only communicate with Kazoo via the APIs. So I have a fix in place, I was just looking for a better way to manage the media files. Quote
Administrators mc_ Posted June 13, 2018 Administrators Report Posted June 13, 2018 If you upload media to Kazoo via the API, you can reference it in the "play" callflow with "/{ACCOUNT-ID}/{MEDIA-ID}" I believe Quote
Andres Gomez Posted June 13, 2018 Report Posted June 13, 2018 I created the media, via the API and verifiied it via the ui. But I didn't have any suceess getting to play, below are the paths I trie. Has anyone been able to get it to play before? http://kazoo-server.com/v2/account/{ACCOUNT_ID}/media/{MEDIA_ID} http://kazoo-server.com/v2/account/{ACCOUNT_ID}/{MEDIA_ID} http://kazoo-server.com/v2/account/{ACCOUNT_ID}/media/{MEDIA_ID} /raw https://kazoo-server.com:8443/v2/account/{ACCOUNT_ID}/media/{MEDIA_ID} https://kazoo-server.com:8443/v2/account/{ACCOUNT_ID}/{MEDIA_ID} https://kazoo-server.com:8443/v2/account/{ACCOUNT_ID}/media/{MEDIA_ID} /raw Quote
Administrators mc_ Posted June 13, 2018 Administrators Report Posted June 13, 2018 Did you try the play callflow like this? {"module":"play" ,"data":{"id":"/{ACCOUNT_ID}/{MEDIA_ID}"} ,"children":{...} } Quote
Andres Gomez Posted June 13, 2018 Report Posted June 13, 2018 That worked. Thank you so much, I swear I tried it before and it didn't work. Quote
Andres Gomez Posted June 13, 2018 Report Posted June 13, 2018 Thanks, mc_! That works. Tried it like that the first time you suggested it and something went wrong. Perhaps a typo. Anyway, it works just fine now. Quote
Administrators mc_ Posted June 13, 2018 Administrators Report Posted June 13, 2018 Sweet, glad it is working! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.