Skip to content

Commit 8e207e0

Browse files
committed
Add RTPE owner address to be stored into the call redis storage
This will contains the IP address RTPEngine advertised for this call.
1 parent 8322a8b commit 8e207e0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

daemon/redis.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,6 +1596,8 @@ static void json_restore_call(struct redis *r, const str *callid, enum call_type
15961596
c->created_from = call_strdup(c, id.s);
15971597
if (!redis_hash_get_str(&id, &call, "created_from_addr"))
15981598
sockaddr_parse_any_str(&c->created_from_addr, &id);
1599+
if (!redis_hash_get_str(&id, &call, "rtpe_connection_addr"))
1600+
call_str_cpy(c, &c->rtpe_connection_addr, &id);
15991601
if (!redis_hash_get_int(&i, &call, "block_dtmf"))
16001602
c->block_dtmf = i ? 1 : 0;
16011603
if (!redis_hash_get_int(&i, &call, "block_media"))
@@ -1879,6 +1881,7 @@ char* redis_encode_json(struct call *c) {
18791881
JSON_SET_SIMPLE("ml_deleted","%ld",(long int) c->ml_deleted);
18801882
JSON_SET_SIMPLE_CSTR("created_from",c->created_from);
18811883
JSON_SET_SIMPLE_CSTR("created_from_addr",sockaddr_print_buf(&c->created_from_addr));
1884+
JSON_SET_SIMPLE_STR("rtpe_connection_addr", &c->rtpe_connection_addr);
18821885
JSON_SET_SIMPLE("redis_hosted_db","%u",c->redis_hosted_db);
18831886
JSON_SET_SIMPLE_STR("recording_metadata",&c->metadata);
18841887
JSON_SET_SIMPLE("block_dtmf","%i",c->block_dtmf ? 1 : 0);

include/call.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@ struct call {
383383
char *created_from;
384384
sockaddr_t created_from_addr;
385385
sockaddr_t xmlrpc_callback;
386-
386+
str rtpe_connection_addr;
387+
387388
unsigned int redis_hosted_db;
388389
unsigned int foreign_call; // created_via_redis_notify call
389390

0 commit comments

Comments
 (0)