How can I transfer a caller to my voicemail?

How can I transfer a caller to my voicemail?

Here’s the scenario:

  1. Caller calls into Asterisk and presses option 5.
  2. Asterisk calls my cell-phone using VOIP using Dial option “t” which allows the called (eg. me on my cellphone) to transfer the incoming call.
  3. I answer my cellphone and press # to transfer the call, and then press 50 since that is my voicemail extension.

This doesn’t seem to work. What can I be doing wrong?

Here is my extensions.conf snippet:

exten => 5,1,Background(pls-wait-connect-call)
exten => 5,2,Set(CALLERID(num)=xxxxxxxxxx)
exten => 5,3,Set(CALLERID(name)=John Klimek)
exten => 5,4,Dial(IAX2/sofakng@exgn/1xxxxxxxxxx,15,wtm[default]) ; real phone number replaced with x
exten => 5,5,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?105:6)
exten => 5,6,GotoIf($["${DIALSTATUS}" = "BUSY"]?105:7)
exten => 5,7,Goto(107)
exten => 5,105,Playback(john)
exten => 5,106,Playback(is-curntly-unavail)
exten => 5,107,Goto(s,1)

exten => 50,1,VoiceMail(u50@default)

when you press the # does Asterisk play “transfer” ?

Yes, Asterisk plays “Transfer” and then I get a dial tone. I then press 50 but Asterisk says, “I’m sorry, but that is not a valid extension”, even though I have this line:

exten => 50,1,VoiceMail(u50@default)

Do I need to put that in the [parkedcalls] context? (features.conf says that is the context where parked calls go)

check the debug log. I think whats happening is its looking for exten 50 in the incoming context, that the caller was in when it dial()'d your cell phone. Also try adding a exten 50 to default context or whatever the outgoing channel to cell phone is in…