Andrew Kohlsmith
2004-Apr-22 07:58 UTC
[Asterisk-Users] How to get call back when transfer fails
I searched the 22490 messages I have in my own personal asterisk-users archive and have not found the answer, and it also does not appear on the wiki. I have a SIP phone and a regular phone on a TDM400P FXS interface. Extensions are 100 and 101, respectively. On the SIP phone I can hit #, get the "Transfer" prompt and enter an extension I want to transfer to. No problem. I can do the same thing on the FXS port. My question is does anyone have a dialplan that will bring the call I transfered back to me if the transfer fails (i.e. busy extension or an extesion that does not answer)? I see many examples of going to voicemail but I have no idea how to get the call back to me. The general idea: - I call someone or I receive a call. - I want to transfer said call, so I hit # and enter the extension - if the extension answers, it's all good. - if the extension is busy or does not answer, give me the call again. The dialplan is pretty straightforward: exten = 100,1,Dial(SIP/224,10,t) exten = 100,2,Congestion exten = 101,1,Dial(Zap/1,10,t) exten = 101,2,Congestion I do not wish to have the transferred call go to voicemail. I want the call back. I didn't see any kind of application which would connect me back to the call, and simply dropping off the dialplan just hangs up. So far the only thing I can think of is to park the call but that is suboptimal. Anyone? -A.
Steven Critchfield
2004-Apr-22 10:39 UTC
[Asterisk-Users] How to get call back when transfer fails
On Thu, 2004-04-22 at 09:58, Andrew Kohlsmith wrote:> I searched the 22490 messages I have in my own personal asterisk-users archive > and have not found the answer, and it also does not appear on the wiki. > > I have a SIP phone and a regular phone on a TDM400P FXS interface. Extensions > are 100 and 101, respectively. > > On the SIP phone I can hit #, get the "Transfer" prompt and enter an extension > I want to transfer to. No problem. I can do the same thing on the FXS port. > > My question is does anyone have a dialplan that will bring the call I > transfered back to me if the transfer fails (i.e. busy extension or an > extesion that does not answer)? I see many examples of going to voicemail > but I have no idea how to get the call back to me. > > The general idea: > - I call someone or I receive a call. > - I want to transfer said call, so I hit # and enter the extension > - if the extension answers, it's all good. > - if the extension is busy or does not answer, give me the call again.Well you could do a supervised transfer, or 3 way call. Basically, you place the one leg of the call on hold, dial the extension you are to transfer to, then if you successfully connect, bring the call to three way, and then excuse yourself. Or you could create a kind of Macro for transfers where it stores the originating part of the transfer, and upon failed connect, does a return dial. This would bypass normal call routing where a direct call would go to voicemail if it misses a person at the end. -- Steven Critchfield <critch@basesys.com>
Jeremy Hall
2004-Apr-22 11:30 UTC
[Asterisk-Users] How to get call back when transfer fails
>I thought of that too, but I don't think it'll work: > >exten 101,1,Setvar(myexten) >exten 101,2,Dial(Zap/1,10,t) >exten 101,103,getvar(myexten) >exten 101,104,Dial(myexten) > >If extension 101 is busy it will immediately try to dial me, but I'mstill >on the phone since the transfer didn't complete...> >Or did I misunderstand "return-dial" ? > >-A.Try something like this. Record a message (if one doesn't already exist) saying "Please hold while your call is being transferred." Then add it to your dialplan as such: exten 101,1,Setvar(myexten) exten 101,2,Dial(Zap/1,10,t) exten 101,103,getvar(myexten) exten 101,104,playback(hold-transfer) exten 101,105,Wait(3) exten 101,106,Dial(myexten) The hold message would take about 3 seconds, then with the additional 3 second wait, that would give you 6 seconds to hang up your phone, which if you are transferring a call is very reasonable. If it goes through, then great, you are done. If not, your phone will ring again in a few seconds and you get the call back. Hope that helps! Jeremy
Jeremy Hall
2004-Apr-22 14:17 UTC
[Asterisk-Users] How to get call back when transfer fails
<snip> exten 100,1,ChanIsAvail(Zap/1) exten 100,2,Transfer(Zap/1) exten 100,3,Hangup exten 100,102,Park exten 100,103,Play(unavailable, press 1 to return to the call or 2 to try someone else) exten 1,1,ParkedCall(${PARKEDAT}) exten 2,whatever... obviously in a macro but that's the idea... I was originally farting around with quiet meetme conferences but that wasn't quite right. Am I on the right track here? Hopefully I can take res_parking and create a park() that can incorporate a parkandannounce so that you can select whether you want it audible or in a script (for putting the parking # on a sip phone or something). What do you think? -A. exten 1, --------------------- I think that is a great idea. Rather than the phrase you used above, something along the lines of "<recorded name> is unavailable. To be transferred to voice mail, press 1. To return to the previous person you spoke with, press 2." There has to be a more elegant way to say it, but you get the idea. You could take it to the next step and have a single operator queue, and have another option of "To be placed on hold and wait for the person to become available, press 3." Then if they choose that option, "You will be connected as soon as the person is available. Maximum wait time is 3 minutes, at which time you will be transferred to voice mail. You may press the * key at any time to be immediately transferred to voicemail." The options you are opening up with your idea are tremendous, and will help asterisk fit in with and replace some other existing PBX solutions. Jeremy