Twilio Call hangs up after moving call from one queue to another

When I move a call from one queue to another and then connect to it from an agent, the call hangs up after a few seconds of connection.

Please let me know as to what could be the issue.

Answers


Twilio Evangelist here. This should work perfectly, so I suspect you might want to contact Twilio Support (help@twilio.com) with your Twilio Account SID and they can probably check this out for you.

Hope this helps!


Below is sample code to reproduce my issue: Its implemented using Codeigniter framework.

<?php
class Test_queue extends CI_Controller {
    function test()
    {
        $action = site_url('test_queue/action');
        $wait = site_url('test_queue/wait');

        echo <<<XML
    <?xml version="1.0" encoding="UTF-8"?>
    <Response>
        <Enqueue method="GET" waitUrlMethod="GET" action="$action" waitUrl="$wait">Queue Demo</Enqueue>
    </Response>
    XML;
    }

    function wait()
    {
        echo <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say>
        You are about to leave queue Queue Demo
    </Say>
    <Leave />
</Response>
XML;
    }

    function action()
    {
        $action = site_url('test_queue/second_action');
        $wait = site_url('test_queue/second_wait');

        echo <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Enqueue method="GET" waitUrlMethod="GET" action="$action" waitUrl="$wait">Queue Demo1</Enqueue>
</Response>
XML;
    }

    function second_action()
    {
        echo <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Hangup/>
</Response>
XML;
    }

    function second_wait()
    {
        echo <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say>
        You are in queue Queue Demo1
    </Say>
</Response>
XML;
    }

    function dial()
    {
        $url = site_url('test_queue/agent_msg');
        echo <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial method="GET">
        <Queue>Queue Demo1</Queue>
    </Dial>
</Response>
XML;
    }

    function agent_msg()
    {
        echo <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say>You will now be connected to an agent.</Say>
</Response>
XML;
    }
}

Basically, the issue occurred when call moved from first queue to second queue and the agent(Twilio.Device) connected to the call with the dial() function call.

If I provide url parameter for twiML, so that a message is said back, before connecting the caller to agent, the call does not hang up any more.

Below is the working response for dial() function:

$url = site_url('test_queue/agent_msg');
echo <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial method="GET">
        <Queue url="$url" method="GET">Queue Demo1</Queue>
    </Dial>
</Response>
XML;

Need Your Help

IE7 and IE8: Float clearing without adding empty elements

html css

I'm having a problem similar to the one described here (without a resolution):

Trouble with parameterized query

c# sql db2 odbc parameterized-query

I'm having trouble with a parameterized query in ODBC that usually works when I'm working with SQLClient objects.