Call Transfering (Transfer from a Menu System)


#1

Hi All,

I think this is a pretty common issue, and I’ve searched around, but can’t find anything on what I’m trying to do.

I’ve got an Asterisk box setup, I have several Cisco 2600 setup as gateways with ISDN PRI’s setup on them. All my outbound and inbound calling works fine. I also have set’s of DID’s.

I setup a DID that goes to a menu system, basically this is a menu system for our on-call support. They have the option of pushing 1 to page the person on call, or pushing 2 to leave a voicemail. I’ve got an external app that looks up the person that’s on call and grabs their phone #. I would like it to actually transfer the call coming in to this #, but I can’t get it to work.

If I use the Transfer command in the dialplan, then it works, if I’m dialing from one of my SIP phones, but if the call is coming in from outside, then it doesn’t work.

If I use the DIAL command, then it works no matter what, but the problem is that it’s still running through the asterisk box, whereas I’d really like to get it to connect the 2 sides, then disconnect asterisk from the call.

Here is my extentions.conf for the menu system:

[menu]

exten => s,1,Answer
exten => s,2,SetMusicOnHold(${DEFMUSIC})
exten => s,3,DigitTimeOut,5
exten => s,4,ResponseTimeOut,10
exten => s,5,Background(/var/lib/asterisk/custom-sounds/welcome)
exten => s,6,Background(/var/lib/asterisk/custom-sounds/aware)
exten => s,7,Background(/var/lib/asterisk/custom-sounds/menu)
exten => s,107,Hangup

; Page On-Call
exten => 1,1,Wait(1)
exten => 1,2,AGI,on_call.agi
exten => 1,3,GotoIF($["${ONCALLNUMBER}" = “ERROR”]?500:4)
exten => 1,4,Background(transfering)
exten => 1,5,Dial(${TRUNK}/95039130749,90,Ttrm)
;exten => 1,5,Transfer(5032592609)
exten => 1,6,Hangup
exten => 1,500,Wait(1)
exten => 1,501,Background(unavailable)
exten => 1,502,Hangup

; Leave Voice Mail for On-Call
exten => 2,1,Wait(1)
exten => 2,2,Voicemail(u3950)
exten => 2,3,Hangup
exten => 2,103,Hangup

; Page Manager
exten => 3,1,Wait(1)
exten => 3,2,Background(transfering)
exten => 3,3,Dial(${TRUNK}/9713276140,90,TtrmS(2))
;exten => 3,3,Transfer(9713276140)
exten => 3,4,HangUp
exten => 3,104,HangUp

; Record Aware Message
exten => 0,1,Wait(1)
exten => 0,2,Authenticate(2336)
exten => 0,3,Goto,recordmenu|s|1
exten => 0,103,Hangup

[recordmenu]
exten => s,1,Answer
exten => s,2,SetMusicOnHold(${DEFMUSIC})
exten => s,3,DigitTimeOut,5
exten => s,4,ResponseTimeOut,10
exten => s,5,Background(/var/lib/asterisk/custom-sounds/recmenu)

; Playback
exten => 1,1,Wait(1)
exten => 1,2,Background(/var/lib/asterisk/custom-sounds/aware)
exten => 1,3,Goto,recordmenu|s|5

; Record
exten => 2,1,Wait(1)
exten => 2,2,Background(/var/lib/asterisk/custom-sounds/record)
exten => 2,3,Record(/var/lib/asterisk/custom-sounds/aware:gsm)
exten => 2,4,Goto,recordmenu|s|5

; Delete
exten => 3,1,Wait(1)
exten => 3,2,System(rm -fr /var/lib/asterisk/custom-sounds/aware.gsm)
exten => 3,3,System(touch /var/lib/asterisk/custom-sounds/aware.gsm)
exten => 3,4,Wait(1)
exten => 3,5,Background(/var/lib/asterisk/custom-sounds/delete)
exten => 3,6,Goto,recordmenu|s|5

; Main Menu
exten => 4,1,Goto,ednmenu|s|1

As you can see, I have the DIAL commands in and those work, but here’s what I’d like to happen:

  1. Call comes in, the person pushes 1 to page the on call tech.
  2. Asterisk looks up the on call person and dials their #
  3. Once the person answers, asterisk disconnects from the call, and the caller and callee are connected directly to each other.

Is this possible?

Thanks,

Wayne Catterton