[Asterisk-Users] Disa - how it returns on user not dialing anynumbers ?

Robert Rozman rozman at fri.uni-lj.si
Mon Jun 6 23:04:25 MST 2005


----- Original Message ----- 
From: "Peter Svensson" <psvasterisk at psv.nu>
To: "Asterisk Users Mailing List - Non-Commercial Discussion" 
<asterisk-users at lists.digium.com>
Sent: Monday, June 06, 2005 9:30 AM
Subject: Re: [Asterisk-Users] Disa - how it returns on user not dialing 
anynumbers ?


> On Mon, 6 Jun 2005, Robert Rozman wrote:
>
>> I'd like to use DISA properly for my case - I'd like to handle it right, 
>> if
>> user when in DISA doesn't dial any number - how does Asterisk return from
>> DISA cmd ?
>
> The file app_disa.c is hardwired to hang up the call if too many incorrect
> passwords are attempted and when no valid extensions has been entered
> before the digittimeout expires.
>
> To change it the block under the "reorder:" label in app_disa.c is
> probably the easiest. Instead of playing tones and all that it could set a
> channel variable based on the "k" variable which seem to be the main state
> variable. The dialplan could then handle the various exit cases.
>
> Peter
>
Hi,

thanks for info...  I wanted to add  n+101 behaviour if disa doesn't get 
proper password or extension....

I'm total newbie and would like to ask some more experienced users whether 
following change is proper to do that.


I've changed in that block :

reorder:

 /*ast_indicate(chan,AST_CONTROL_CONGESTION);*/
 /* something is invalid, give em reorder for several seconds */
 /*time(&rstart);
 while(time(NULL) < rstart + 10)
 {
  if (ast_waitfor(chan, -1) < 0)
   break;
  f = ast_read(chan);
  if (!f)
   break;
  ast_frfree(f);
 }
 ast_playtones_stop(chan);*/

 LOCAL_USER_REMOVE(u);

/* return -1;*/


/* Dodano timeout koda:*/

 if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 
101, chan->callerid))
   chan->priority+=100;
 return 0;

}




Thanks in advance,

regards,

Rob. 




More information about the asterisk-users mailing list