X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=sip.h;h=2c5d5efb810a87df0c38c39aa2bb391860a96068;hp=2cfc62d4c9d05abfc4be20473d80fa078107ce28;hb=5566f74eb29be75da44e29ba72ee6f015249ce61;hpb=5463e1b62a39ce417b610584e3d34a8bc30ac15e diff --git a/sip.h b/sip.h index 2cfc62d..2c5d5ef 100644 --- a/sip.h +++ b/sip.h @@ -11,6 +11,8 @@ #include +extern int any_sip_interface; + /* SIP port class */ class Psip : public Port { @@ -22,6 +24,7 @@ class Psip : public Port int message_release(unsigned int epoint_id, int message, union parameter *param); int message_setup(unsigned int epoint_id, int message, union parameter *param); int message_notify(unsigned int epoint_id, int message, union parameter *param); + int message_information(unsigned int epoint_id, int message, union parameter *param); int message_dtmf(unsigned int epoint_id, int message, union parameter *param); void i_invite(int status, char const *phrase, nua_t *nua, nua_magic_t *magic, nua_handle_t *nh, nua_hmagic_t *hmagic, sip_t const *sip, tagi_t tags[]); void i_bye(int status, char const *phrase, nua_t *nua, nua_magic_t *magic, nua_handle_t *nh, nua_hmagic_t *hmagic, sip_t const *sip, tagi_t tags[]); @@ -34,7 +37,6 @@ class Psip : public Port nua_handle_t *p_s_handle; nua_magic_t *p_s_magic; int p_s_rtp_bridge; /* bridge RTP instead of having a local RTP peer */ - uint8_t p_s_rtp_payload_type; unsigned short p_s_rtp_port_local; unsigned short p_s_rtp_port_remote; unsigned int p_s_rtp_ip_local; @@ -62,8 +64,16 @@ class Psip : public Port unsigned char p_s_rxdata[160]; /* receive audio buffer */ int p_s_rxpos; /* position in audio buffer 0..159 */ int bridge_rx(unsigned char *data, int len); - int parse_sdp(sip_t const *sip, unsigned int *ip, unsigned short *port, uint8_t payload_type); + int parse_sdp(sip_t const *sip, unsigned int *ip, unsigned short *port, uint8_t *payload_types, int *media_types, int *payloads, int max_payloads); void rtp_shutdown(void); + + /* audio */ + struct lcr_timer p_s_loadtimer; /* timer for audio transmission */ + virtual void update_load(void); + void load_tx(void); + unsigned int p_s_next_tv_sec; /* time stamp of next expected tx_load call, (to sync audio data) */ + unsigned int p_s_next_tv_usec; + void set_tone(const char *dir, const char *name); }; int sip_init_inst(struct interface *interface);