Skip to content

Commit

Permalink
cleanup the kamailio bindings (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
k-anderson authored and lazedo committed Jun 7, 2017
1 parent ff214ec commit be38fa7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions kamailio/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -827,36 +827,36 @@ event_route[kazoo:mod-init]
###
###

$var(payload) = '{ "exchange" : "dialoginfo" , "type" : "direct", "queue" : "BLF-QUEUE-MY_HOSTNAME", "routing" : "BLF-MY_HOSTNAME", "queue-def" : {"durable" : 1}, "no_ack" : 0, "wait_for_consumer_ack" : 1 }';
$var(payload) = "{ 'exchange' : 'dialoginfo', 'type' : 'direct', 'queue' : 'BLF-QUEUE-MY_HOSTNAME', 'routing' : 'BLF-MY_HOSTNAME', 'queue-def' : {'durable' : 1}, 'no_ack' : 0 }";
kazoo_subscribe("$var(payload)");

#!endif

#!ifdef MESSAGE_ROLE

$var(key) = "kamailio@MY_HOSTNAME";
$var(payload) = '{ "exchange" : "sms" , "type" : "topic", "queue" : "MSG-QUEUE-MY_HOSTNAME", "routing" : "message.route.' + $(var(key){kz.encode}) + '.*", "queue-def" : {"auto_delete" : 1}, "no_ack" : 0, "wait_for_consumer_ack" : 1 }';
$var(payload) = "{ 'exchange' : 'sms' , 'type' : 'topic', 'queue' : 'MSG-QUEUE-MY_HOSTNAME', 'routing' : 'message.route." + $(var(key){kz.encode}) + ".*', 'no_ack' : 0 }";
kazoo_subscribe("$var(payload)");

#!endif

#!ifdef DISPATCHER_ROLE

$var(payload) = "{ 'exchange' : 'registrar' , 'type' : 'topic', 'queue' : 'MSG-FLUSH-MY_HOSTNAME', 'routing' : 'registration.flush.*', 'federate' : 1, 'queue-def' : {'auto_delete' : 1}, 'no_ack' : 1, 'wait_for_consumer_ack' : 0 }";
$var(payload) = "{ 'exchange' : 'registrar' , 'type' : 'topic', 'queue' : 'MSG-FLUSH-MY_HOSTNAME', 'routing' : 'registration.flush.*', 'federate' : 1 }";
kazoo_subscribe("$var(payload)");

#!endif

#!ifdef REGISTRAR_SYNC_ROLE

$var(payload) = "{ 'exchange' : 'registrar' , 'type' : 'topic', 'queue' : 'REGISTRAR-SYNC-QUEUE-MY_HOSTNAME', 'routing' : 'registration.sync', 'queue-def' : {'auto_delete' : 1}, 'no_ack' : 1, 'wait_for_consumer_ack' : 0 }";
$var(payload) = "{ 'exchange' : 'registrar' , 'type' : 'topic', 'queue' : 'REGISTRAR-SYNC-QUEUE-MY_HOSTNAME', 'routing' : 'registration.sync' }";
kazoo_subscribe("$var(payload)");

#!endif

#!ifdef PRESENCE_SYNC_ROLE

$var(payload) = "{ 'exchange' : 'presence' , 'type' : 'topic', 'queue' : 'PRESENCE-QUEUE-MY_HOSTNAME', 'routing' : 'sync', 'queue-def' : {'auto_delete' : 1}, 'no_ack' : 1, 'wait_for_consumer_ack' : 0 }";
$var(payload) = "{ 'exchange' : 'presence' , 'type' : 'topic', 'queue' : 'PRESENCE-QUEUE-MY_HOSTNAME', 'routing' : 'sync' }";
kazoo_subscribe("$var(payload)");

#!endif
Expand All @@ -877,14 +877,14 @@ event_route[kazoo:mod-init]

#!ifdef ACL_ROLE

$var(payload) = "{ 'exchange' : 'frontier_acl' , 'type' : 'topic', 'queue' : 'FRONTIERACL-FLUSH-MY_HOSTNAME', 'routing' : 'flush', 'auto_delete' : 1, 'durable' : 0, 'no_ack' : 1, 'wait_for_consumer_ack' : 0 }";
$var(payload) = "{ 'exchange' : 'frontier_acl' , 'type' : 'topic', 'queue' : 'FRONTIERACL-FLUSH-MY_HOSTNAME', 'routing' : 'flush' }";
kazoo_subscribe("$var(payload)");

#!endif

#!ifdef PRESENCE_BROADCAST_ROLE

$var(payload) = "{ 'exchange' : 'omnipresence' , 'queue' : 'PRESENCE-BROADCAST-MY_HOSTNAME', 'exclusive' : 0 ,'type' : 'topic', 'routing' : 'presence.update' }";
$var(payload) = "{ 'exchange' : 'omnipresence' , 'type' : 'topic', 'queue' : 'PRESENCE-BROADCAST-MY_HOSTNAME', 'routing' : 'presence.update', 'exclusive' : 0 }";
kazoo_subscribe("$var(payload)");

#!endif
Expand Down

0 comments on commit be38fa7

Please sign in to comment.