I need the information of uniqueid and linkedid for calls entering the queue, and the only way to do this is through QueueLog. However, when I try to send it with gosub, the variables are not being passed. Can someone help me?
Here is the example of the extensions.conf.
[interno]
exten => *2000,1,Queue(testes,t,,,60,,,gosub-queuelog,s,1(testes,${CDR(uniqueid)}))
[gosub-queuelog]
exten => s,1,NoOp(ARG1: ${ARG1} | ARG2: ${ARG2} | ARG3: ${ARG3} | ARG4: ${ARG2} | CDR(uniqueid): ${CDR(uniqueid)} | CDR(linkedid): ${CDR(linkedid)})
same => n,QueueLog(${ARG1},${ARG2},${CDR(src)},LINKEDID,${CDR(linkedid)})
same => n,Return
Here is what happens in the console:
[2023-11-24 17:31:26] -- Executing [*2000@ddd:1] Queue("PJSIP/7002-00000086", "testes,t,,,60,,,gosub-queuelog,s,1(testes,1700857886.919)") in new stack
[2023-11-24 17:31:28] -- Executing [s@gosub-queuelog:1] NoOp("PJSIP/7022-00000087", "ARG1: | ARG2: | ARG3: | ARG4: | CDR(uniqueid): 1700857886.921 | CDR(linkedid): 1700857886.919") in new stack
[2023-11-24 17:31:28] -- Executing [s@gosub-queuelog:2] QueueLog("PJSIP/7022-00000087", ",,7022,LINKEDID,1700857886.919") in new stack
[2023-11-24 17:31:28] WARNING[909335][C-0000003d]: app_queue.c:8387 ql_exec: QueueLog requires arguments (queuename,uniqueid,membername,event[,additionalinfo])
[2023-11-24 17:31:28] == Spawn extension (gosub-queuelog, s, 2) exited non-zero on 'PJSIP/7022-00000087'
[2023-11-24 17:31:28] WARNING[909335][C-0000003d]: app_stack.c:1111 gosub_run: PJSIP/7022-00000087 Abnormal 'Gosub(gosub-queuelog,s,1)' exit. Popping routine return locations.
What am I doing wrong?
Why aren’t the variables being read?