Question

I have the following TWIMlet:

<?php if ($_REQUEST['Digits'] == '1') { ?>
    <Play>ConnectingSupport.wav</Play>
    <Dial callerId="15559998888" action="Call_in.php">
        <Number url="screen_for_machine.php">
        +1555XXXXXXX
        </Number>
        <Number url="screen_for_machine.php">
        +1555YYYYYYY
        </Number>
    </Dial>

<?php } elseif ($_REQUEST['Digits'] == '2') { ?>
    <Play>ConnectingAssociate.wav</Play>
    <Dial callerId="18889990000" action="Call_in.php">
        <Number url="screen_for_machine.php">
        +1555YYYYYYY
        </Number>
        <Number url="screen_for_machine.php">
        +1555XXXXXXX
        </Number>
    </Dial>
<?php } elseif ($_REQUEST['Digits'] == '3') { ?>
    <Play>leavemessage.wav</Play>
    <Record maxLength="180" action="recording.php" />
<?php } ?>

Everything works as intended except when caller keys in #2 on their phone, only 1555YYYYYYY is called. Whereas if #1 is keyed in, both numbers (1555XXXXXXX and 1555YYYYYYYY) are called simultaneously as intended.

What am I missing? Your help is much appreciated.

Was it helpful?

Solution

With the code above, if one line goes straight to voicemail (i.e. cellphone with no reception), that's a pick up. Hence the second line doesn't have a chance to ring yet.

The solution is to hold the call in a queue, then call each line and use 'voicemail' detection. See details here

More coding for me to do :) so long.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top