mod_httapi problem when trying to play an audio hosted in S3 amazon cloud
Hi. I'm having problem when trying to play an audio hosted in S3 Amazon cloud The MP3 URL is: / / /h//ttp://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_willie.mp3?Expires=1349381157&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signature=bnJgjbnxqlgsdYIcKIbYUa9gqao%3D/ The result is: 2012-10-04 20:27:28.891298 [DEBUG] switch_ivr.c:605 sofia/external/+15752222222@67.231.8.195 Command Execute playback(http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil...) EXECUTE sofia/external/+15752222222@67.231.8.195 playback(http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil...) 2012-10-04 20:27:28.903180 [ERR] mod_httapi.c:2545 File at url [http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil...] is unreachable! If I use the Browser with same URL, I'm able to listen to the sample audio. Any idea about what is wrong? Thanks in advance, Leonardo
I get an AccessDenies error when I visit that link. -Chad From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Leonardo N. S. Pereira Sent: Thursday, October 04, 2012 4:34 PM To: FreeSWITCH Users Help Subject: [Freeswitch-users] mod_httapi problem when trying to play an audio hosted in S3 amazon cloud Hi. I'm having problem when trying to play an audio hosted in S3 Amazon cloud The MP3 URL is: http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind _willie.mp3?Expires=1349381157&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signa ture=bnJgjbnxqlgsdYIcKIbYUa9gqao%3D The result is: 2012-10-04 20:27:28.891298 [DEBUG] switch_ivr.c:605 sofia/external/+15752222222@67.231.8.195 Command Execute playback( http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind _willie.mp3?Expires=1349383281&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signa ture=bLsres02Vy%2FH9zdwfFDeYyaRNxE%3D) EXECUTE sofia/external/+15752222222@67.231.8.195 playback( http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind _willie.mp3?Expires=1349383281&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signa ture=bLsres02Vy%2FH9zdwfFDeYyaRNxE%3D) 2012-10-04 20:27:28.903180 [ERR] mod_httapi.c:2545 File at url [ http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind _willie.mp3?Expires=1349383281&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signa ture=bLsres02Vy%2FH9zdwfFDeYyaRNxE%3D] is unreachable! If I use the Browser with same URL, I'm able to listen to the sample audio. Any idea about what is wrong? Thanks in advance, Leonardo
try *h**ttp://(ext=mp3) test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_willie.mp3?Expires=1349381157&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signature=bnJgjbnxqlgsdYIcKIbYUa9gqao%3D * * * * * *if that doesn't work try faking a user agent string * * * *h**ttp://(ext=mp3,ua='**Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1284.0 Safari/537.13')** test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_willie.mp3?Expires=1349381157&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signature=bnJgjbnxqlgsdYIcKIbYUa9gqao%3D * * * On Thu, Oct 4, 2012 at 3:42 PM, Chad Engler <Chad.Engler@patlive.com> wrote:
I get an AccessDenies error when I visit that link.****
** **
****
-Chad****
** **
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Leonardo N. S. Pereira *Sent:* Thursday, October 04, 2012 4:34 PM *To:* FreeSWITCH Users Help *Subject:* [Freeswitch-users] mod_httapi problem when trying to play an audio hosted in S3 amazon cloud****
** **
Hi. I'm having problem when trying to play an audio hosted in S3 Amazon cloud The MP3 URL is:****
* http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil... *****
The result is:****
2012-10-04 20:27:28.891298 [DEBUG] switch_ivr.c:605 sofia/external/+15752222222@67.231.8.195 Command Execute playback( http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil... ) EXECUTE sofia/external/+15752222222@67.231.8.195 playback( http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil... ) 2012-10-04 20:27:28.903180 [ERR] mod_httapi.c:2545 File at url [ http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil...] is unreachable!****
If I use the Browser with same URL, I'm able to listen to the sample audio.
Any idea about what is wrong?
Thanks in advance, Leonardo****
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
On Thu, Oct 4, 2012 at 2:34 PM, Leonardo N. S. Pereira <leonardo@daitangroup.com> wrote:
If I use the Browser with same URL, I'm able to listen to the sample audio.
Any idea about what is wrong?
Currently: <Code>AccessDenied</Code> <Message>Request has expired</Message> <RequestId>1F74F623F7800939</RequestId> <Expires>2012-10-04T20:41:21Z</Expires> New link for us? Gabe
I had no lucky trying to set the "ext" and/or "ua" :-( This is one of the command I tried via socket interface: api uuid_broadcast e75e6d4e-732f-4385-962a-0e4b9038d940 http://(ext=mp3,ua='AppleWebKit/537.13')catapult-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_willie.mp3?Expires=1349446514&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signature=3qc1pHwXqB71b0E4YOVJW62tvS8%3D both This is the log: 2012-10-05 14:03:43.953669 [DEBUG] switch_event.c:1477 Parsing variable [ext]=[mp3] 2012-10-05 14:03:43.953669 [DEBUG] switch_event.c:1477 Parsing variable [ua]=[AppleWebKit/537.13] 2012-10-05 14:03:43.953669 [ERR] mod_httapi.c:2545 File at url [http://catapult-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind...] is unreachable! The URL should be reachable now, in case you want to give it a try. Thanks in advance again, Leonardo On 10/04/2012 05:34 PM, Leonardo N. S. Pereira wrote:
Hi. I'm having problem when trying to play an audio hosted in S3 Amazon cloud The MP3 URL is: / /
/h//ttp://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_willie.mp3?Expires=1349381157&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signature=bnJgjbnxqlgsdYIcKIbYUa9gqao%3D/
The result is:
2012-10-04 20:27:28.891298 [DEBUG] switch_ivr.c:605 sofia/external/+15752222222@67.231.8.195 Command Execute playback(http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil...) EXECUTE sofia/external/+15752222222@67.231.8.195 playback(http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil...) 2012-10-04 20:27:28.903180 [ERR] mod_httapi.c:2545 File at url [http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil...] is unreachable!
If I use the Browser with same URL, I'm able to listen to the sample audio.
Any idea about what is wrong?
Thanks in advance, Leonardo
Access Denied still. -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH_Wire T: +1.918.420.9266 | F: +1.918.420.9267 | M: +1.918.424.WEST iNUM: +883 5100 1420 9266 UK: +44 20 3298 4900 ISN: 410*543 On Oct 5, 2012, at 9:06 AM, "Leonardo N. S. Pereira" <leonardo@daitangroup.com> wrote:
The URL should be reachable now, in case you want to give it a try. Thanks in advance again, Leonardo
Basically you need to figure out how to get past whichever trick they have to not allow you to use something other than a browser. On Fri, Oct 5, 2012 at 9:25 AM, Brian West <brian@freeswitch.org> wrote:
Access Denied still. -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH_Wire T: +1.918.420.9266 | F: +1.918.420.9267 | M: +1.918.424.WEST iNUM: +883 5100 1420 9266 UK: +44 20 3298 4900 ISN: 410*543
On Oct 5, 2012, at 9:06 AM, "Leonardo N. S. Pereira" < leonardo@daitangroup.com> wrote:
The URL should be reachable now, in case you want to give it a try. Thanks in advance again, Leonardo
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
Well, I think I found the problem, but I still don't know how to fix it. The problem is that the HTTP request to Amazon is going with the method HEAD instead of GET. Is there a way to force mod_httapi to use GET? On 10/05/2012 11:06 AM, Leonardo N. S. Pereira wrote:
I had no lucky trying to set the "ext" and/or "ua" :-( This is one of the command I tried via socket interface:
api uuid_broadcast e75e6d4e-732f-4385-962a-0e4b9038d940 http://(ext=mp3,ua='AppleWebKit/537.13')catapult-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_willie.mp3?Expires=1349446514&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signature=3qc1pHwXqB71b0E4YOVJW62tvS8%3D both
This is the log:
2012-10-05 14:03:43.953669 [DEBUG] switch_event.c:1477 Parsing variable [ext]=[mp3] 2012-10-05 14:03:43.953669 [DEBUG] switch_event.c:1477 Parsing variable [ua]=[AppleWebKit/537.13] 2012-10-05 14:03:43.953669 [ERR] mod_httapi.c:2545 File at url [http://catapult-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind...] is unreachable!
The URL should be reachable now, in case you want to give it a try. Thanks in advance again, Leonardo
On 10/04/2012 05:34 PM, Leonardo N. S. Pereira wrote:
Hi. I'm having problem when trying to play an audio hosted in S3 Amazon cloud The MP3 URL is: / /
/h//ttp://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_willie.mp3?Expires=1349381157&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signature=bnJgjbnxqlgsdYIcKIbYUa9gqao%3D/
The result is:
2012-10-04 20:27:28.891298 [DEBUG] switch_ivr.c:605 sofia/external/+15752222222@67.231.8.195 Command Execute playback(http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil...) EXECUTE sofia/external/+15752222222@67.231.8.195 playback(http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil...) 2012-10-04 20:27:28.903180 [ERR] mod_httapi.c:2545 File at url [http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil...] is unreachable!
If I use the Browser with same URL, I'm able to listen to the sample audio.
Any idea about what is wrong?
Thanks in advance, Leonardo
Not on the version you have but if you update to latest GIT HEAD you could try a patch that adds a nohead=true param you can set in the same place you set ua and ext that should skip over the head check. Really its a bug for amazon that they don't let you do cache-control properly. On Fri, Oct 5, 2012 at 11:35 AM, Leonardo N. S. Pereira < leonardo@daitangroup.com> wrote:
Well, I think I found the problem, but I still don't know how to fix it. The problem is that the HTTP request to Amazon is going with the method HEAD instead of GET. Is there a way to force mod_httapi to use GET?
On 10/05/2012 11:06 AM, Leonardo N. S. Pereira wrote:
I had no lucky trying to set the "ext" and/or "ua" :-( This is one of the command I tried via socket interface:
api uuid_broadcast e75e6d4e-732f-4385-962a-0e4b9038d940 http://(ext=mp3,ua='AppleWebKit/537.13')catapult-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_willie.mp3?Expires=1349446514&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signature=3qc1pHwXqB71b0E4YOVJW62tvS8%3D<http://%28ext=mp3,ua=%27AppleWebKit/537.13%27%29catapult-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_willie.mp3?Expires=1349446514&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signature=3qc1pHwXqB71b0E4YOVJW62tvS8%3D>both
This is the log:
2012-10-05 14:03:43.953669 [DEBUG] switch_event.c:1477 Parsing variable [ext]=[mp3] 2012-10-05 14:03:43.953669 [DEBUG] switch_event.c:1477 Parsing variable [ua]=[AppleWebKit/537.13] 2012-10-05 14:03:43.953669 [ERR] mod_httapi.c:2545 File at url [ http://catapult-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind...] is unreachable!
The URL should be reachable now, in case you want to give it a try. Thanks in advance again, Leonardo
On 10/04/2012 05:34 PM, Leonardo N. S. Pereira wrote:
Hi. I'm having problem when trying to play an audio hosted in S3 Amazon cloud The MP3 URL is: * *
*h**ttp:// test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_willie.mp3?Expires=1349381157&AWSAccessKeyId=AKIAJKQT6QPSI3BXJJ4A&Signature=bnJgjbnxqlgsdYIcKIbYUa9gqao%3D *
The result is:
2012-10-04 20:27:28.891298 [DEBUG] switch_ivr.c:605 sofia/external/+15752222222@67.231.8.195 Command Execute playback( http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil... ) EXECUTE sofia/external/+15752222222@67.231.8.195 playback( http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil... ) 2012-10-04 20:27:28.903180 [ERR] mod_httapi.c:2545 File at url [ http://test-media-dev.s3.amazonaws.com/u-asevyeard22pl6sc2z4knzi%2Fblind_wil...] is unreachable!
If I use the Browser with same URL, I'm able to listen to the sample audio.
Any idea about what is wrong?
Thanks in advance, Leonardo
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
I'm sending the SMS via mod_socket interface using the following command: bgapi chat sip|+17778882233|external/+17778882234@sms-proxy.com|SMS test The SMS is sent successfully. The problem is that I need to inject an string to be retrieved when the BACKGROUND_JOB event is received. This is the scenario: #1 Send an SMS using BGAPI #2 create a new record in database using the JOB_ID as key #3 As soon as the BACKGROUND_JOB event is received, update the database. The problem is that sometimes, the event is received before the record has being created. Is there any way to inject an kind of "trakcing_id" when sending an SMS that will be received in BG event? (just in case, for calls I had the same problem, and I used the parameter 'origination_channel_name' to handle the problem) Thanks in advance. Leo
You could try blocking receiving events during the DB update, or if you cannot do that try storing the BACKGROUND_JOB event in a hash in memory so that when the record creation succeeds it checks the hash to see if the event has already been received. You can also use a hash to see if the record is currently being inserted or not to save checking if it's in the database. -Steve On 1 February 2013 11:42, Leonardo N. S. Pereira <leonardo@daitangroup.com>wrote:
I'm sending the SMS via mod_socket interface using the following command: bgapi chat sip|+17778882233|external/+17778882234@sms-proxy.com|SMS test The SMS is sent successfully. The problem is that I need to inject an string to be retrieved when the BACKGROUND_JOB event is received.
This is the scenario: #1 Send an SMS using BGAPI #2 create a new record in database using the JOB_ID as key #3 As soon as the BACKGROUND_JOB event is received, update the database.
The problem is that sometimes, the event is received before the record has being created.
Is there any way to inject an kind of "trakcing_id" when sending an SMS that will be received in BG event? (just in case, for calls I had the same problem, and I used the parameter 'origination_channel_name' to handle the problem)
Thanks in advance. Leo
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (6)
-
Anthony Minessale
-
Brian West
-
Chad Engler
-
Gabriel Gunderson
-
Leonardo N. S. Pereira
-
Steven Ayre