Philipp Maier | c66ab2c | 2020-06-02 20:55:34 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | struct mgcp_trunk { |
| 4 | struct llist_head entry; |
| 5 | |
| 6 | struct mgcp_config *cfg; |
| 7 | |
| 8 | int trunk_nr; |
| 9 | int trunk_type; |
| 10 | |
| 11 | char *audio_fmtp_extra; |
Philipp Maier | c66ab2c | 2020-06-02 20:55:34 +0200 | [diff] [blame] | 12 | int audio_send_ptime; |
| 13 | int audio_send_name; |
| 14 | int audio_loop; |
| 15 | |
| 16 | int no_audio_transcoding; |
| 17 | |
| 18 | int omit_rtcp; |
| 19 | int keepalive_interval; |
| 20 | |
| 21 | /* RTP patching */ |
| 22 | int force_constant_ssrc; /* 0: don't, 1: once */ |
| 23 | int force_aligned_timing; |
| 24 | bool rfc5993_hr_convert; |
| 25 | |
| 26 | /* spec handling */ |
| 27 | int force_realloc; |
| 28 | |
| 29 | /* timer */ |
| 30 | struct osmo_timer_list keepalive_timer; |
| 31 | |
| 32 | /* When set, incoming RTP packets are not filtered |
| 33 | * when ports and ip-address do not match (debug) */ |
| 34 | int rtp_accept_all; |
| 35 | |
| 36 | unsigned int number_endpoints; |
| 37 | unsigned int vty_number_endpoints; |
| 38 | struct mgcp_endpoint **endpoints; |
| 39 | |
| 40 | /* global rate counters to measure the trunks overall performance and health */ |
| 41 | struct mgcp_ratectr_trunk ratectr; |
| 42 | }; |
| 43 | |
| 44 | struct mgcp_trunk *mgcp_trunk_alloc(struct mgcp_config *cfg, enum mgcp_trunk_type ttype, int nr); |
| 45 | int mgcp_trunk_alloc_endpts(struct mgcp_trunk *tcfg); |
| 46 | struct mgcp_trunk *mgcp_trunk_by_num(const struct mgcp_config *cfg, int index); |
| 47 | struct mgcp_trunk *mgcp_trunk_by_name(const struct mgcp_config *cfg, const char *epname); |