Search code examples
asteriskagi

No application 'AGI' for extension


I haven’t been developing anything for Asterisk for a long time.

Now, I installed Asterisk 16.5.0 on UBUNTU 16.04. I am trying to run an AGI that I had developed a long time ago but always get (see details below):

WARNING: …: No application ‘AGI’ …

The extensions.conf looks like this:

[inbound]

exten => 301,1,NoOp()

same => n,Answer()

same => n,AGI( scriptAGI )

same => n,Hangup()

When I disk 301 through xlite I get the following:

[Aug 25 11:13:31] == Using SIP RTP CoS mark 5

[Aug 25 11:13:31] WARNING[6788][C-0000000d]: pbx.c:2922 pbx_extension_helper: No application ‘AGI’ for extension (inbound, 301, 3)

[Aug 25 11:13:31] == Spawn extension (inbound, 301, 3) exited non-zero on ‘SIP/asusXlite-0000000c’

[Aug 25 11:13:45] WARNING[1238]: db.c:348 ast_db_put: Couldn’t execute statement: SQL logic error or missing database

I believe this is a configuration issue. Can someone help me? Thank you in advance.

The solution to this issue was that AGI needs to have res_speech loaded. I discovered this thanks to the artheops tip. Thank you. Another point is that spaces before and after the AGI name prevent it from working.


Solution

  • In cli run core show application AGI. Then if you are able to see the AGI application, it's working. If you get an error like

    Your application(s) is (are) not registered Command 'core show application AGI' failed.

    then try enabling the AGI module in modules.conf with the line

    load = res_agi.so

    then go back to cli and load the AGI module with module load res_agi.so.