[Freeswitch-users] Blind transfer with call waiting

Tiago Sampaio tnsampaio at bsd.com.br
Thu May 2 23:43:00 MSD 2013


Is there something like blind transfer with call waiting when the target
is busy?

I have a situation here, EX: When Jhon (user 1001) answer a call and and
customer ask to talk to Robert (user 1002),
Jhon do a blind tansfer an hangup. Currently im wasting that call when
Robert is busy. I need an way to park the
call and when Robert become available ring his extension (and maybe put
an timeout and call back to Jhon).

Im currently writing an script with perl to do this, something like that
(i do this from memory):

use strict;
use POSIX qw(strftime);
my ($target_ext,$source_ext,$tryes);
my $max_time = 30;

our $session;

$target_ext = $session->getVariable('target_ext');
$source_ext = $session->getVariable('source_ext');

while($tryes <= $max_time){
    my $uuid = $session->execute("db","select/in_a_call/$target_ext");

    if(!$uuid)
        $session->execute("trasfer","$target_ext XML transfer_context");

    sleep(1);
    $tryes++;
}

$session->execute("transfer","$source_ext XML transfer_context");


Before call an extension i do db insert/in_a_call/<EXTENSION>/${uuid}
and after db delete/in_a_call/<EXTENSION>

But in thinking will be too hard to maintain this code and must be an
easier way to do this...

Any help?



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list