{"id":754,"date":"2014-12-31T11:22:41","date_gmt":"2014-12-31T05:22:41","guid":{"rendered":"http:\/\/alexeyka.zantsev.com\/?p=754"},"modified":"2021-02-28T01:54:01","modified_gmt":"2021-02-27T20:54:01","slug":"acmepacket-session-constraints","status":"publish","type":"post","link":"https:\/\/alexeyka.zantsev.com\/?p=754","title":{"rendered":"AcmePacket: session constraints"},"content":{"rendered":"<p><code># show sessions<\/code> or <code># monitor session<\/code> gives you a whole statistics of active sessions on your session director.<\/p>\n<p>What to do if you want to see the number of sessions on each session-agent? Use <code># show sipd agents<\/code><\/p>\n<p>This extremely useful command can help you to destinguish the suspiciously high (for your network) connections count on a concrete session-agent. And you will see the problem agent while being DDoSed or under real high load. Or just see sessions per session-agent.<\/p>\n<p><code># show sessions<\/code><br \/>\nThe left column shows the number of active sessions on your Session Director. The right one demonstrates the highest number of sessions ever been on SD:<br \/>\n<a href=\"https:\/\/alexeyka.zantsev.com\/wp-content\/uploads\/2014\/12\/constr_show_sessions.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-756\" src=\"http:\/\/alexeyka.zantsev.com\/wp-content\/uploads\/2014\/12\/constr_show_sessions.png\" alt=\"constr_show_sessions\" width=\"500\" height=\"90\" \/><\/a><\/p>\n<p>This is how <code># show sipd agents<\/code> looks like:<br \/>\n<a href=\"https:\/\/alexeyka.zantsev.com\/wp-content\/uploads\/2014\/12\/constr_show_sipd_agents.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-763\" src=\"http:\/\/alexeyka.zantsev.com\/wp-content\/uploads\/2014\/12\/constr_show_sipd_agents.png\" alt=\"constr_show_sipd_agents\" width=\"500\" height=\"390\" \/><\/a><\/p>\n<p>The letter I in the second column means that the session agent is &#8216;<strong>i<\/strong>n service&#8217;.<br \/>\nThe letter O means that it&#8217;s &#8216;<strong>o<\/strong>ut of service&#8217;, unused.<br \/>\nThe letter C means that <strong>c<\/strong>onstraints are configured and are used right now: the number of sessions is higher than allowed. The &#8216;Active&#8217; column shows the number of sessions. The column &#8216;ConEx&#8217; is &#8216;Constraints exceeded&#8217; &#8211; the number of ignored due to the limitations sessions for the last 100 seconds.<br \/>\nAs you can see, session-agents may be inbound and outbound. In this example we see only inbound, they are peers with SIP providers. The outbound are peers with Asterisk nodes in the core of the network, they also have such statistics.<\/p>\n<p>It is possible to see a detailed statistics for any of the configured session-agents:<br \/>\n<code># show sipd agents %ip address%<\/code> or <code># show sipd agents %session-agent name%<\/code><br \/>\nHave a look at session-agent which is marked with I letter (in service):<br \/>\n<a href=\"https:\/\/alexeyka.zantsev.com\/wp-content\/uploads\/2014\/12\/constr_show_sipd_agents_i.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-770\" src=\"http:\/\/alexeyka.zantsev.com\/wp-content\/uploads\/2014\/12\/constr_show_sipd_agents_i.png\" alt=\"constr_show_sipd_agents_i\" width=\"500\" height=\"360\" \/><\/a><\/p>\n<p>And one more example for the session-agent with ConEx &#8211; constraints exceeded:<br \/>\n<a href=\"https:\/\/alexeyka.zantsev.com\/wp-content\/uploads\/2014\/12\/constr_show_sipd_agents_c.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-775\" src=\"http:\/\/alexeyka.zantsev.com\/wp-content\/uploads\/2014\/12\/constr_show_sipd_agents_c.png\" alt=\"constr_show_sipd_agents_c\" width=\"500\" height=\"360\" \/><\/a><\/p>\n<p>Constraints can be configured either in <code># configure terminal -&gt; session-router -&gt; session-constraints<\/code> and then applying them <em>variant_1)<\/em> on the <code>sip-interface<\/code> (<code># configure terminal -&gt; session-router -&gt; sip-interface -&gt; constraint-name<\/code>), <em>variant_2)<\/em> on a <code>realm<\/code> (<code># conf t -&gt; media-manager -&gt; realm-config<\/code>), or for the <code>session-agent<\/code> directly.<\/p>\n<p>Here&#8217;s an example of a directly applied (but disabled) constraint on a <code>session-agent<\/code>:<\/p>\n<p><a href=\"https:\/\/alexeyka.zantsev.com\/wp-content\/uploads\/2014\/12\/constr_ses_ag_constr.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-778\" src=\"http:\/\/alexeyka.zantsev.com\/wp-content\/uploads\/2014\/12\/constr_ses_ag_constr.png\" alt=\"constr_ses_ag_constr\" width=\"500\" height=\"380\" \/><\/a><br \/>\nJust be sure to set &#8216;<code>constraints enabled<\/code>&#8216; in your <code>session-agent<\/code>, not only the value, otherwise they will not be applied.<\/p>\n","protected":false},"excerpt":{"rendered":"<p># show sessions or # monitor session gives you a whole statistics of active sessions on your session director. What to do if you want to see the number of sessions on each session-agent? Use # show sipd agents This extremely useful command can help you to destinguish the suspiciously high (for your network) connections [&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":[196,195,197],"class_list":["post-754","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-acme-packet","tag-acmepacket","tag-constraints"],"_links":{"self":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/754","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=754"}],"version-history":[{"count":24,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/754\/revisions"}],"predecessor-version":[{"id":3663,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/754\/revisions\/3663"}],"wp:attachment":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}