2

我正在尝试将 Asterisk 绑定到我的 java 程序。我按照这篇文章 ( http://www.jcgonzalez.com/asterisk-handle-calls-with-java-example ) 来信。但是一旦我调用 888 扩展,我就会出错。它给了我以下错误:

Dec 12, 2014 7:32:00 PM org.asteriskjava.fastagi.DefaultAgiServer startup
INFO: Thread pool started.
Dec 12, 2014 7:32:00 PM org.asteriskjava.fastagi.DefaultAgiServer startup
INFO: Listening on *:4573.
Dec 12, 2014 7:32:05 PM org.asteriskjava.fastagi.DefaultAgiServer startup
INFO: Received connection from /127.0.0.1
Dec 12, 2014 7:32:05 PM org.asteriskjava.fastagi.ResourceBundleMappingStrategy loadResourceBundle
INFO: Resource bundle 'fastagi-mapping' not found.
Dec 12, 2014 7:32:05 PM org.asteriskjava.fastagi.AbstractMappingStrategy createAgiScriptInstance
SEVERE: Unable to create AgiScript instance of type hello.agi: Class not found, make sure the class exists and is available on the CLASSPATH
Dec 12, 2014 7:32:05 PM org.asteriskjava.fastagi.internal.AgiConnectionHandler run
SEVERE: No script configured for URL 'agi://localhost/hello.agi' (script 'hello.agi')

我刚刚切换到 UBUNTU,我不知道这句话是什么意思:确保 fastagi-mapping.properties 在类路径中或将其与编译的类放在同一个文件夹中。

请帮忙。

4

2 回答 2

4

实际上,您必须将 hello.agi 与实际 java 类文件的映射放在 fastagi-mapping.properties 文件中,以便它可以找到您从星号调用的相应 AGI 文件..

于 2014-12-15T05:10:53.037 回答
0

您的错误与 AGI 没有任何关系。

您的错误说您在路径中没有类(或错误输入)

SEVERE: Unable to create AgiScript instance of type hello.agi: Class not found, make sure the class exists and is available on the CLASSPATH
Dec 12, 2014 7:32:05 PM org.asteriskjava.fastagi.internal.AgiConnectionHandler run
SEVERE: No script configured for URL 'agi://localhost/hello.agi' (script 'hello.agi')

注意,使用的类将取决于在拨号方案中调用 agi 时使用的 url。

于 2014-12-12T21:09:15.120 回答