[asterisk-users] Priority based softhangup

mir shahnawaz shahnawazmir at gmail.com
Tue Mar 30 16:54:49 CDT 2010


Thanks Steve and Danny for your help.

S Mir

On Tue, Mar 30, 2010 at 3:16 PM, Steve Edwards
<asterisk.org at sedwards.com> wrote:
> Un-top-posting...
>
>> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of mir
>> shahnawaz
>>
>> Can you please give me idea about Softhang.agi
>
> On Tue, 30 Mar 2010, Danny Nicholas wrote:
>
>> Simple code
>> In PERL -
>> -- agi header stuff --
>> My ($pri, $callno) = @ARGV;
>> -- read database to get priority of lowest active call, return $lowpri,
>> $lowid --
>> if ($pri > $lowpri) {
>>   print STDOUT "exec softhangup $lowid\n";
>>   -- AMI dial $callno --
>>   }
>> Else {
>>   Print STDOUT "exec BACKGROUND congested message\n";
>>   }
>>
>> You can find real examples on voip-info.org.
>
> mir, please keep in mind the above is meant to "give you an idea," not
> intended as literal code.
>
> You will save yourself a lot of frustration if you use an existing AGI
> "library" for your chosen language*. While conceptually simple, nobody
> gets the AGI protocol right the first time.
>
> *) I write most of my AGIs in C because it is the language I know best and
> you can execute hundreds of AGIs written in C in the time it takes to load
> the Perl or PHP interpreter and parse your script.
>
> --
> Thanks in advance,
> -------------------------------------------------------------------------
> Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
> Newline                                              Fax: +1-760-731-3000
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list