Asterisk 18, PJSIP.
I’m using AMI to originate calls via Asterisk’s built-in HTTP server.
The request looks something like this:
./mxml?action=originate&channel= ... &variable=requestid=123456
So I’m setting some channel variable requestid in the request URL to process it in the dialplan. And everything works fine.
But while processing dialplan I also need to know the AMI account name, so I’m trying to use the manager.conf setvar= option like this:
[someamiuser]
secret=123456
deny=0.0.0.0/0.0.0.0
permit=10.10.0.199/255.255.255.255
write = originate
setvar=AMIACCOUNT=someamiuser
The problem is: as soon as I add a setvar expression in manager.conf, the variable AMIACCOUNT becomes available in the dialplan, but the variable set previously via URL (requestid) becomes missing (I expected they should both be accessible simultaneously).
So is this a bug and maybe there is a workaround, or maybe I’m doing something wrong? Thanks.