[Asterisk-Users] Variables

Joseph tech at ekn.com
Wed Nov 17 10:36:29 MST 2004


On Tue, 2004-11-16 at 16:12, Joseph wrote:
> Is it possible to set a variable for a channel that follows the life of
> the call?
> 
> I am doing a SetVar(TRANSFER_CONTEXT=from-sip) when a call comes out of
> the queue, but if the agent tries to transfer the call, that variable is
> empty.
> 
> Do I have to set the var before it goes into the queue?
> 
> Doing a show channel Sip/Ext does not show the variable, but I am not
> sure if it should show them either...

Problem solved.

For whatever it is worth, SetVar does not work in the dialplan if the
call attempt is being made by the Queue.

The answer to this problem was to do the SetVar *before* the call was
placed in the queue.

Example:

 [que]
 exten => que,1,NoOp(Queue Called by  ${CALLERIDNUM})
 exten =>
que,2,SetVar(TRANSFER_CONTEXT=context_to_use_when_agent_transfers_calls)
 exten => que,3,Playback(CallMayBeMonitored)
 exten => que,4,Queue(que,t)
 exten => que,5,Voicemail(u100)
 exten => que,105,Voicemail(u100)

I had to have one context to send the call to the agents, 
but if an agent wants to transfer the call to a normal user, 
I had to have the above context.

Thoughts ideas...

-- 
respectfully, Joseph ===============
---------------------= **********  =




More information about the asterisk-users mailing list