Hitendra
Hitendra

Reputation: 3226

No Script Configured for URL 'AGI://localhost/xxx.agi'

Getting the below error when trying to initiate call.

<SIP/xx.xxx.xxx.xx-00000000>AGI Rx << VERBOSE "No script configured for URL 'AGI://localhost/xxx.agi' (script 'xxx.agi')" 1

Can anyone help me to resolve this error.

Thanks

Upvotes: 0

Views: 1690

Answers (2)

GracefulLeo
GracefulLeo

Reputation: 21

This is already old, but still i got stucked yesterday with same issue, and found the solution. A lot of people saying about the classpath where your properties file should be, and they are right. As long as you running the asterisk jar in terms to run the test script, it doesn't have the properties file inside with YOUR script pointed there. So you need to direct it. Try to use this command, but modify it with your path:

java -cp /home/your user/folder with project/src/main/java/:/home/your user/folder with jar file placed/asterisk-java-2.0.2.jar org.asteriskjava.fastagi.DefaultAgiServer

org.asteriskjava.fastagi.DefaultAgiServer - this is the path which you use to run a server. Even if you will write something like:

java -jar asterisk-java-2.0.2.jar 

it will call the DefaultAgiServer anyway. So my point is, that the classpath here is a keyword, and command above will solve this problem for sure =)

UPD: Although it fix the issue with classpath of .properties file, that doesn't mean that it will solve this problem, in case if your script placed in additional packages =) If path to your script is something like

 com.yourcompany.yourpackage.YourScript

that mean that you need write down the same thing in a properties. Something like:

hello.agi = com.yourcompany.yourpackage.YourScript

Hope this will help somebody ;)

Upvotes: 2

arheops
arheops

Reputation: 15247

This error is writed by your java code. See java code for more info about how to do call. Most likly need do something like

AGI://localhost/xxx.agi?function=func

Upvotes: 0

Related Questions