X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=gsm.h;h=f14794fa8290a5bc5b9f79c95960b1a761079071;hp=724a4c20b01857bc27bc7142f4b9cf77074eaf19;hb=refs%2Fheads%2Fbackup2;hpb=03e00d7b37e755a4644739cdc5e3903d72c8e8d6;ds=sidebyside diff --git a/gsm.h b/gsm.h index 724a4c2..f14794f 100644 --- a/gsm.h +++ b/gsm.h @@ -16,8 +16,8 @@ enum { struct lcr_gsm { char interface_name[64]; /* name of interface this instance is associated to */ - struct lcr_gsm *gsm_ms_next; /* list of MS instances, in case of MS */ - char name[16]; /* name of MS instance, in case of MS */ + struct lcr_gsm *gsm_next; /* list of MS/BS instances */ + char name[16]; /* name of MS/BS instance */ int type; /* LCR_GSM_TYPE_*/ struct lcr_fd mncc_lfd; /* Unix domain socket to OpenBSC MNCC */ @@ -34,7 +34,7 @@ class Pgsm : public Port Pgsm(int type, char *portname, struct port_settings *settings, struct interface *interface); ~Pgsm(); - char p_g_interface_name[64]; + signed short p_g_samples[160]; /* last received audi packet */ int p_g_tones; /* set, if tones are to be generated */ int p_g_earlyb; /* set, if patterns are available */ struct lcr_gsm *p_g_lcr_gsm; /* pointer to network/ms instance */ @@ -48,21 +48,31 @@ class Pgsm : public Port struct lcr_msg *p_g_notify_pending; /* queue for NOTIFY if not connected */ struct lcr_msg *p_g_setup_pending; /* queue SETUP until RTP is created */ struct lcr_msg *p_g_connect_pending; /* queue CONNECT until RTP is created and connected */ - void *p_g_encoder, *p_g_decoder; /* gsm handle */ + void *p_g_fr_encoder, *p_g_fr_decoder; /* gsm handle */ + void *p_g_hr_encoder, *p_g_hr_decoder; /* gsm handle */ + void *p_g_amr_encoder, *p_g_amr_decoder;/* gsm handle */ + int p_g_amr_cmr, p_g_amr_cmr_valid; signed short p_g_rxdata[160]; /* receive audio buffer */ int p_g_rxpos; /* position in audio buffer 0..159 */ int p_g_tch_connected; /* indicates if audio is connected */ + int p_g_media_type; /* current payload type or 0 if not set */ + int p_g_payload_type; /* current payload type */ int p_g_rtp_bridge; /* if we use a bridge */ unsigned int p_g_rtp_ip_remote; /* stores ip */ unsigned short p_g_rtp_port_remote; /* stores port */ + int p_g_rtp_payloads; + int p_g_rtp_media_types[8]; + unsigned char p_g_rtp_payload_types[8]; - void frame_send(void *_frame); + void frame_send(void *_frame, int len, int msg_type); void frame_receive(void *_frame); + int audio_send(unsigned char *data, int len); int bridge_rx(unsigned char *data, int len); + void send_mncc_rtp_connect(void); int hunt_bchannel(void); - void call_conf_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *gsm); + void modify_lchan(int media_type); void call_proc_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc); void alert_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc); void setup_cnf(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc);