|
|
|
@ -82,16 +82,18 @@ onreply_route[MESSAGE_REPLY] |
|
|
|
{ |
|
|
|
xlog("L_INFO", "$ci|log|sending success delivery message to $avp(server_id)\n"); |
|
|
|
$var(Payload) = $_s({"Event-Category" : "message", "Event-Name" : "delivery", "Call-ID" : "$ci", "Message-ID" : "$avp(message_id)" , "Delivery-Result-Code" : "sip:$T_reply_code", "Msg-ID" : "$avp(msg_id)" , "Status" : "Success"}); |
|
|
|
$var(RK) = "message.delivery." + $(ci{kz.encode}); |
|
|
|
kazoo_publish("sms", $var(RK), $var(Payload)); |
|
|
|
$var(exchange) = "targeted"; |
|
|
|
$var(RK) = $avp(server_id); |
|
|
|
kazoo_publish($var(exchange), $var(RK), $var(Payload)); |
|
|
|
} |
|
|
|
|
|
|
|
failure_route[MESSAGE_FAULT] |
|
|
|
{ |
|
|
|
xlog("L_INFO", "$ci|log|sending failure delivery message to $avp(server_id)\n"); |
|
|
|
$var(Payload) = $_s({"Event-Category" : "message", "Event-Name" : "delivery", "Call-ID" : "$ci", "Message-ID" : "$avp(message_id)" , "Delivery-Result-Code" : "sip:$T_reply_code", "Msg-ID" : "$avp(msg_id)" , "Status" : "Failure"}); |
|
|
|
$var(RK) = "message.delivery." + $(ci{kz.encode}); |
|
|
|
kazoo_publish("sms", $var(RK), $var(Payload)); |
|
|
|
$var(exchange) = "targeted"; |
|
|
|
$var(RK) = $avp(server_id); |
|
|
|
kazoo_publish($var(exchange), $var(RK), $var(Payload)); |
|
|
|
} |
|
|
|
|
|
|
|
route[MESSAGE_BINDINGS] |
|
|
|
|