Registering an Agent based on extension number

Hi,
I am trying to follow examples I have seen similar to:

exten=>5555, 2, AgentCallbackLogin(${CALLERID(num)}|s|${CALLERID(num)})

Now when I run this by dialling 5555 I get some odd string like IAX2/2009-1234 or something and Allison is asking me to enter login details, which is not what I wanted.

I only want the 2009 bit in order to register that particular extension as an agent with no requirements to enter login details. Can I mask off the bits from CALLERID(num) to give me what I want?

Thanks,

Rob.

[quote=“brushhead”]exten=>5555, 2, AgentCallbackLogin(${CALLERID(num)}|s|${CALLERID(num)})[/quote]That’s quite strange :frowning:

Can you add a NoOp with the callerId. The string that you showed us sounds like a channel, not like callerID.

exten => 5555,2,NoOp(CallerID ${CALLERID(num)} ${CALLERID(all)}) exten => 5555,3,AgentCallbackLogin(${CALLERID(num)}|s|${CALLERID(num)})
It won’t be bad if you show us the configuration of the account that you are testing with :smile:

Regards,
Arcopix

Hi,
Thanks for the response. This is my agents.conf file:

[general]

persistentagents=yes

[agents]

group=1
agent => 2001, 2001, 2001
agent => 2002, 2003, 2002
agent => 2003, 2003, 2003
agent => 2004, 2004, 2004
agent => 2005, 2005, 2005
agent => 2006, 2006, 2006
agent => 2007, 2007, 2007
agent => 2008, 2008, 2008
agent => 2009, 2009, 2009

And this is my queues.conf

[general]

persistentmembers = yes

[MainQueue]
context = internal
strategy = leastrecent
servicelevel = 60
timeout = 30
wrapuptime = 60
maxlen = 9
announce-frequency=20
announce-holdtime = yes
member=Agent/2001
member=Agent/2002
member=Agent/2003
member=Agent/2004
member=Agent/2005
member=Agent/2006
member=Agent/2007
member=Agent/2008
member=Agent/2009

And in my extensions.conf at the top of my internal context I have:

exten=>5555, 2, AgentCallbackLogin(${CALLERID(num)}|s|${CALLERID(num)})

This was meant to perform the login process silently. I will try the suggestions made when I have a minute. Bit busy today but will report back to you all.

Sincerely,

Rob.

[quote=“brushhead”]Hi,
Thanks for the response. This is my agents.conf file:

[general]

persistentagents=yes

[agents]

group=1
agent => 2001, 2001, 2001
agent => 2002, 2003, 2002
agent => 2003, 2003, 2003
agent => 2004, 2004, 2004
agent => 2005, 2005, 2005
agent => 2006, 2006, 2006
agent => 2007, 2007, 2007
agent => 2008, 2008, 2008
agent => 2009, 2009, 2009

And this is my queues.conf

[general]

persistentmembers = yes

[MainQueue]
context = internal
strategy = leastrecent
servicelevel = 60
timeout = 30
wrapuptime = 60
maxlen = 9
announce-frequency=20
announce-holdtime = yes
member=Agent/2001
member=Agent/2002
member=Agent/2003
member=Agent/2004
member=Agent/2005
member=Agent/2006
member=Agent/2007
member=Agent/2008
member=Agent/2009

And in my extensions.conf at the top of my internal context I have:

exten=>5555, 2, AgentCallbackLogin(${CALLERID(num)}|s|${CALLERID(num)})

This was meant to perform the login process silently. I will try the suggestions made when I have a minute. Bit busy today but will report back to you all.

Sincerely,

Rob.[/quote]As you may see the Agent does not have any callerID. The callerID comes from the account that you are currently using for testing calling. For example let it be a SIP account:[quote][arcopix]
type=friend
secret=huh
context=trtest
host=dynamic
callerid=“Stefan Lekov” <2009>[/quote]

From the messages you showed us, I can state that you are using an IAX account. Please show us its configuration :smile:

Regards,
Arcopix

Hi,
That was what I had done wrong, I had not put callerid=Robert <2009>

All I need to do now is to be able to log off an agent by dialling 5556.

I had looked at some examples on voip-info.org but they do ot seem to work as I had understood. I’ll do some more digging.

Rob.