DISA: Direct Inward System Access, application allows someone from outside the telephone switch (PBX) to obtain an <emphasis>internal</emphasis> system dialtone and to place calls from it as if they were placing a call from within the switch.
Sampel Extension Usage:
exten => 123,1,DISA(111,disa-context,,123@default,np)
or
exten => 123,1,DISA(/etc/asterisk/passcode.txt)
passcode.txt is like this:
111,disa-context,,123@default
222,disa-context,,123@default
In the for loop, when k is either 00, or 10, the loop would be in password state, entered digit saved in f->subclass and assigned to j, later saved in array exten[i++]=j. when password end with #, k would be set to k|=1 to 3(11), i reset to 0, the password state test k&1 would be all false,so skips all the password state instruction, and do the exten[i++]=j to save entered extension number to array exten, when # entered, break the loop and go to check if k==3.
Sampel Extension Usage:
exten => 123,1,DISA(111,disa-context,,123@default,np)
or
exten => 123,1,DISA(/etc/asterisk/passcode.txt)
passcode.txt is like this:
111,disa-context,,123@default
222,disa-context,,123@default
In the for loop, when k is either 00, or 10, the loop would be in password state, entered digit saved in f->subclass and assigned to j, later saved in array exten[i++]=j. when password end with #, k would be set to k|=1 to 3(11), i reset to 0, the password state test k&1 would be all false,so skips all the password state instruction, and do the exten[i++]=j to save entered extension number to array exten, when # entered, break the loop and go to check if k==3.