[Freeswitch-users] Behaviour of group_confirm_cancel_timeout

Nagalenoj H. nagalenoj at gmail.com
Mon Jun 14 22:28:29 PDT 2010


Dear friends,
    I've tried using the group_confirm_cancel_timeout channel variable. I've
written a testing script to get digits before bridging. But, it doesn't seem
to be working.

My understanding after reading wiki is,
        * When I dial [leg_timeout=10]user/1005, if he answers before
timeout and in the process of giving digits, then the call shouldn't be
disconnected after the leg_timeout secs (10 sec in the example).

But, When I experiment it, the call is getting disconnected after 10 seconds
and it doesn't bother whether the callee has answered the call(Started
giving digits) or not answered at all.

I've checked it with nc as follows,

sendmsg
call-command: execute
execute-app-name: set
execute-app-arg: group_confirm_key=exec

sendmsg
call-command: execute
execute-app-name: set
execute-app-arg: group_confirm_file=perl /root/confirm.pl

sendmsg
call-command: execute
execute-app-name: set
execute-app-arg: group_confirm_cancel_timeout=1

sendmsg
call-command: execute
execute-app-name: bridge
execute-app-arg: [leg_timeout=10]user/1005

And here is the script,

use freeswitch;
our $session;
my $digit;

while(1)  {
        # Wait till response timeout for the first digit.
        $digit = $session->getDigits(1, "", 10000);
        freeswitch::consoleLog ("info","Digit>>".$digit."<<");

        if (! $session->ready() ) {
                freeswitch::consoleLog("info","Going to Exit\n");
                last;
        }
        if (defined $digit and $digit ne "" )  {
                freeswitch::consoleLog("info","DTMF received: $digit\n");
                if ($digit eq '#')  {
                        return;
                }
        }
        else  {
                freeswitch::consoleLog("info","Timeout\n");
                $session->hangup();
        }
}
1;

If my understanding is right then, I believe there is something wrong with
channel_variable.

Kindly help me to resolve this.

-- 
Regards,
Nagalenoj H.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100615/bd57341f/attachment.html 


More information about the FreeSWITCH-users mailing list