From 45fd07dc33b5dd845e2b266adda5d24a4d500f96 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 28 Aug 2010 18:22:14 +0800 Subject: nat: Attempt to assign the BSC Timeslot based on a free list Do attempt to not reassign an endpoint immediately but go to the next free one. --- openbsc/include/openbsc/bsc_nat.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'openbsc/include/openbsc/bsc_nat.h') diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index 5f746f237..11c24dc60 100644 --- a/openbsc/include/openbsc/bsc_nat.h +++ b/openbsc/include/openbsc/bsc_nat.h @@ -75,6 +75,10 @@ struct bsc_connection { struct timer_list ping_timeout; struct timer_list pong_timeout; + /* mgcp related code */ + int endpoint_status[33]; + int last_endpoint; + /* a back pointer */ struct bsc_nat *nat; }; @@ -253,7 +257,7 @@ struct sccp_connections *patch_sccp_src_ref_to_msc(struct msgb *, struct bsc_nat * MGCP/Audio handling */ int bsc_write_mgcp(struct bsc_connection *bsc, const uint8_t *data, unsigned int length); -int bsc_mgcp_assign(struct sccp_connections *, struct msgb *msg); +int bsc_mgcp_assign_patch(struct sccp_connections *, struct msgb *msg); void bsc_mgcp_init(struct sccp_connections *); void bsc_mgcp_dlcx(struct sccp_connections *); void bsc_mgcp_free_endpoints(struct bsc_nat *nat); -- cgit v1.2.3 From f7c86c5b4d8f7d909595c0f01fcfaf5da4c4e7c4 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 30 Aug 2010 13:44:32 +0800 Subject: nat: Replace the MGCP Endpoint if that is required Add code to replace the Endpoint number for the mgcp. --- openbsc/include/openbsc/bsc_nat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc/include/openbsc/bsc_nat.h') diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index 11c24dc60..25b6429c4 100644 --- a/openbsc/include/openbsc/bsc_nat.h +++ b/openbsc/include/openbsc/bsc_nat.h @@ -264,7 +264,7 @@ void bsc_mgcp_free_endpoints(struct bsc_nat *nat); int bsc_mgcp_nat_init(struct bsc_nat *nat); struct sccp_connections *bsc_mgcp_find_con(struct bsc_nat *, int endpoint_number); -struct msgb *bsc_mgcp_rewrite(char *input, int length, const char *ip, int port); +struct msgb *bsc_mgcp_rewrite(char *input, int length, int endp, const char *ip, int port); void bsc_mgcp_forward(struct bsc_connection *bsc, struct msgb *msg); void bsc_mgcp_clear_endpoints_for(struct bsc_connection *bsc); -- cgit v1.2.3 From 85902a4d4a53094e8ab4cb242e8de1f6ce431f9e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 1 Sep 2010 09:31:46 +0800 Subject: nat: We have 1 to 31 available to the BSC. --- openbsc/include/openbsc/bsc_nat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc/include/openbsc/bsc_nat.h') diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index 25b6429c4..0c9af9184 100644 --- a/openbsc/include/openbsc/bsc_nat.h +++ b/openbsc/include/openbsc/bsc_nat.h @@ -76,7 +76,7 @@ struct bsc_connection { struct timer_list pong_timeout; /* mgcp related code */ - int endpoint_status[33]; + int endpoint_status[32]; int last_endpoint; /* a back pointer */ -- cgit v1.2.3