Skip to content

Commit

Permalink
Add RTPE owner address to be stored into the call redis storage
Browse files Browse the repository at this point in the history
This will contains the IP address RTPEngine advertised for this call.
  • Loading branch information
guss77 committed Dec 10, 2019
1 parent 8322a8b commit 8e207e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions daemon/redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,8 @@ static void json_restore_call(struct redis *r, const str *callid, enum call_type
c->created_from = call_strdup(c, id.s);
if (!redis_hash_get_str(&id, &call, "created_from_addr"))
sockaddr_parse_any_str(&c->created_from_addr, &id);
if (!redis_hash_get_str(&id, &call, "rtpe_connection_addr"))
call_str_cpy(c, &c->rtpe_connection_addr, &id);
if (!redis_hash_get_int(&i, &call, "block_dtmf"))
c->block_dtmf = i ? 1 : 0;
if (!redis_hash_get_int(&i, &call, "block_media"))
Expand Down Expand Up @@ -1879,6 +1881,7 @@ char* redis_encode_json(struct call *c) {
JSON_SET_SIMPLE("ml_deleted","%ld",(long int) c->ml_deleted);
JSON_SET_SIMPLE_CSTR("created_from",c->created_from);
JSON_SET_SIMPLE_CSTR("created_from_addr",sockaddr_print_buf(&c->created_from_addr));
JSON_SET_SIMPLE_STR("rtpe_connection_addr", &c->rtpe_connection_addr);
JSON_SET_SIMPLE("redis_hosted_db","%u",c->redis_hosted_db);
JSON_SET_SIMPLE_STR("recording_metadata",&c->metadata);
JSON_SET_SIMPLE("block_dtmf","%i",c->block_dtmf ? 1 : 0);
Expand Down
3 changes: 2 additions & 1 deletion include/call.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ struct call {
char *created_from;
sockaddr_t created_from_addr;
sockaddr_t xmlrpc_callback;

str rtpe_connection_addr;

unsigned int redis_hosted_db;
unsigned int foreign_call; // created_via_redis_notify call

Expand Down

0 comments on commit 8e207e0

Please sign in to comment.