From 16104612e3b8709486acb9cf7257ff8549e1bec5 Mon Sep 17 00:00:00 2001 From: Fabricio Santolin da Silva Date: Mon, 28 Oct 2019 09:27:20 +0100 Subject: [PATCH] TT#70068 Add new header to MWI SIP message. - new header P-NGCP-MWI-Id, that contains the internal NGCP message id and needed to distinguish new/old messages order within a subscriber to perform selec- tive messages handling. Change-Id: I21556b1ced05baac8f373c2cd15ca63ae45e2c02 --- mwi.sip | 2 +- vmnotify | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mwi.sip b/mwi.sip index 22633d6..b187256 100644 --- a/mwi.sip +++ b/mwi.sip @@ -9,7 +9,7 @@ Event: message-summary User-Agent: Sipwise NGCP Application Server Content-Type: application/simple-message-summary Content-Length: $BODYLEN$ - +$MWI_ID$ $BODY_MW$ $BODY_VM$ diff --git a/vmnotify b/vmnotify index aeb221f..15a912e 100755 --- a/vmnotify +++ b/vmnotify @@ -288,6 +288,7 @@ sub main { ($data{user}, $data{domain}) = get_user_domain($data{mailbox}); my $etag = get_etag($data{user}, $data{domain}); my $sipifmatch = defined $etag ? "SIP-If-Match: $etag" : "STRIP"; + my $mwiid = $data{msgnum} ge 0 ? "P-NGCP-MWI-Id: $data{msgnum}\n": ""; my %macros = ( body_mw => "Messages-Waiting: ". ($data{new} ? "yes" : "no"), @@ -297,6 +298,7 @@ sub main { user => $data{user}, domain => $data{domain}, sipifmatch => $sipifmatch, + mwi_id => $mwiid, ); send_mwi_notify(\%macros);