Transfer an IVR telephone call

As an IVR user, I want the bot to have the ability to transfer the caller to another phone number. I am not looking for Agent Transfer but rather, a simple phone call, IVR transfer. Any thoughts or suggestions?

1 Like

I’m looking for the same thing. Did you ever figure this out?

@mreynolds @eeskildsen
This should be possible through a custom VXML / IVR Channel override, which would have a SIP transfer instruction.

Here is a sample VXML:-

var agentTransferVxml = "<?xml version='1.0'?>";
agentTransferVxml += "<!DOCTYPE vxml PUBLIC '-//W3C//DTD VOICEXML 2.1//EN' 'http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.dtd'>";
agentTransferVxml += "<vxml xmlns='http://www.w3.org/2001/vxml' version='2.1'>";
agentTransferVxml += "<form id='main'>";
agentTransferVxml += "<var name='message' expr='\"\"'/>";
agentTransferVxml += "<var name='callId' expr='\"";
agentTransferVxml += [context.session.BotUserSession.lastMessage.messagePayload.from.id](http://context.session.botusersession.lastmessage.messagepayload.from.id/);
agentTransferVxml += "\"'/>";
agentTransferVxml += "<block><!--<goto next='#exit'/>--></block>";
agentTransferVxml += "<transfer name=\"agentTransfer\" dest=\"sip:";
agentTransferVxml += context.session.UserSession.agentTransferNumber;
agentTransferVxml += "@[sip.telnyx.com](http://sip.telnyx.com/)\" connecttimeout=\"30s\" bridge=\"true\">";
agentTransferVxml += "<prompt>";
agentTransferVxml += "Okay, I'm transferring you now...";
agentTransferVxml += "</prompt>";
agentTransferVxml += "</transfer>";
agentTransferVxml += "</form>";
agentTransferVxml += "</vxml>";

print(agentTransferVxml);

You may change that message to something like “Connecting you to <phone_num> now”.
The <phone_num> would be the value from context.session.UserSession.agentTransferNumber

Credits: @venkataphani.ailavar

Hi Swagat,

Thanks for the reply. This sounds like what I’m looking for.

Where would we put it…a script node in a dialog task?

@eeskildsen
In script node print does not work.
You need advanced js section of a message node. Prefer a channel override specific to the channel you are using (webhook/ slack/ etc.)

1 Like