[asterisk-users] Hitting # to Transfer out of a Queue

Douglas Garstang dgarstang at oneeighty.com
Tue Jul 18 11:29:35 MST 2006


> -----Original Message-----
> From: Patrick [mailto:asterisk-list at puzzled.xs4all.nl]
> Sent: Tuesday, July 18, 2006 12:20 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: RE: [asterisk-users] Hitting # to Transfer out of a Queue
> 
> 
> On Tue, 2006-07-18 at 10:29 -0600, Douglas Garstang wrote:
> [snip]
> > exten => oe_ccare,1,                NoOp(*** Incoming call 
> from ${CALLERID} to queue oe_ccare)
> > exten => oe_ccare,n,                Set(TIMEOUT(response)=5)
> > exten => oe_ccare,n,                
> GotoIfTime(8:00-17:00|mon-fri|*|*?one_queue_acd,oe_ccare-open,1)
> > exten => oe_ccare,n,                Goto(oe_ccare-shut,1)
> > exten => oe_ccare-open,1,           Answer
> > exten => oe_ccare-open,n,           
> Set(__TRANSFER_CONTEXT=one_start)
> > exten => oe_ccare-open,n,           NoOp(${__TRANSFER_CONTEXT})
> > exten => oe_ccare-open,n(queue1),   Queue(oe_custcare||||30) 
> 
> Is this a literal copy of your dialplan? If so I was not 
> aware you could
> put spaces between priorities and actions. Have you tried 
> removing them:
> exten => foo,1,NoOP(spaces are evil, mostly)

Patrick, yes, this is a literal portion. I have no reason to believe that spsaces between the priority, and the command cause problems, so I haven't tried that yet. Just trying to make the horrible assembler-like Asterisk dialplan language more readable.

I just tried this with a very simple dialplan example that didn't involve queues.

exten => 4001,1,Set(__TRANSFER_CONTEXT=footest)
exten => 4001,2,Dial(SIP/2944093,20,tr)

[footest]
exten => 1234,1,Answer
exten => 1234,2,Wait,1
exten => 1234,3,Playback(blue-eyed-polar-bear)

I dial 4001, and answer the call at 2944093. I then hit #1, and asterisk plays 'pbx-transfer' followed by dial tone. I put in 1234, and extension 1234 in context footest is called. Works fine.

I'm starting to wonder if this is a bug of some sort, and TRANSFER_CONTEXT cannot be used with queues. Has anyone actually tried it?

exten => oe_ccare,1,                NoOp(*** Incoming call from ${CALLERID} to queue oe_ccare)
exten => oe_ccare,n,                Set(TIMEOUT(response)=5)
exten => oe_ccare,n,                GotoIfTime(8:00-17:00|mon-fri|*|*?one_queue_acd,oe_ccare-open,1)
exten => oe_ccare,n,                Goto(oe_ccare-shut,1)
exten => oe_ccare-open,1,           Answer
exten => oe_ccare-open,n,           Set(__TRANSFER_CONTEXT=one_start)
exten => oe_ccare-open,n,           NoOp(${__TRANSFER_CONTEXT})
exten => oe_ccare-open,n(queue1),   Queue(oe_custcare||||30)               
... more stuff here

and we also have the context where agent callbacks are. I even tried putting the TRANSFER_CONTEXT where the agent is called.

[one_callback]
;
; Agent callbacks. Used by the AgentCallBackLogin app to dial agents.
;
exten => 80014054,1,                NoOp(Dialling Customer Care Spare)
exten => 80014054,n,                Set(__TRANSFER_CONTEXT=one_start)
exten => 80014054,n,                Dial(SIP/80014054)

The one_start context should match any number dialled, as it has _X. as a pattern match. However, as I said, as soon as I enter a digit, asterisk plays pbx-invalid.





More information about the asterisk-users mailing list