Page 1 of 1

inbound calls - connection

PostPosted: Tue May 17, 2011 3:59 am
by phil_discount
Hello,
example: if i dial a DID, asterisk immediately accepts the call from the provider and i have to pay for the call even if i'm in a queue.

is it possible to configure asterisk vicidial-agi inbound script that the call isn't accepted until the agent receives the call?

if i don't dial a DID, only a normal extension, i get ringback and haven't to pay for the call until the person accept the calls...

thanks for any information

regards
philip

PostPosted: Tue May 17, 2011 6:07 am
by mflorell
This is not currently a feature, although I'm sure it could be done with enough work. Changing this in the way you suggest would take quite a bit of work because of all of the possibilities of where a call can go from DIDs, and all of those end points would need to be changed to Answer the call whereas now they all expect it to be Answered before getting the call.

PostPosted: Wed May 18, 2011 10:30 am
by phil_discount
i need it just for one way ... normal inbound call and waiting for a free agent.

EDIT:
i found the problem
Code: Select all
; DID forwarded calls
exten => _99909*.,1,Answer
exten => _99909*.,3,AGI(agi-VDAD_ALL_inbound.agi)
exten => _99909*.,3,Hangup

the "Answer" accepts the call...

if i replace Answer to Ringing it works....is there any known problem to replace answer?

regards
philip

PostPosted: Sun May 22, 2011 1:21 am
by williamconley
OK phil, you've been using it that way for four days ... has it shown any problems?

PostPosted: Sun May 22, 2011 9:27 am
by phil_discount
it works fine, just one problem:
no voice prompts are played while the customer is waiting.
example: if i want to play number of waiting position or a voice prompt, it will not be played because the call isnt accepted...

you have to edit agi-INBOUND
$AGI->answer();

Code: Select all
        ##### wait before looking again for an agent to take the call
        if ($wait_in_queue > 0)
                {
                if ($drop_timer < 2)
                        {
                        ### sleep for 23 hundredths of a second
                        usleep(1*230*1000);
                        $drop_timer = ($drop_timer + 0.25);
                        if ($moh_delay > 0)
                                {$moh_delay = ($moh_delay - 1);}
                        }
                else
                        {
                        if ( ($start_moh > 0) && ($moh_delay < 1) )
                                {
                                $start_moh=0;
                                ### GABCOM klingeln
                                if (length($moh_context) > 1)
                                        {
                                        $AGI->answer();
                                        print "SET MUSIC ON $moh_context\n";
                                                checkresult($result);
                                        }
                                }
                        if ($moh_delay > 0)
                                {$moh_delay = ($moh_delay - 1);}
                        ### sleep for 99 hundredths of a second
                        usleep(1*990*1000);

                #       $drop_timer++;
                        $NOWsec = time();
                        $drop_timer = ($NOWsec - $start_epoch);
                        }
                }