diff options
Diffstat (limited to 'src/router/call.h')
-rw-r--r-- | src/router/call.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/router/call.h b/src/router/call.h index 580f267..e782c26 100644 --- a/src/router/call.h +++ b/src/router/call.h @@ -21,6 +21,8 @@ enum call_state { #include "routing.h" +#define MAX_CODECS 8 + /* relation to upper layer */ typedef struct call_relation { struct call_relation *next; @@ -39,6 +41,8 @@ typedef struct call_relation { int rtp_proxy; osmo_cc_session_t *cc_session; int codec_negotiated; + struct osmo_cc_helper_audio_codecs orig_codecs[MAX_CODECS + 1]; /* codecs for originator */ + struct osmo_cc_helper_audio_codecs term_codecs[MAX_CODECS + 1]; /* codecs for terminator, stored at relation of originator */ osmo_cc_session_codec_t *codec; wave_play_t play; /* play a wave file */ @@ -48,6 +52,7 @@ typedef struct call_relation { wave_rec_t rec; /* record a wave file */ dtmf_dec_t dtmf_dec; /* dtmf decoder */ int dtmf_dec_enable;/* feed decoder with data */ + int te_started; /* we got a digit via telephone-event */ } call_relation_t; /* call instance */ @@ -77,8 +82,16 @@ typedef struct call { extern call_t *call_list; +struct telephone_event { + uint8_t event; + uint8_t e, r; + uint8_t volume; + uint16_t duration; +}; + int call_init(osmo_cc_endpoint_t *ep, const char *_routing_script, const char *_routing_shell); void call_exit(void); int call_handle(void); void cc_message(osmo_cc_endpoint_t *ep, uint32_t callref, osmo_cc_msg_t *msg); +void telephone_event(call_relation_t *relation, struct telephone_event *te); |