Problem with HelloAgiScript (Asterisk-Java-Interface)


I am trying the HelloAgiScript of Asterisk-Java. However I just couldn’t get it work. I turned on the debugging with agi set debug on command. And below is the debug output:

-- Executing [111@from-internal:1] AGI("PJSIP/6003-00000002", "agi://") in new stack AGI Tx >> agi_network: yes AGI Tx >> agi_network_script: hello.agi <PJSIP/6003-00000002>AGI Tx >> agi_request: agi:// <PJSIP/6003-00000002>AGI Tx >> agi_channel: PJSIP/6003-00000002 <PJSIP/6003-00000002>AGI Tx >> agi_language: en <PJSIP/6003-00000002>AGI Tx >> agi_type: PJSIP <PJSIP/6003-00000002>AGI Tx >> agi_uniqueid: 1426581107.10 <PJSIP/6003-00000002>AGI Tx >> agi_version: 13.0.1 <PJSIP/6003-00000002>AGI Tx >> agi_callerid: 6003 <PJSIP/6003-00000002>AGI Tx >> agi_calleridname: 6003 - XLite Windows <PJSIP/6003-00000002>AGI Tx >> agi_callingpres: 0 <PJSIP/6003-00000002>AGI Tx >> agi_callingani2: 0 <PJSIP/6003-00000002>AGI Tx >> agi_callington: 0 <PJSIP/6003-00000002>AGI Tx >> agi_callingtns: 0 <PJSIP/6003-00000002>AGI Tx >> agi_dnid: unknown <PJSIP/6003-00000002>AGI Tx >> agi_rdnis: unknown <PJSIP/6003-00000002>AGI Tx >> agi_context: from-internal <PJSIP/6003-00000002>AGI Tx >> agi_extension: 111 <PJSIP/6003-00000002>AGI Tx >> agi_priority: 1 <PJSIP/6003-00000002>AGI Tx >> agi_enhanced: 0.0 <PJSIP/6003-00000002>AGI Tx >> agi_accountcode: <PJSIP/6003-00000002>AGI Tx >> agi_threadid: -1237865616 <PJSIP/6003-00000002>AGI Tx >> <PJSIP/6003-00000002>AGI Rx << SET VARIABLE "AJ_AGISTATUS" "NOT_FOUND" <PJSIP/6003-00000002>AGI Tx >> 200 result=1 <PJSIP/6003-00000002>AGI Rx << VERBOSE "No script configured for URL 'agi://' (script 'hello.agi')" 1 agi:// No script configured for URL 'agi://' (script 'hello.agi') <PJSIP/6003-00000002>AGI Tx >> 200 result=1 -- <PJSIP/6003-00000002>AGI Script agi:// completed, returning 0 <PJSIP/6003-00000002>AGI Tx >> HANGUP -- Auto fallthrough, channel 'PJSIP/6003-00000002' status is 'UNKNOWN'

I followed every step on the tutorial on this site: … orial.html
The only change I made is that I added package name of my HelloAgiScript file in the file (I tried it without the package name, it threw java.lang.NoClassDefFoundError) :cry:

UPDATE: I removed the package declaration in my HelloAgiScript java file, and also in, now it is working… But now, how do I make it work with package declaration?