Send calls to AMI async agi client if client is available

I want to send calls to AMI async agi client when client is available

[from-internal-custom]
exten => _X.,1,GotoIf( ${AMI_CLIENT(myAmiLogin,sessions)} > 0 ? toagiservice,_X.,1 )

[toagiservice]
exten => _X.,1,AGI(agi:async)

I receive warning
WARNING[10572][C-00000111] pbx.c: Channel ‘SIP/1313-00000158’ sent to invalid extension but no invalid handler: context,exten,priority= toagiservice,_X.,1

Just a ‘drive-by’ suggestion…

Any chance the space between ‘?’ and ‘toagiservice’ is causing the issue?

1 Like

thank you
warning is solved
but after ASYNCAGI BREAK by client call doesn’t make

The extension in a GoTo has to be an extension, not an extension pattern. Probably ${EXTEN} in this case.

my problem solved

[from-internal-custom]
exten => _X.,1,GosubIf(${AMI_CLIENT(teamyar1,sessions)}>0?toagiservice,s,1)

[toagiservice]
exten => s,1,AGI(agi:async)
same => n,Return()

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.