Example FDM statements

This appendix contains an example of each FDM statement.

// Test All FDM Softkey instructions (normal and terse forms)
softkey test1 : "long name" : "sname" {
                               backspace;
                               bksp;
                               clear_call_buffer 2;
                               ccb 1;
                               clear_display;
                               clrd;
                               clear_user_input;
                               clrui;
                               delay 23;
                               delay 2;
                               delay 254;
                               dial_pulse_1;
                               dp1;
}
softkey test2 : "long name" : "sname" {
                               Display_call_buffer 1 3 lrci=c dc=b page=c;
                               Display_call_buffer 1 c3;
                               dcb 1 3 lrci=c dc=b page=c;
                               dcb 1 c3;
                               do_hookflash;
                               flash;
                               end_user_input;
                               eui;
}
softkey test3 : "long name" : "sname" {
                               go_down_by 3;
                               down 10;
                               go_offhook;
                               offh;
                               go_onhook;
                               onh;
                               go_up_by 31;
                               up 23;
}
softkey test4 : "long name" : "sname" {
                               go_to_line 4;
                               go_to_line c2;
                               goto 3;
                               goto c1;
                               page_down;
                               pgdn;
                               page_up;
                               pgup;
}
softkey test5 : "long name" : "sname" {
                               send_dtmf "*#0123456789ABD";
}
softkey test6 : "long name" : "sname" {
                               dtmf "*#0123456789ABD";
}
softkey test7 : "long name" : "sname" {
                               send_encoded_dtmf "qwertyasdfgh";
}
softkey test8 : "long name" : "sname" {
                               edtmf "qwertyasdfgh";
}
softkey test9 : "long name" : "sname" {
                               send_ldtmf "*#0123456789ABD";
}
softkey test10 : "long name" : "sname" {
                               ldtmf "*#0123456789ABD";
}
softkey test11 : "long name" : "sname" {
                               send_line_number;
                               1 num;
                               send_nothing;
                               noop;
                               send_user_input;
                               xui;
                               Set_info_flags INCC=1 INSK=0 INAL=1 INKP=1;
                               info INCC=1 INSK=0 INAL=1 INKP=1;
                               start_user_input;
                               sui;
                               switch_to_data;
                               swd;
                               switch_to_voice;
                               swv;
}
softkey test12 : "long name" : "sname" {
                               tab_to_primary;
                               tabp;
                               tab_to_secondary;
                               tabs;
                               tab_field;
                               tab;
                               wait_for_dial_tone;
                               wtdt;
}
softkey test13 : "long name" : "sname" {
                               put 4 "2323" "454545";
                               put 4 "2323" && "454545" wi=1;
                               put 4 "2323" || "454545";
                               put 4 "2323";
                               put   "2323" on_clipboard_line 5
                                     lrci=c wi=0;
}
softkey test14 : "long name" : "sname" {
                               display 4 "2323" "454545";
                               dsp 4 "2323" && "454545" wi=1 if_flag 7;
                               dsp 4 "2323" || "454545";
                               dsp 4 "2323";
                               dsp   "2323" on_clipboard_line 5
                                     lrci=c wi=0 if_flag 5;
}
softkey test15 : "long name" : "sname" {
                               install_softkey test13 test14 H-test1;
                               isk test2 test3 H-test11 if_flag 3;

                               Change_state_to 4;
                               state 3;
}
softkey test16 : "long name" : "sname" {
                               set_timer_for 4 sec;
                               set_timer_for 4;
                               settmr 12 sec;
                               settmr 12;
                               clear_timer;
                               clrtmr;
}
softkey test17 : "long name" : "sname" {
                               set_flag 5;
                               setf 7;
                               reset_flag 1;
                               rstf 2;
                               load_overlay overlay1;
                               lovly overlay1;
}
softkey test18 : "long name" : "sname" {
                               trigger CUSTOM_EVENT_X;
                               trigger CUSTOM_EVENT_Y;
                               trigger EVENT_X;
                               trigger EVENT_Y;
                               trigger X;
                               trigger Y;
                               exit;
}
// Test All FDM script statements (normal and terse forms)
main {
                               on CALLER_ID
                                  change_state_to 34;
                                  state 123;
                               end
                               on MSG_WAIT_IND
                                  clear_clipboard;
                                  cclip;
                               end
                               on IN_CALL_ANS
                                  clear_display;
                                  clrd;
                               end
                               on OUT_CALL_ANS
                                  clear_timer;
                                  clrtmr;
                               end
                               on RINGING_CEASED
                                  delay 25;
                               end
                               on SERVICE_SELECT
                                  dial_pulse_1;
                                  dp1;
                               end
                               on MAKING_CALL
                               end
                               on CALL_WAITING
                               end
                               on BUSY_TONE
                                  display "Talking to:";
                                  dsp "$Call1p";
                               end
                               on AUDIBLE_RINGBACK
                                  display_clipboard;
                                  dclip;
                               end
                               on DIAL_TONE
                                  Display_clipboard_if_flag 5;
                                  dclipif 3;
                               end
                               on RECALL_TONE
                                  do_hookflash;
                                  flash;
                               end
                               on RECALL_DIAL_TONE
                               end
}
overlay first_overlay {
                               on MESSAGE_WAITING
                                  exit;
                               end
                               on REORDER_TONE
                                  exit_but_retain_display;
                                  exitr;
                               end
                               on DISTINCT_RING
                                  go_offhook;
                                  offh;
                               end
                               on NORMAL_RING
                                  go_onhook;
                                  onh;
                               end
                               on REMINDER_RING
                                  install_softkey test1 H-test11;
                                  isk H-test13;
                                  isk test11 H-test13 test14 if_flag 3;
                               end
}
overlay second_overlay {
                               on SPECIAL_RING
                                  load_overlay first_overlay;
                                  lovly main;
                               end
                               on CODED_RING
                                  put "this should go on line 1";
                                  put " and this on line 2";
                               end
                               on TIME_OUT
                                  reset_flag 6;
                                  rstf 2;
                               end
                               on EXT_IN_USE
                                  set_flag  7;
                                  setf 1;
                               end
                               on CUSTOM_EVENT_X
                                  Set_timer_for 45;
                                  Set_timer_for 45 sec;
                                  settmr  23;
                               end
                               on CUSTOM_EVENT_Y
                                  trigger CUSTOM_EVENT_X;
                                  trig Y;
                               end
                               on EVENT_X
                               end
                               on EVENT_Y
                               end
                               on X
                               end
                               on Y
                               end
 }