[Asterisk-Users] Can we dial agents from extensions.conf

Adam Goryachev mailinglists at websitemanagers.com.au
Wed Jan 4 04:30:00 MST 2006


On Fri, 2005-12-30 at 20:04 +0530, vivek at staff.ownmail.com wrote:
> Thanks a lot Mr. Alexander Lopez for your prompt attension.
> I tried the same thing but it wouldnot happen. I use it as:-
> 
> exten => 12,1,Dial(Agent/12)
> exten => 12,2,Hangup
> 
> where agent 12 is configured as :-
> 
> agent => 12,12, vivek
> 
> After the agent is logged in on extension no>12 as follows
> Callback Agent '12' logged in on 12
> 
> I try to dial 12 from another sip phone and get this:-
> -- Executing Dial("SIP/62-c24e", "Agent/12") in new stack
>     -- outgoing agentcall, to agent '12', on 'Local/12 at default-ef51,1'
>     -- Called 12
>     -- Executing Dial("Local/12 at default-ef51,2", "Agent/12") in new stack
> Dec 30 14:26:54 NOTICE[13289]: app_dial.c:1011 dial_exec_full: Unable to create channel of type 'Agent' (cause 17 - User busy)
>   == Everyone is busy/congested at this time (1:1/0/0)
>     -- Executing Hangup("Local/12 at default-ef51,2", "") in new stack
>   == Spawn extension (default, 12, 2) exited non-zero on 'Local/12 at default-ef51,2'
>     -- Executing Hangup("Local/12 at default-ef51,2", "") in new stack
>   == Spawn extension (default, h, 1) exited non-zero on 'Local/12 at default-ef51,2'
>   == No one is available to answer at this time (1:0/0/0)
>     -- Executing Hangup("SIP/62-c24e", "") in new stack
>   == Spawn extension (inoffice, 12, 2) exited non-zero on 'SIP/62-c24e'
>     -- Executing Hangup("SIP/62-c24e", "") in new stack
>   == Spawn extension (inoffice, h, 1) exited non-zero on 'SIP/62-c24e'
> 
> 
> I am unable to figure out why it is happening like this. They are all in the same context. Also, the agent is not busy. Also, I wonder why it says "Unable to creat0e chanel of type 'Agent' cause user busy".
> Do you have any idea why is it happening so?
> I tried to tweak in but was not successful. 

You need to use contexts so that the local channel and agent are not in
the same context. eg:

[desks]
exten => 6XX,1,Dial(SIP/${EXTEN}) ; Assumes your sip username is equal
to your extension number
[agents]
exten => 6XX,1,Dial(Local/desks/${EXTEN})
exten => 700,1,AgentCallbackLogin(${CALLERIDNUM},,${CALLERIDNUM}@agents)
Assumes that your agent id equals your callerid number.

So, somehow, a call is directed to device Agent/601, which will then
call exten 601 at agents which will then call exten 601 at desks which will
then call SIP/601 which is hopefully your SIP phone (ie, device).

Hope that helps....

Regards,
Adam




More information about the asterisk-users mailing list