- avoid confusion in printed log messges
... | ... |
@@ -42,13 +42,16 @@ void *rtpengine_cfg = &default_rtpengine_cfg; |
42 | 42 |
|
43 | 43 |
cfg_def_t rtpengine_cfg_def[] = { |
44 | 44 |
{"rtpengine_disable_tout", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0, |
45 |
- "The time after which rtpengine will try to communicate to an RTP proxy after it has been marked disabled automatically. "}, |
|
45 |
+ "The time after which rtpengine module will try to communicate" |
|
46 |
+ " with an RTPEngine instance after it has been marked disabled automatically. "}, |
|
46 | 47 |
{"aggressive_redetection", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0, |
47 |
- "Determines if the sip proxy should force a query of all nodes when all RTP proxies seem unavailable."}, |
|
48 |
+ "Determines if the sip proxy should force a query of all nodes" |
|
49 |
+ " when all RTPEngine instances seem unavailable."}, |
|
48 | 50 |
{"rtpengine_tout_ms", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0, |
49 |
- "The total number of nodes inside a set to be queried before giving up establishing a session"}, |
|
51 |
+ "The total number of nodes inside a set to be queried before giving up" |
|
52 |
+ " establishing a session"}, |
|
50 | 53 |
{"queried_nodes_limit", CFG_VAR_INT | CFG_ATOMIC, 0, MAX_RTPP_TRIED_NODES, 0, 0, |
51 |
- "Timeout value expressed in milliseconds in waiting for reply from RTP proxy"}, |
|
54 |
+ "Timeout value expressed in milliseconds to wait for reply from RTPEngine"}, |
|
52 | 55 |
{"rtpengine_retr", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0, |
53 | 56 |
"How many times the module should retry to send and receive after timeout was generated"}, |
54 | 57 |
{0, 0, 0, 0, 0, 0} |
... | ... |
@@ -256,7 +256,7 @@ static char ** rtpp_strings=0; |
256 | 256 |
static int rtpp_sets=0; /*used in rtpengine_set_store()*/ |
257 | 257 |
static int rtpp_set_count = 0; |
258 | 258 |
static unsigned int current_msg_id = (unsigned int)-1; |
259 |
-/* RTP proxy balancing list */ |
|
259 |
+/* RTPEngine balancing list */ |
|
260 | 260 |
static struct rtpp_set_head * rtpp_set_list =0; |
261 | 261 |
static struct rtpp_set * active_rtpp_set =0; |
262 | 262 |
static struct rtpp_set * selected_rtpp_set_1 =0; |
... | ... |
@@ -861,7 +861,7 @@ struct rtpp_set *get_rtpp_set(unsigned int set_id) |
861 | 861 |
if(!rtpp_list) |
862 | 862 |
{ |
863 | 863 |
lock_release(rtpp_set_list->rset_head_lock); |
864 |
- LM_ERR("no shm memory left to create new rtpproxy set %u\n", my_current_id); |
|
864 |
+ LM_ERR("no shm memory left to create new rtpengine set %u\n", my_current_id); |
|
865 | 865 |
return NULL; |
866 | 866 |
} |
867 | 867 |
memset(rtpp_list, 0, sizeof(struct rtpp_set)); |
... | ... |
@@ -869,14 +869,14 @@ struct rtpp_set *get_rtpp_set(unsigned int set_id) |
869 | 869 |
rtpp_list->rset_lock = lock_alloc(); |
870 | 870 |
if (!rtpp_list->rset_lock) { |
871 | 871 |
lock_release(rtpp_set_list->rset_head_lock); |
872 |
- LM_ERR("no shm memory left to create rtpproxy set lock\n"); |
|
872 |
+ LM_ERR("no shm memory left to create rtpengine set lock\n"); |
|
873 | 873 |
shm_free(rtpp_list); |
874 | 874 |
rtpp_list = NULL; |
875 | 875 |
return NULL; |
876 | 876 |
} |
877 | 877 |
if (lock_init(rtpp_list->rset_lock) == 0) { |
878 | 878 |
lock_release(rtpp_set_list->rset_head_lock); |
879 |
- LM_ERR("could not init rtpproxy set lock\n"); |
|
879 |
+ LM_ERR("could not init rtpengine set lock\n"); |
|
880 | 880 |
lock_dealloc((void*)rtpp_list->rset_lock); |
881 | 881 |
rtpp_list->rset_lock = NULL; |
882 | 882 |
shm_free(rtpp_list); |
... | ... |
@@ -914,17 +914,17 @@ struct rtpp_set *get_rtpp_set(unsigned int set_id) |
914 | 914 |
} |
915 | 915 |
|
916 | 916 |
|
917 |
-int add_rtpengine_socks(struct rtpp_set * rtpp_list, char * rtpproxy, |
|
917 |
+int add_rtpengine_socks(struct rtpp_set *rtpp_list, char *rtpengine, |
|
918 | 918 |
unsigned int weight, int disabled, unsigned int ticks, int isDB) |
919 | 919 |
{ |
920 |
- /* Make rtp proxies list. */ |
|
920 |
+ /* Make rtpengine instances list. */ |
|
921 | 921 |
char *p, *p1, *p2, *plim; |
922 | 922 |
struct rtpp_node *pnode; |
923 | 923 |
struct rtpp_node *rtpp_node; |
924 | 924 |
unsigned int local_weight, port; |
925 | 925 |
str s1; |
926 | 926 |
|
927 |
- p = rtpproxy; |
|
927 |
+ p = rtpengine; |
|
928 | 928 |
plim = p + strlen(p); |
929 | 929 |
|
930 | 930 |
for(;;) { |
... | ... |
@@ -1099,7 +1099,7 @@ static int rtpengine_add_rtpengine_set(char * rtp_proxies, unsigned int weight, |
1099 | 1099 |
rtp_proxies = strstr(p, "=="); |
1100 | 1100 |
if(rtp_proxies){ |
1101 | 1101 |
if(*(rtp_proxies +2)=='\0'){ |
1102 |
- LM_ERR("script error -invalid rtp proxy list!\n"); |
|
1102 |
+ LM_ERR("script error -invalid rtpengine list!\n"); |
|
1103 | 1103 |
return -1; |
1104 | 1104 |
} |
1105 | 1105 |
|
... | ... |
@@ -1251,7 +1251,7 @@ static void rtpengine_rpc_reload(rpc_t* rpc, void* ctx) |
1251 | 1251 |
} |
1252 | 1252 |
_rtpe_list_version->vertime = tnow; |
1253 | 1253 |
|
1254 |
- if (init_rtpproxy_db() < 0) { |
|
1254 |
+ if (init_rtpengine_db() < 0) { |
|
1255 | 1255 |
// fail reloading from database |
1256 | 1256 |
rpc->fault(ctx, 500, "Failed reloading db"); |
1257 | 1257 |
return; |
... | ... |
@@ -1599,14 +1599,14 @@ mod_init(void) |
1599 | 1599 |
} |
1600 | 1600 |
|
1601 | 1601 |
if (lock_init(rtpp_set_list->rset_head_lock) == 0) { |
1602 |
- LM_ERR("could not init rtpproxy list of proxysets lock\n"); |
|
1602 |
+ LM_ERR("could not init lock sets for rtpengine list\n"); |
|
1603 | 1603 |
return -1; |
1604 | 1604 |
} |
1605 | 1605 |
} |
1606 | 1606 |
|
1607 | 1607 |
if (rtpp_db_url.s == NULL) |
1608 | 1608 |
{ |
1609 |
- /* storing the list of rtp proxy sets in shared memory*/ |
|
1609 |
+ /* storing the list of rtpengine sets in shared memory*/ |
|
1610 | 1610 |
for(i=0;i<rtpp_sets;i++){ |
1611 | 1611 |
if(rtpengine_add_rtpengine_set(rtpp_strings[i], 1, 0, 0) !=0){ |
1612 | 1612 |
for(;i<rtpp_sets;i++) |
... | ... |
@@ -1621,10 +1621,10 @@ mod_init(void) |
1621 | 1621 |
} |
1622 | 1622 |
else |
1623 | 1623 |
{ |
1624 |
- LM_INFO("Loading rtp proxy definitions from DB\n"); |
|
1625 |
- if ( init_rtpproxy_db() < 0) |
|
1624 |
+ LM_INFO("Loading rtpengine definitions from DB\n"); |
|
1625 |
+ if ( init_rtpengine_db() < 0) |
|
1626 | 1626 |
{ |
1627 |
- LM_ERR("error while loading rtp proxies from database\n"); |
|
1627 |
+ LM_ERR("error while loading rtpengine instances from database\n"); |
|
1628 | 1628 |
return -1; |
1629 | 1629 |
} |
1630 | 1630 |
} |
... | ... |
@@ -1879,7 +1879,7 @@ static int build_rtpp_socks(int lmode, int rtest) { |
1879 | 1879 |
} |
1880 | 1880 |
|
1881 | 1881 |
if (connect(rtpp_socks[pnode->idx], res->ai_addr, res->ai_addrlen) == -1) { |
1882 |
- LM_ERR("can't connect to a RTP proxy\n"); |
|
1882 |
+ LM_ERR("can't connect to a RTPEngine instance\n"); |
|
1883 | 1883 |
close(rtpp_socks[pnode->idx]); |
1884 | 1884 |
rtpp_socks[pnode->idx] = -1; |
1885 | 1885 |
freeaddrinfo(res); |
... | ... |
@@ -1967,7 +1967,7 @@ child_init(int rank) |
1967 | 1967 |
} |
1968 | 1968 |
memset(queried_nodes_ptr, 0, MAX_RTPP_TRIED_NODES * sizeof(struct rtpp_node*)); |
1969 | 1969 |
|
1970 |
- /* Iterate known RTP proxies - create sockets */ |
|
1970 |
+ /* Iterate known RTPEngine instances - create sockets */ |
|
1971 | 1971 |
if(rank==PROC_SIPINIT) { |
1972 | 1972 |
/* probe rtpengines only in first worker */ |
1973 | 1973 |
if (build_rtpp_socks(0, 1)) |
... | ... |
@@ -2774,7 +2774,7 @@ rtpp_test(struct rtpp_node *node, int isdisabled, int force) |
2774 | 2774 |
goto error; |
2775 | 2775 |
} |
2776 | 2776 |
|
2777 |
- LM_INFO("rtp proxy <%s> found, support for it %senabled\n", |
|
2777 |
+ LM_INFO("rtpengine instance <%s> found, support for it %senabled\n", |
|
2778 | 2778 |
node->rn_url.s, force == 0 ? "re-" : ""); |
2779 | 2779 |
|
2780 | 2780 |
bencode_buffer_free(&bencbuf); |
... | ... |
@@ -2823,7 +2823,7 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen) |
2823 | 2823 |
} |
2824 | 2824 |
if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) { |
2825 | 2825 |
close(fd); |
2826 |
- LM_ERR("can't connect to RTP proxy <%s>\n", node->rn_url.s); |
|
2826 |
+ LM_ERR("can't connect to RTPEngine <%s>\n", node->rn_url.s); |
|
2827 | 2827 |
goto badproxy; |
2828 | 2828 |
} |
2829 | 2829 |
|
... | ... |
@@ -2832,7 +2832,7 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen) |
2832 | 2832 |
} while (len == -1 && errno == EINTR); |
2833 | 2833 |
if (len <= 0) { |
2834 | 2834 |
close(fd); |
2835 |
- LM_ERR("can't send command to RTP proxy <%s>\n", node->rn_url.s); |
|
2835 |
+ LM_ERR("can't send command to RTPEngine <%s>\n", node->rn_url.s); |
|
2836 | 2836 |
goto badproxy; |
2837 | 2837 |
} |
2838 | 2838 |
do { |
... | ... |
@@ -2840,7 +2840,7 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen) |
2840 | 2840 |
} while (len == -1 && errno == EINTR); |
2841 | 2841 |
close(fd); |
2842 | 2842 |
if (len <= 0) { |
2843 |
- LM_ERR("can't read reply from RTP proxy <%s>\n", node->rn_url.s); |
|
2843 |
+ LM_ERR("can't read reply from RTPEngine <%s>\n", node->rn_url.s); |
|
2844 | 2844 |
goto badproxy; |
2845 | 2845 |
} |
2846 | 2846 |
} else { |
... | ... |
@@ -2863,7 +2863,7 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen) |
2863 | 2863 |
} while (len == -1 && (errno == EINTR || errno == ENOBUFS)); |
2864 | 2864 |
if (len <= 0) { |
2865 | 2865 |
bencode_get_str(bencode_dictionary_get(dict, "command"), &cmd); |
2866 |
- LM_ERR("can't send command \"%.*s\" to RTP proxy <%s>\n", |
|
2866 |
+ LM_ERR("can't send command \"%.*s\" to RTPEngine <%s>\n", |
|
2867 | 2867 |
cmd.len, cmd.s, node->rn_url.s); |
2868 | 2868 |
goto badproxy; |
2869 | 2869 |
} |
... | ... |
@@ -2875,7 +2875,7 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen) |
2875 | 2875 |
} while (len == -1 && errno == EINTR); |
2876 | 2876 |
if (len <= 0) { |
2877 | 2877 |
bencode_get_str(bencode_dictionary_get(dict, "command"), &cmd); |
2878 |
- LM_ERR("can't read reply for command \"%.*s\" from RTP proxy <%s>\n", |
|
2878 |
+ LM_ERR("can't read reply for command \"%.*s\" from RTPEngine <%s>\n", |
|
2879 | 2879 |
cmd.len, cmd.s, node->rn_url.s); |
2880 | 2880 |
goto badproxy; |
2881 | 2881 |
} |
... | ... |
@@ -2894,7 +2894,7 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen) |
2894 | 2894 |
} |
2895 | 2895 |
if (i == rtpengine_retr) { |
2896 | 2896 |
bencode_get_str(bencode_dictionary_get(dict, "command"), &cmd); |
2897 |
- LM_ERR("timeout waiting reply for command \"%.*s\" from RTP proxy <%s>\n", |
|
2897 |
+ LM_ERR("timeout waiting reply for command \"%.*s\" from RTPEngine <%s>\n", |
|
2898 | 2898 |
cmd.len, cmd.s, node->rn_url.s); |
2899 | 2899 |
goto badproxy; |
2900 | 2900 |
} |
... | ... |
@@ -3212,7 +3212,7 @@ set_rtpengine_set_from_avp(struct sip_msg *msg, int direction) |
3212 | 3212 |
|
3213 | 3213 |
active_rtpp_set = select_rtpp_set(setid_val.n); |
3214 | 3214 |
if(active_rtpp_set == NULL) { |
3215 |
- LM_ERR("could not locate rtpproxy set %u\n", setid_val.n); |
|
3215 |
+ LM_ERR("could not locate engine set %u\n", setid_val.n); |
|
3216 | 3216 |
return -1; |
3217 | 3217 |
} |
3218 | 3218 |
|
... | ... |
@@ -86,14 +86,15 @@ struct rtpp_set_head { |
86 | 86 |
|
87 | 87 |
struct rtpp_node *get_rtpp_node(struct rtpp_set *rtpp_list, str *url); |
88 | 88 |
struct rtpp_set *get_rtpp_set(unsigned int set_id); |
89 |
-int add_rtpengine_socks(struct rtpp_set * rtpp_list, char * rtpproxy, unsigned int weight, int disabled, unsigned int ticks, int isDB); |
|
89 |
+int add_rtpengine_socks(struct rtpp_set *rtpp_list, char *rtpengine, |
|
90 |
+ unsigned int weight, int disabled, unsigned int ticks, int isDB); |
|
90 | 91 |
|
91 | 92 |
int rtpengine_delete_node(struct rtpp_node *rtpp_node); |
92 | 93 |
int rtpengine_delete_node_set(struct rtpp_set *rtpp_list); |
93 | 94 |
int rtpengine_delete_node_all(); |
94 | 95 |
|
95 | 96 |
|
96 |
-int init_rtpproxy_db(void); |
|
97 |
+int init_rtpengine_db(void); |
|
97 | 98 |
|
98 | 99 |
extern str rtpp_db_url; |
99 | 100 |
extern str rtpp_table_name; |
... | ... |
@@ -97,7 +97,7 @@ static int rtpp_load_db(void) |
97 | 97 |
rows = RES_ROWS(res); |
98 | 98 |
if (n_rows == 0) |
99 | 99 |
{ |
100 |
- LM_WARN("No rtpproxy instances in database\n"); |
|
100 |
+ LM_WARN("No rtpengine instances in database\n"); |
|
101 | 101 |
rtpp_dbf.free_result(rtpp_db_handle, res); |
102 | 102 |
return 0; |
103 | 103 |
} |
... | ... |
@@ -137,7 +137,7 @@ static int rtpp_load_db(void) |
137 | 137 |
return 0; |
138 | 138 |
} |
139 | 139 |
|
140 |
-int init_rtpproxy_db(void) |
|
140 |
+int init_rtpengine_db(void) |
|
141 | 141 |
{ |
142 | 142 |
int ret; |
143 | 143 |
if (rtpp_db_url.s == NULL) |