{"id":808,"date":"2015-02-20T11:14:51","date_gmt":"2015-02-20T05:14:51","guid":{"rendered":"http:\/\/alexeyka.zantsev.com\/?p=808"},"modified":"2016-03-16T17:08:09","modified_gmt":"2016-03-16T12:08:09","slug":"acmepacket-reject-redirected-calls","status":"publish","type":"post","link":"https:\/\/alexeyka.zantsev.com\/?p=808","title":{"rendered":"AcmePacket: reject redirected calls"},"content":{"rendered":"<p>What to do if somebody set up call redirect from his number to yours one, but you do not want to accept such calls?<\/p>\n<p>According to <a href=\"https:\/\/tools.ietf.org\/html\/rfc5806\" target=\"_blank\">RFC5806 &#8211; Diversion Indication in SIP<\/a>, <\/p>\n<blockquote><p>The Diversion header SHOULD be added when a SIP proxy server, SIP<br \/>\n   redirect server, or SIP user agent changes the ultimate endpoint that<br \/>\n   will receive the call.<\/p><\/blockquote>\n<p>So, you have to reject INVITEs with Diversion header. This is how it looks like on the AcmePacket. One more header-rule (if you already have any) in sip-manipulation rule:<\/p>\n<pre>\r\nheader-rule\r\n\tname                           reject_diversion\r\n\theader-name                    Diversion\r\n\taction                         manipulate\r\n\tcomparison-type                case-sensitive\r\n\tmsg-type                       request\r\n\tmethods                        INVITE\r\n\tmatch-value                    \r\n\tnew-value                      \r\n\telement-rule\r\n\t\tname                           rej_diversion\r\n\t\tparameter-name                 \r\n\t\ttype                           header-value\r\n\t\taction                         reject\r\n\t\tmatch-val-type                 any\r\n\t\tcomparison-type                pattern-rule\r\n\t\tmatch-value                    ^.*$\r\n\t\tnew-value                      \r\n\r\n<\/pre>\n<p>You may also add something like &#8220;603:Decline&#8221; to &#8220;new-value&#8221; parameter.<\/p>\n<p>Or even like this, without any responce codes and element-rules:<\/p>\n<pre>\r\nheader-rule\r\n                name                                    rejectDiversion\r\n                header-name                             Diversion\r\n                action                                  reject\r\n                comparison-type                         boolean\r\n                msg-type                                request\r\n                methods                                 INVITE\r\n                match-value                             \r\n                new-value                               \r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>What to do if somebody set up call redirect from his number to yours one, but you do not want to accept such calls? According to RFC5806 &#8211; Diversion Indication in SIP, The Diversion header SHOULD be added when a SIP proxy server, SIP redirect server, or SIP user agent changes the ultimate endpoint that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[195,202,203,201],"class_list":["post-808","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-acmepacket","tag-diversion","tag-hmr","tag-sbc"],"_links":{"self":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=808"}],"version-history":[{"count":4,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/808\/revisions"}],"predecessor-version":[{"id":956,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/808\/revisions\/956"}],"wp:attachment":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}