Redirect Local Channel

Hi there,

I am trying to originate a call through a local channel which then dials an external number. Upon connection of the dialled call I am running a macro ‘callconnected’ which then redirects the call to a queue in the ‘incoming-calls’ context…

exten => _6X.,1,Dial(${Carrier}/${EXTEN:1},tTorM(callconnected))
exten => _6X.,n,Hangup()

exten => s,1,Set(MACRO_RESULT=GOTO:incoming-calls^01234567890^1)

exten => _01234567890,1,Queue(cmp-test,t,6)
exten => _01234567890,n,Voicemail(1111@vmail) ; main voicemail box
exten => _01234567890,n,hangup()

The first stage works which does make the outbound call. The call is then answered and placed into the queue. The SIP device then rings but when answered it then recalls the external number. When the external number is answered I then hear the MOH for the queue in the SIP device.

So definately not working the way I thought it would :smile:

Is there a tidier way you can suggest of what I am trying to do:

  • Make a call through a local channel to and external number
  • Redirect the called channel to a queue when answered and hangup the local caller channel


Vicibox 5 64bit from .iso | Vicidial 2.8-416a | Build 131016-2112 | Asterisk | Single Server