From 6f6801066bb5890c628d719a864602041644ae62 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 18 Sep 2010 20:40:22 +0800 Subject: mgcp: Keep the gw_fd inside the mgcp_config Move the bfd from a static var into the mgcp_config. --- openbsc/include/openbsc/mgcp.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h index 0a0032211..00c5071a3 100644 --- a/openbsc/include/openbsc/mgcp.h +++ b/openbsc/include/openbsc/mgcp.h @@ -25,6 +25,7 @@ #define OPENBSC_MGCP_H #include +#include #include "debug.h" @@ -114,6 +115,8 @@ struct mgcp_config { int audio_payload; int audio_loop; + struct write_queue gw_fd; + struct mgcp_port_range bts_ports; struct mgcp_port_range net_ports; int endp_dscp; -- cgit v1.2.3 From 249d69a26c5bfdb3adedfa1d822861a200082033 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 18 Sep 2010 21:13:54 +0800 Subject: nat: Use the write_queue inside the CFG. --- openbsc/include/openbsc/bsc_nat.h | 1 - 1 file changed, 1 deletion(-) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index 6b2a09940..ff0ee484c 100644 --- a/openbsc/include/openbsc/bsc_nat.h +++ b/openbsc/include/openbsc/bsc_nat.h @@ -190,7 +190,6 @@ struct bsc_nat { /* MGCP config */ struct mgcp_config *mgcp_cfg; - struct write_queue mgcp_queue; uint8_t mgcp_msg[4096]; int mgcp_length; -- cgit v1.2.3 From a2a10ebf033e618ec9dc69d8d9089940f540a3a7 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 17 Sep 2010 03:58:52 +0800 Subject: mgcp: Add a transcoder-mgw command to store the address --- openbsc/include/openbsc/mgcp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h index 00c5071a3..3f76f6c73 100644 --- a/openbsc/include/openbsc/mgcp.h +++ b/openbsc/include/openbsc/mgcp.h @@ -109,8 +109,10 @@ struct mgcp_config { unsigned int number_endpoints; char *bts_ip; char *call_agent_addr; + char *transcoder_ip; struct in_addr bts_in; + struct in_addr transcoder_in; char *audio_name; int audio_payload; int audio_loop; -- cgit v1.2.3 From 54aaa0fbedf6a966b3cabd6585c987969c4c13d4 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 17 Sep 2010 23:35:53 +0800 Subject: mgcp: Add ports for the transcoder as well --- openbsc/include/openbsc/mgcp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h index 3f76f6c73..0e45f521d 100644 --- a/openbsc/include/openbsc/mgcp.h +++ b/openbsc/include/openbsc/mgcp.h @@ -121,6 +121,7 @@ struct mgcp_config { struct mgcp_port_range bts_ports; struct mgcp_port_range net_ports; + struct mgcp_port_range transcoder_ports; int endp_dscp; /* spec handling */ -- cgit v1.2.3 From 218f8564e1d68c544ff453a4da67fcb24d302e40 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 18 Sep 2010 02:30:02 +0800 Subject: mgcp: Forward data from the BTS-in to the transcoder Bind a new port for the transcoder, forward data from the BTS to the transcoder, and from the transcoder to the network. Leave BTS-IN where it is, BTS-OUT can now be after the transcoding took place. We send the data from the BTS RTP port. This whole route will be guarded by the transcoder_ip and if it is NULL (current default) it will not go through the transcoder. --- openbsc/include/openbsc/mgcp_internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h index 12e3ad9b1..7c5badc92 100644 --- a/openbsc/include/openbsc/mgcp_internal.h +++ b/openbsc/include/openbsc/mgcp_internal.h @@ -98,6 +98,7 @@ struct mgcp_endpoint { /* port status for bts/net */ struct mgcp_rtp_end bts_end; struct mgcp_rtp_end net_end; + struct mgcp_rtp_end transcoder_end; /* sequence bits */ struct mgcp_rtp_state net_state; @@ -123,6 +124,7 @@ int mgcp_analyze_header(struct mgcp_config *cfg, struct msgb *msg, int mgcp_send_dummy(struct mgcp_endpoint *endp); int mgcp_bind_bts_rtp_port(struct mgcp_endpoint *endp, int rtp_port); int mgcp_bind_net_rtp_port(struct mgcp_endpoint *endp, int rtp_port); +int mgcp_bind_transcoder_rtp_port(struct mgcp_endpoint *enp, int rtp_port); int mgcp_free_rtp_port(struct mgcp_rtp_end *end); #endif -- cgit v1.2.3 From b98ba72e0a413a9d325fa8ed20cb77d28d472e2f Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 19 Sep 2010 04:21:39 +0800 Subject: mgcp: Make the base port of the transcoder configurable The code assumes a static mapping from endpoint to RTP port, be able to configure the start of such a mapping. --- openbsc/include/openbsc/mgcp.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h index 0e45f521d..4adea96b8 100644 --- a/openbsc/include/openbsc/mgcp.h +++ b/openbsc/include/openbsc/mgcp.h @@ -109,14 +109,17 @@ struct mgcp_config { unsigned int number_endpoints; char *bts_ip; char *call_agent_addr; - char *transcoder_ip; struct in_addr bts_in; - struct in_addr transcoder_in; char *audio_name; int audio_payload; int audio_loop; + /* transcoder handling */ + char *transcoder_ip; + struct in_addr transcoder_in; + int transcoder_remote_base; + struct write_queue gw_fd; struct mgcp_port_range bts_ports; -- cgit v1.2.3 From f2eedff052bd7f92655a32d5a57206018b310aec Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 19 Sep 2010 04:36:07 +0800 Subject: nat: Send a transcoder reset on start up. The transcoder RESET is using the same extensions to reset all endpoints on a remote site. This makes sure that all allocations can be made in a properly configured network. --- openbsc/include/openbsc/mgcp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h index 4adea96b8..850396a8a 100644 --- a/openbsc/include/openbsc/mgcp.h +++ b/openbsc/include/openbsc/mgcp.h @@ -146,6 +146,7 @@ int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg); int mgcp_vty_init(void); int mgcp_endpoints_allocate(struct mgcp_config *cfg); void mgcp_free_endp(struct mgcp_endpoint *endp); +int mgcp_reset_transcoder(struct mgcp_config *cfg); /* * format helper functions -- cgit v1.2.3