I have to change my dialcode from macro to gosub so script works again.
Works fine with macro in v.1.4 but not in v.11
Call works fine, but hangup after 1 sec after goes back to context.
tfntocallout=xxxxxx;
phonenumber=xxxxxxx;
agentpin=1234;
agentid=1221;
timeleft=2000;
Dial(SIP/${phonenumber}@${tfntocallout},55,grU(agscreen^${agentpin}^${agentid})L(${timeleft}));
// Want to stop script running here when call is connected.
context agscreen{
s => {
Wait(0.2);
acceptcall=;
Read(acceptcall,kkhotline/agent-login-pin,7);
if(${acceptcall} = ${arg1}) {
NoOp(${ok});
Return;
} else {
Set(GOSUB_RESULT=CONTINUE);
NoOp(${ok});
Return;
}
}
}