X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=joinpbx.h;h=cda54197d4d46a2c73ca16b0a451e2fbafb3efac;hp=dfc391abbf7fb068f1c18b30ebb948aaac4c828e;hb=5566f74eb29be75da44e29ba72ee6f015249ce61;hpb=5a22e57828617abc14e27814ee918cc63b96fd46 diff --git a/joinpbx.h b/joinpbx.h index dfc391a..cda5419 100644 --- a/joinpbx.h +++ b/joinpbx.h @@ -27,11 +27,6 @@ enum { /* relation types */ RELATION_TYPE_CONNECT, /* interface is connected */ }; -enum { /* relation audio state */ - CHANNEL_STATE_CONNECT, /* endpoint is connected to the join voice transmission in both dirs */ - CHANNEL_STATE_HOLD, /* endpoint is on hold state, no audio */ -}; - enum { /* states that results from last notification */ NOTIFY_STATE_ACTIVE, /* just the normal case, the party is active */ NOTIFY_STATE_SUSPEND, /* the party is inactive, because she has parked */ @@ -43,7 +38,7 @@ enum { /* states that results from last notification */ struct join_relation { /* relation to an interface */ struct join_relation *next; /* next node */ int type; /* type of relation */ - unsigned long epoint_id; /* interface to link join to */ + unsigned int epoint_id; /* interface to link join to */ int channel_state; /* if audio is available */ int rx_state; /* current state of what we received from endpoint */ int tx_state; /* current state of what we sent to endpoint */ @@ -54,30 +49,32 @@ class JoinPBX : public Join public: JoinPBX(class Endpoint *epoint); ~JoinPBX(); - void message_epoint(unsigned long epoint_id, int message, union parameter *param); - int handler(void); + void message_epoint(unsigned int epoint_id, int message, union parameter *param); int release(struct join_relation *relation, int location, int cause); - char c_caller[32]; /* caller number */ - char c_caller_id[32]; /* caller id to signal */ - char c_dialed[1024]; /* dial string of (all) number(s) */ - char c_todial[32]; /* overlap dialing (part not signalled yet) */ - int c_multicause, c_multilocation; + char j_caller[32]; /* caller number */ + char j_caller_id[32]; /* caller id to signal */ + char j_dialed[1024]; /* dial string of (all) number(s) */ + char j_todial[32]; /* overlap dialing (part not signalled yet) */ + int j_multicause, j_multilocation; - int c_pid; /* pid of join to generate bridge id */ - int c_updatebridge; /* bridge must be updated */ - struct join_relation *c_relation; /* list of endpoints that are related to the join */ + int j_pid; /* pid of join to generate bridge id */ + struct lcr_work j_updatebridge; /* bridge must be updated */ + struct join_relation *j_relation; /* list of endpoints that are related to the join */ + + int j_partyline; /* if set, join is conference room */ + int j_partyline_jingle; /* also play jingle on join/leave */ - int c_partyline; /* if set, join is conference room */ + unsigned int j_3pty; /* other join if a 3pty-bridge is requested */ void bridge(void); - void bridge_data(unsigned long epoint_from, struct join_relation *relation_from, union parameter *param); void remove_relation(struct join_relation *relation); struct join_relation *add_relation(void); - int out_setup(unsigned long epoint_id, int message, union parameter *param, char *newnumber); + int out_setup(unsigned int epoint_id, int message, union parameter *param, char *newnumber, char *newkeypad); + void play_jingle(int in); }; -void joinpbx_debug(class JoinPBX *joinpbx, char *function); -int joinpbx_countrelations(unsigned long join_id); +void joinpbx_debug(class JoinPBX *joinpbx, const char *function); +int joinpbx_countrelations(unsigned int join_id); int track_notify(int oldstate, int notify);