1 /*****************************************************************************\
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg **
8 ** dss1-port header file **
10 \*****************************************************************************/
12 /* DSS1 port classes */
13 class Pdss1 : public PmISDN
16 Pdss1(int type, struct mISDNport *mISDNport, char *portname, struct port_settings *settings, struct interface *interface, int channel, int exclusive, int mode);
18 unsigned int p_m_d_l3id; /* current l3 process id */
19 struct lcr_work p_m_d_delete; /* timer for audio transmission */
20 void message_isdn(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
21 int p_m_d_ces; /* ntmode: tei&sapi */
22 int message_epoint(unsigned int epoint_id, int message, union parameter *param);
23 void set_display(const char *text);
25 int p_m_d_ntmode; /* flags the nt-mode */
26 int p_m_d_tespecial; /* special te-mode with all nt-mode IEs */
27 char p_m_d_queue[64]; /* queue for dialing information (if larger than setup allows) */
28 struct lcr_msg *p_m_d_notify_pending; /* queue for NOTIFY if not connected */
30 int p_m_d_collect_cause; /* collecting cause and location */
31 int p_m_d_collect_location;
33 void new_state(int state); /* set new state */
34 // void isdn_show_send_message(unsigned int prim, msg_t *msg);
35 int hunt_bchannel(int exclusive, int channel);
36 int received_first_reply_to_setup(unsigned int cmd, int channel, int exclusive);
37 void information_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
38 void setup_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
39 void setup_acknowledge_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
40 void proceeding_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
41 void alerting_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
42 void connect_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
43 void disconnect_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
44 void release_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
45 void restart_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
46 void release_complete_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
47 void disconnect_ind_i(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
48 void t312_timeout_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
49 void notify_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
50 void facility_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
51 void progress_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
52 void hold_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
53 void retrieve_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
54 void suspend_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
55 void resume_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
56 void message_information(unsigned int epoint_id, int message_id, union parameter *param);
57 void message_setup(unsigned int epoint_id, int message_id, union parameter *param);
58 void message_notify(unsigned int epoint_id, int message_id, union parameter *param);
59 void message_facility(unsigned int epoint_id, int message_id, union parameter *param);
60 void message_3pty(unsigned int epoint_id, int message_id, union parameter *param);
61 void message_transfer(unsigned int epoint_id, int message_id, union parameter *param);
62 void message_overlap(unsigned int epoint_id, int message_id, union parameter *param);
63 void message_proceeding(unsigned int epoint_id, int message_id, union parameter *param);
64 void message_alerting(unsigned int epoint_id, int message_id, union parameter *param);
65 void message_connect(unsigned int epoint_id, int message_id, union parameter *param);
66 void message_disconnect(unsigned int epoint_id, int message_id, union parameter *param);
67 void message_release(unsigned int epoint_id, int message_id, union parameter *param);
70 void enc_ie_complete(struct l3_msg *l3m, int complete);
71 void dec_ie_complete(struct l3_msg *l3m, int *complete);
72 void enc_ie_bearer(struct l3_msg *l3m, int coding, int capability, int mode, int rate, int multi, int user);
73 void dec_ie_bearer(struct l3_msg *l3m, int *coding, int *capability, int *mode, int *rate, int *multi, int *user);
74 void enc_ie_call_id(struct l3_msg *l3m, unsigned char *callid, int callid_len);
75 void dec_ie_call_id(struct l3_msg *l3m, unsigned char *callid, int *callid_len);
76 void enc_ie_called_pn(struct l3_msg *l3m, int type, int plan, unsigned char *number, int number_len);
77 void dec_ie_called_pn(struct l3_msg *l3m, int *type, int *plan, unsigned char *number, int number_len);
78 void enc_ie_calling_pn(struct l3_msg *l3m, int type, int plan, int present, int screen, unsigned char *number, int type2, int plan2, int present2, int screen2, unsigned char *number2);
79 void dec_ie_calling_pn(struct l3_msg *l3m, int *type, int *plan, int *present, int *screen, unsigned char *number, int number_len, int *type2, int *plan2, int *present2, int *screen2, unsigned char *number2, int number_len2);
80 void enc_ie_connected_pn(struct l3_msg *l3m, int type, int plan, int present, int screen, unsigned char *number);
81 void dec_ie_connected_pn(struct l3_msg *l3m, int *type, int *plan, int *present, int *screen, unsigned char *number, int number_len);
82 void enc_ie_cause(struct l3_msg *l3m, int location, int cause);
83 void dec_ie_cause(struct l3_msg *l3m, int *location, int *cause);
84 void enc_ie_channel_id(struct l3_msg *l3m, int exclusive, int channel);
85 void dec_ie_channel_id(struct l3_msg *l3m, int *exclusive, int *channel);
86 void enc_ie_date(struct l3_msg *l3m, time_t ti, int seconds);
87 void enc_ie_display(struct l3_msg *l3m, unsigned char *display);
88 void dec_ie_display(struct l3_msg *l3m, unsigned char *display, int display_len);
89 void enc_ie_keypad(struct l3_msg *l3m, unsigned char *keypad);
90 void dec_ie_keypad(struct l3_msg *l3m, unsigned char *keypad, int keypad_len);
91 void enc_ie_notify(struct l3_msg *l3m, int notify);
92 void dec_ie_notify(struct l3_msg *l3m, int *notify);
93 void enc_ie_progress(struct l3_msg *l3m, int coding, int location, int progress);
94 void dec_ie_progress(struct l3_msg *l3m, int *coding, int *location, int *progress);
95 void enc_ie_hlc(struct l3_msg *l3m, int coding, int interpretation, int presentation, int hlc, int exthlc);
96 void dec_ie_hlc(struct l3_msg *l3m, int *coding, int *interpretation, int *presentation, int *hlc, int *exthlc);
97 void enc_ie_redir_nr(struct l3_msg *l3m, int type, int plan, int present, int screen, int reason, unsigned char *number);
98 void dec_ie_redir_nr(struct l3_msg *l3m, int *type, int *plan, int *present, int *screen, int *reason, unsigned char *number, int number_len);
99 void enc_ie_redir_dn(struct l3_msg *l3m, int type, int plan, int present, unsigned char *number);
100 void dec_ie_redir_dn(struct l3_msg *l3m, int *type, int *plan, int *present, unsigned char *number, int number_len);
101 void enc_ie_facility(struct l3_msg *l3m, unsigned char *facility, int facility_len);
102 void dec_ie_facility(struct l3_msg *l3m, unsigned char *facility, int *facility_len);
103 void enc_ie_facility_ect(l3_msg *l3m, struct param_transfer *transfer);
104 void dec_facility_centrex(struct l3_msg *l3m, unsigned char *cnip, int cnip_len);
105 void enc_ie_useruser(struct l3_msg *l3m, int protocol, unsigned char *user, int user_len);
106 void dec_ie_useruser(struct l3_msg *l3m, int *protocol, unsigned char *user, int *user_len);