HI
im triyng to find an logged agent into asterisk, so when some body makes a call i want to find if the CID has an logged agent, if so i deny the call inmedially…
how can i do that?
i been reading about funtions like AGENT and DB_EXIST??
I have 2 agent and they are logged daily, I want that when someone tries to make outbound call, first verifying whether the extension from which the call is made if there is an agent online, …
my agents can logged from any extension
so its like this
extension=500
if from extension is an agent logged in then
message"you cannot make a call"
else
the call is proceding
end if
i’ve been reading function AGENT but this funtion ask me the agent code first… and DB_EXIST also works but knowing the Agent code and i dont have the code i only have the CID
I hope this could be more easy to undestand… i dont speak english
ALL RIGHT… i find out how to do that is a variable called
AGENTBYCALLERID_${CALLERID(NUMBER) and its global, it give the agent code from any extension if there is an agent logged from there !!!
im using this piece of code in asterisk 1.2 but ti looks like ${AGENTBYCALLERID_${CALLERID(NUMBER)}}) it dosent exist… but i copy the same piece of code to a machine with asterisk 1.4 and it works perfectly… and i realy need to put this work out on asterisk 1.2
this is the complete code for asterisk 1.2 on 1.4 y replace setvar for set the rest is the same