xishuiye / asterisk-voicemail-for-iphone

Automatically exported from code.google.com/p/asterisk-voicemail-for-iphone
0 stars 0 forks source link

Cannot play voicemail #15

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Click on "Play Message"

What is the expected output? 
The message should be played. 

What do you see instead?
404 Not Found page

What version of the product are you using? On what operating system?
v0.11 with Cartlon's patch (http://carltonpatch.notlong.com)

Please provide any additional information below.
Grant reported a previous issue whereby he can only get a sound to play if
he moves the message into the saved folder
(http://grantproblem.notlong.com). My issue is that I can't get the message
to play at all regardless of their folder. 

The issue seems to be in the way URL gets compiled when you play the
voicemail file. The URL looks like this:

http://my.asterisk-server.com/iphone/listen/bb507f2f5709145fa20027197f8a36da/100
/INBOX/msg0001.mp3

Does that seem right? What is that long sequence of digits? 

In any case, it cannot find the mp3 file to play. Any ideas? 

Original issue reported on code.google.com by mar...@aol.com on 13 Sep 2008 at 10:35

GoogleCodeExporter commented 8 years ago
This is caused by one of three things...

- lame is not installed or in the path
- You didnt configure the Alias in Apache correctly
- Permission issue. Does the Apache user have rights to write in that folder 
and read
and change files in it?

Original comment by chris.ca...@gmail.com on 23 Sep 2008 at 3:38

GoogleCodeExporter commented 8 years ago

Original comment by chris.ca...@gmail.com on 23 Sep 2008 at 3:39

GoogleCodeExporter commented 8 years ago
Thanks for the feedback Chris. I think it might have been Lame. But as I was 
playing
around with it, I noticed you released v .13. I am now using that.

However, I still have the same problem (mp3 file isn't playing) but with 
different
symptoms (blank screen after pressing play). I have enabled the debug function 
and I
am getting:

listen.php - FAILED SECURITY TEST!

I can't wrap my head around what is going on in listen.php to figure out why I 
am
failing the security test. Any input appreciated. 

Original comment by mar...@aol.com on 24 Sep 2008 at 5:07

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Having experienced a similar issue, I added some more debugging tokens and 
found that the wrong part of 
the URI was being used to obtain the "secret" md5 hash - specifically, the code 
uses REQUEST_URI, and splits 
it on the "/" character. REQUEST_URI includes the full request, including any 
path if the code is not installed in 
the webroot.

Changing line 53 of listen.php from this:

list($garbage1, $garbage2, $garbage3, $p_secret, $p_mailbox, $p_folder, 
$p_file) = split("/", 
$_SERVER['REQUEST_URI']);

to this:

list($garbage2, $p_secret, $p_mailbox, $p_folder, $p_file) = split("/   ", 
$_SERVER['QUERY_STRING']);

uses just the query string to obtain the md5 hash from the request, and makes 
the code relocatable within 
the webserver. This solved the problem for me.

If this solves the problem for you, then hopefully Chris can consider 
committing the change to resolve if your 
issue. But even if not, I'd urge you to consider the change, Chris - the code 
appears to be processing 
parameters passed by the GET request, and so the more appropriate server 
variable is QUERY_STRING, rather 
than REQUEST_URI.

Original comment by andy.b...@gmail.com on 18 Oct 2008 at 6:55

GoogleCodeExporter commented 8 years ago
hey andy, 

i tried using your code in listen.php, but still got listen.php - FAILED 
SECURITY
TEST! in the error log. 

boo.

Original comment by mar...@aol.com on 31 Oct 2008 at 2:24

GoogleCodeExporter commented 8 years ago

In andy's fix I think there are some extra spaces
split("/   ", $_SERVER['QUERY_STRING']);
should be
split("/", $_SERVER['QUERY_STRING']);
I think ( well it worked for me )

Original comment by dtaylo...@gmail.com on 10 Nov 2008 at 7:32

GoogleCodeExporter commented 8 years ago
yup, that did it! now it works for me too. wonderful. thanks guys.  

Original comment by mar...@aol.com on 11 Nov 2008 at 4:21

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
hi guys

i'm running .13 on centos 5.3, apache 2 and i'm getting the same error.

2009-08-02 15:37:01 - listen.php - FAILED SECURITY TEST!

Original comment by kavadasd...@gmail.com on 3 Aug 2009 at 10:36

GoogleCodeExporter commented 8 years ago
Hi I think all that is missing is $garbage3 I did the change below and it all 
works.

//list($garbage1, $garbage2, $p_secret, $p_mailbox, $p_folder, $p_file) = 
split("/",
$_SERVER['REQUEST_URI']);

list($garbage1, $garbage2, $garbage3, $p_secret, $p_mailbox, $p_folder, 
$p_file) =
split("/", $_SERVER['REQUEST_URI']);

note the first commented out one does not have $garbage3 in it.

Original comment by k.kleins...@gmail.com on 27 Jan 2010 at 3:40