我正试图把我的录音存储在s3上。
这是我的rayo.conf.xml:
<configuration name="rayo.conf">
<settings>
<param name="max-idle-sec" value="300"/>
</settings>
<domain name="localhost" shared-secret="itsasecret">
<listen type="c2s" port="5222" address="0.0.0.0" acl=""/>
<users><user name="adhearsion" password="foo"/></users>
</domain>
<record>
<param name="record-file-prefix" value="{profile=s3}http://bucket.domain.com.s3.amazonaws.com/records/"/>
</record>
</configuration>这是我的http_cache.conf.xml
<configuration name="http_cache.conf" description="HTTP GET cache">
<settings>
<!-- set to true if you want to enable http:// and https:// formats. Do not use if mod_httapi is also loaded -->
<param name="enable-file-formats" value="true"/>
<param name="max-urls" value="10000"/>
<param name="location" value="$${base_dir}/http_cache"/>
<param name="default-max-age" value="86400"/>
<param name="prefetch-thread-count" value="8"/>
<param name="prefetch-queue-size" value="100"/>
<!-- absolute path to CA bundle file -->
<param name="ssl-cacert" value="$${base_dir}/conf/cacert.pem"/>
<!-- verify certificates -->
<param name="ssl-verifypeer" value="true"/>
<!-- verify host name matches certificate -->
<param name="ssl-verifyhost" value="true"/>
</settings>
<profiles>
<profile name='s3'>
<aws-s3>
<access-key-id>
<![CDATA[AWS_KEY_ID]]>
</access-key-id>
<secret-access-key>
<![CDATA[AWS_KEY_SECRET]]>
</secret-access-key>
</aws-s3>
<domains>
<domain name='bucket.domain.com.s3.amazonaws.com' />
</domains>
</profile>
</profiles>
</configuration>以下是调试日志:
2014-08-10 01:03:19.405172 [ERR] mod_http_cache.c:351 Received HTTP error 403 trying to save /usr/http_cache/64/6ee5dd-bb6d-49a4-96cc-34bd54ab9827.wav to http://bucket.domain.com.s3.amazonaws.com/records/b5ffe577-c8c1-48c5-847e-a330ddc7b6b9-2.wav
2014-08-10 01:03:19.405172 [ERR] mod_http_cache.c:351 Received HTTP error 403 trying to save /usr/http_cache/64/6ee5dd-bb6d-49a4-96cc-34bd54ab9827.wav to http://bucket.domain.com.s3.amazonaws.com/records/b5ffe577-c8c1-48c5-847e-a330ddc7b6b9-2.wav
[DEBUG] esl.c:1316 esl_recv_event() RECV HEADER [Content-Type] = [log/data]
[DEBUG] esl.c:1316 esl_recv_event() RECV HEADER [Content-Length] = [116]
[DEBUG] esl.c:1316 esl_recv_event() RECV HEADER [Log-Level] = [5]
[DEBUG] esl.c:1316 esl_recv_event() RECV HEADER [Text-Channel] = [3]
[DEBUG] esl.c:1316 esl_recv_event() RECV HEADER [Log-File] = [switch_core_session.c]
[DEBUG] esl.c:1316 esl_recv_event() RECV HEADER [Log-Func] = [switch_core_session_thread]
[DEBUG] esl.c:1316 esl_recv_event() RECV HEADER [Log-Line] = [1632]
[DEBUG] esl.c:1316 esl_recv_event() RECV HEADER [User-Data] = [b5ffe577-c8c1-48c5-847e-a330ddc7b6b9]
[DEBUG] esl.c:1480 esl_recv_event() RECV MESSAGE
Event-Name: SOCKET_DATA
Content-Type: log/data
Content-Length: 116
Log-Level: 5
Text-Channel: 3
Log-File: switch_core_session.c
Log-Func: switch_core_session_thread
Log-Line: 1632
User-Data: b5ffe577-c8c1-48c5-847e-a330ddc7b6b9
Content-Length: 116
2014-08-10 01:03:19.425141 [NOTICE] switch_core_session.c:1632 Session 2 (sofia/internal/1001@192.168.59.103) Ended我试图将它指向一个本地服务器,结果我得到的唯一参数是文件的名称: audio_file.wav。看上去文件发送不正确..。
我检查了一下我的证件所以我很确定这不是问题所在。此外,记录目录现在可以按世界写。
发布于 2014-08-12 20:46:20
在这种配置中发现了两个问题:
FreeSWITCH的主分支有修正:参见提交b60df39b96和3b45ef90a。
同时-确保您没有加载mod_httapi。
发布于 2014-08-11 17:53:48
我所看到的唯一明显的错误是,在rayo.conf.xml中有“rayo.conf.xml”,而在http_cache.conf.xml中有"bucket.domain.com.s3.amazonaws.com“。拥有错误的域可能是HTTP 403禁止响应的原因。
https://stackoverflow.com/questions/25224623
复制相似问题