How to receive the information passed in SIP refer in Twilio

335 Views Asked by At

I have configured the IBM voice agent to transfer the call to an actual physical phone number when the caller asks to be transferred to an agent and it is working fine. Now what I am wondering is if it is possible to transfer the call to a Twilio number and get the information passed in the SIP REFER message in User-to-User Information (UUI). I couldn't find any example of that anywhere.

The following is what I have done until now.

I have bought a Twilio number (for example, let's say the number that I have purchased is: +1XXXXXXXXX1) and followed the instructions given in this link to transfer the call from the Twilio number to IBM voice agent.

Once a user asks to transfer to an agent, I am transferring the user to an actual phone number using the vgwAction as shown below.

{
   "output": {
       "text": {
           "values": [ "Please hold on while I connect you with a live agent." ],
           "selection_policy": "sequential"
       },
       "vgwAction": {
           "command": "vgwActTransfer",
           "parameters": {
                "transferHeader": "User-to-User",
                "transferHeaderVal": "12a345b6c7d8901234e5;encoding=hex;purpose=foo;content=bar",
                "transferTarget": "sip:+1XXXXXXXXX2\\@mysiptrunk.pstn.twilio.com"
            }
       }
   }
}

I have followed the instruction in the following articles. https://cloud.ibm.com/docs/services/voice-agent?topic=voice-agent-call-transfer https://www.ibm.com/support/knowledgecenter/en/SS4U29/call_transfer.html

This call transfer is working fine and the call is successfully getting transferred to the number +1XXXXXXXXX2. +1XXXXXXXXX2 is also a Twilio number.

Now my question is, how can I receive the User-to-User header value passed by SIP REFER message when the call is received by +1XXXXXXXXX2. Also, I wanted to know if there is a possibility of eliminating the second number +1XXXXXXXXX2 altogether and just transfer the call from IBM Voice agent to a softphone so I don't have to buy another Twilio number.

Thanks,

Ankur Patel

1

There are 1 best solutions below

6
On

A SIP REFER request in this case is processed by the caller. The caller then initiates a new call to the target specified in the REFER request. As for how a new INVITE request is constructed by the caller is out of scope of Voice agent.