Browse Source

Added flag 'no-redis-update'

This flag can be used by the signaling proxy in order to tell rtpengine not to persist the call into Redis upon receiving offer/answer() control commands
pull/295/head
Pawel Kuzak 9 years ago
parent
commit
65e80f620d
2 changed files with 7 additions and 1 deletions
  1. +6
    -1
      daemon/call_interfaces.c
  2. +1
    -0
      daemon/call_interfaces.h

+ 6
- 1
daemon/call_interfaces.c View File

@ -542,6 +542,8 @@ static void call_ng_process_flags(struct sdp_ng_flags *out, bencode_item_t *inpu
out->trust_address = 0; out->trust_address = 0;
else if (!bencode_strcmp(it, "asymmetric")) else if (!bencode_strcmp(it, "asymmetric"))
out->asymmetric = 1; out->asymmetric = 1;
else if (!bencode_strcmp(it, "no-redis-update"))
out->no_redis_update = 1;
else if (!bencode_strcmp(it, "unidirectional")) else if (!bencode_strcmp(it, "unidirectional"))
out->unidirectional = 1; out->unidirectional = 1;
else if (!bencode_strcmp(it, "strict-source")) else if (!bencode_strcmp(it, "strict-source"))
@ -761,7 +763,10 @@ static const char *call_offer_answer_ng(bencode_item_t *input, struct callmaster
} }
rwlock_unlock_w(&call->master_lock); rwlock_unlock_w(&call->master_lock);
redis_update(call, m->conf.redis_write);
if (!flags.no_redis_update)
redis_update(call, m->conf.redis_write);
else
ilog(LOG_DEBUG, "Not updating Redis due to present no-redis-update flag");
obj_put(call); obj_put(call);
gettimeofday(&(monologue->started), NULL); gettimeofday(&(monologue->started), NULL);


+ 1
- 0
daemon/call_interfaces.h View File

@ -33,6 +33,7 @@ struct sdp_ng_flags {
str record_call_str; str record_call_str;
str metadata; str metadata;
int asymmetric:1, int asymmetric:1,
no_redis_update:1,
unidirectional:1, unidirectional:1,
trust_address:1, trust_address:1,
port_latching:1, port_latching:1,


Loading…
Cancel
Save