{"id":525,"date":"2014-01-15T08:40:18","date_gmt":"2014-01-15T06:40:18","guid":{"rendered":"http:\/\/bos-info.com\/?p=525"},"modified":"2016-07-23T16:01:43","modified_gmt":"2016-07-23T14:01:43","slug":"hangup","status":"publish","type":"post","link":"https:\/\/bos-info.com\/?p=525","title":{"rendered":"hangup"},"content":{"rendered":"<p>\u041f\u043e\u0432\u0435\u0441\u0442\u043a\u0430 \u0434\u043d\u044f:<br \/>\n1. Hangup() Softhangup()<br \/>\n2. Hangup cause<br \/>\n3. h extension<br \/>\n4. Hangupcause \u0432 Asterisk<br \/>\n5. hangupsource<br \/>\n<!--more--><br \/>\n1. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Hangup.<br \/>\nHangup(<causecode>) \u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u043a\u0430\u043d\u0430\u043b \u0441\u0432\u044f\u0437\u0438 \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c -1, \u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u043e\u0434 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0432\u044b\u0437\u043e\u0432\u0430(\u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445).<br \/>\n<strong>\u0414\u043b\u044f SIP:<\/strong><br \/>\n\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b (&#8220;404 Not found&#8221;, &#8220;484 Address incomplete&#8221; \u0438\u0442\u0434) \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 <causecode> \u043e\u0434\u043d\u043e \u0438\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 RFC 3398 &#8211; \u0441\u0442\u0440 24.<br \/>\n<causecode> \u044d\u0442\u043e ISDN \u043a\u043e\u0434 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0438 \u043d\u0435 \u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0430 SIP. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0437\u0432\u043e\u043d\u043e\u043a \u0441 \u043a\u043e\u0434\u043e\u043c SIP 503, \u0412 \u0434\u0438\u0430\u043b\u043f\u043b\u0430\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c hangup(42).<br \/>\n\u041a\u043e\u0433\u0434\u0430 \u0437\u0432\u043e\u043d\u043e\u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f, Asterisk \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 SIP \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a &#8220;X-Asterisk-HangupCauseCode&#8221; \u0432 BYE \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438.<br \/>\n\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c HangupCauseCode \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043a\u0430\u043d\u0430\u043b\u043e\u0432(SIP, PRI, IAX2 etc)<\/p>\n<p>1 = Unallocated number<br \/>\n16 = Normal call clearing<br \/>\n17 = User busy<br \/>\n18 = No user responding (telephone device not connected)<br \/>\n21 = Call rejected<br \/>\n22 = Number changed<br \/>\n27 = Destignation out of order<br \/>\n38 = Network out of order<br \/>\n41 = Temporary failure<\/p>\n<p><strong>SoftHangup<\/strong> &#8211; \u0442\u0430\u043a \u0436\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u043a\u0430\u043d\u0430\u043b, \u0415\u0441\u043b\u0438 \u043a\u0430\u043d\u0430\u043b\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0438\u0442 \u043e\u0431 \u044d\u0442\u043e\u043c.<br \/>\nSoftHangup(Technology\/Resource[,options])<br \/>\noptions<br \/>\n    a: \u0420\u0430\u0437\u043e\u0440\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u0430\u043d\u0430\u043b\u044b \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435, \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u0430(\u0440\u0435\u0441\u0443\u0440\u0441\u0430). <\/p>\n<p>2.<br \/>\n<a href=\"https:\/\/bos-info.com\/asterisk\/isup-cause-codes.html\" title=\"ISUP cause codes\" target=\"_blank\">ISUP cause code<\/a><\/p>\n<p><a href=\"https:\/\/wiki.asterisk.org\/wiki\/display\/AST\/Hangup+Cause+Mappings\" title=\"\u0421\u043f\u0438\u0441\u043e\u043a hangup cause code\" target=\"_blank\">\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u0434\u043e\u0432 \u0432 Asterisk<\/a><\/p>\n<p><strong>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 ISUP \u0432 SIP <\/strong><br \/>\n1 unallocated number  404<br \/>\n2 no route to network 404<br \/>\n3 no route to destination   420<br \/>\n16 normal call clearing &#8212; (*)<br \/>\n17 user busy 486 Busy here<br \/>\n18 no user responding 408 Request Timeout<br \/>\n19 no answer from the user 480 Temporarily unavailable<br \/>\n20 subscriber absent 480 Temporarily unavailable<br \/>\n21 call rejected 403 Forbidden (+)<br \/>\n22 number changed (w\/o diagnostic) 410 Gone<br \/>\n22 number changed (w\/ diagnostic) 301 Moved Permanently<br \/>\n23 redirection to new destination 410 Gone<br \/>\n26 non-selected user clearing 404 Not Found (=)<br \/>\n27 destination out of order 502 Bad Gateway<br \/>\n28 address incomplete 484 Address incomplete<br \/>\n29 facility rejected 501 Not implemented<br \/>\n31 normal unspecified 480 Temporarily unavailable<br \/>\n(*) ISDN Cause 16 will usually result in a BYE or CANCEL<br \/>\n(+) \u0415\u0441\u043b\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8216;user&#8217; \u0442\u043e\u0433\u0434\u0430 6xx \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0434\u0430\u043d \u0432\u043c\u0435\u0441\u0442\u043e 4xx (403 &#8211;> 603)<br \/>\n(=) ANSI procedure &#8211; \u0432 ANSI \u0441\u0435\u0442\u044f\u0445, 26 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f<br \/>\n&#8216;misrouted ported number&#8217;. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 cause 26 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432  <a href=\"http:\/\/ru.wikipedia.org\/wiki\/ISUP\" title=\"ISUP\" target=\"_blank\">ISUP<\/a> \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430\u0445.<\/p>\n<p>REL \u0441 ISDN cause 22 (number changed) \u0432 \u043f\u043e\u043b\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u043e\u0432\u043e\u043c \u043d\u043e\u043c\u0435\u0440\u0435, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0430\u0431\u043e\u043d\u0435\u043d\u0442. \u0415\u0441\u043b\u0438 MGC \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u043d\u0430 \u0414\u041e\u041b\u0416\u041d\u0410 \u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 SIP \u043e\u0442\u0432\u0435\u0442 (301) \u0432 \u043f\u043e\u043b\u0435  Contact \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430.<\/p>\n<p>Resource unavailable<br \/>\n\u042d\u0442\u043e\u0442 \u0442\u0438\u043f \u043e\u0448\u0438\u0431\u043e\u043a \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0441\u0431\u043e\u0439.  &#8216;Retry-After&#8217; \u0445\u0438\u0434\u0435\u0440 \u041c\u041e\u0416\u0415\u0422 \u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043a \u043e\u0442\u0432\u0435\u0442\u0443 \u0435\u0441\u043b\u0438 \u0443\u043c\u0435\u0441\u0442\u043d\u043e.<br \/>\n34 no circuit available 503 Service unavailable<br \/>\n38 network out of order 503 Service unavailable<br \/>\n41 temporary failure 503 Service unavailable<br \/>\n42 switching equipment congestion 503 Service unavailable<br \/>\n47 resource unavailable 503 Service unavailable<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0442\u0438\u043f \u043e\u0448\u0438\u0431\u043e\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c<br \/>\n55 incoming calls barred within CUG 403 Forbidden<br \/>\n57 bearer capability not authorized 403 Forbidden<br \/>\n58 bearer capability not presently 503 Service unavailable<br \/>\navailable<\/p>\n<p>Service or option not available<br \/>\n65 bearer capability not implemented 488 Not Acceptable Here<br \/>\n70 only restricted digital avail 488 Not Acceptable Here<br \/>\n79 service or option not implemented 501 Not implemented<\/p>\n<p>Invalid message<br \/>\n87 user not member of CUG 403 Forbidden<br \/>\n88 incompatible destination 503 Service unavailable<\/p>\n<p>Protocol error<br \/>\n102 recovery of timer expiry 504 Gateway timeout<br \/>\n111 protocol error 500 Server internal error<\/p>\n<p>Interworking<br \/>\n127 interworking unspecified 500 Server internal error<\/p>\n<p>\u0412 Asterisk \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 1.8 \u0442\u0430\u043a \u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 &#8216;use_q850_reason&#8217; \u043e\u043f\u0446\u0438\u044e \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u0447\u0442\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e(\u0447\u0442\u043e\u0431\u044b \u0431\u043e\u0440\u043e\u0434\u0430\u0442\u044b\u0435 \u0434\u044f\u0434\u044c\u043a\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u0441\u0442\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0430\u0434\u0435\u043f\u0442\u044b \u041e\u041a\u04217 \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438 \u043e \u0447\u0435\u043c \u044d\u0442\u043e \u043c\u044b):<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1; highlight: []; html-script: false\">Reason: Q.850;cause=&lt;cause code&gt;<\/pre>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u0432\u0435\u043b\u0438: \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e SIP status codes  \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 ISUP cause code, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c use_q850_reason, \u0442\u043e\u0433\u0434\u0430 \u043a\u043e\u0434 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u0432 \u044f\u0434\u0440\u043e \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0432 \u043d\u043e\u0432\u043e\u043c  SIP header (&#8220;Reason: &#8230;&#8221;), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u0432 ${HANGUPCAUSE}.&#8221;<br \/>\n\u041a\u0430\u043d\u0430\u043b \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0443\u043c\u0438\u0440\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 Dial, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u0443 \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u044d\u0442\u043e\u0442 \u043a\u0430\u043d\u0430\u043b \u0436\u0438\u0432 <\/p>\n<p>400 Bad Request 41 Temporary Failure<br \/>\n401 Unauthorized 21 Call rejected (*)<br \/>\n402 Payment required 21 Call rejected<br \/>\n403 Forbidden 21 Call rejected<br \/>\n404 Not found 1 Unallocated number<br \/>\n405 Method not allowed 63 Service or option unavailable<br \/>\n406 Not acceptable 79 Service\/option not implemented (+)<br \/>\n407 Proxy authentication required 21 Call rejected (*)<br \/>\n408 Request timeout 102 Recovery on timer expiry<br \/>\n410 Gone 22 Number changed (w\/o diagnostic)<br \/>\n413 Request Entity too long 127 Interworking (+)<br \/>\n414 Request-URI too long 127 Interworking (+)<br \/>\n415 Unsupported media type 79 Service\/option not implemented (+)<br \/>\n416 Unsupported URI Scheme 127 Interworking (+)<br \/>\n420 Bad extension 127 Interworking (+)<br \/>\n421 Extension Required 127 Interworking (+)<br \/>\n423 Interval Too Brief 127 Interworking (+)<br \/>\n480 Temporarily unavailable 18 No user responding<br \/>\n481 Call\/Transaction Does not Exist 41 Temporary Failure<br \/>\n482 Loop Detected 25 Exchange &#8211; routing error<br \/>\n483 Too many hops 25 Exchange &#8211; routing error<br \/>\n484 Address incomplete 28 Invalid Number Format (+)<br \/>\n485 Ambiguous 1 Unallocated number<br \/>\n486 Busy here 17 User busy<br \/>\n487 Request Terminated &#8212; (no mapping)<br \/>\n488 Not Acceptable here &#8212; by Warning header<br \/>\n500 Server internal error 41 Temporary failure<br \/>\n501 Not implemented 79 Not implemented, unspecified<br \/>\n502 Bad gateway 38 Network out of order<br \/>\n503 Service unavailable 41 Temporary failure<br \/>\n504 Server time-out 102 Recovery on timer expiry<br \/>\n504 Version Not Supported 127 Interworking (+)<br \/>\n513 Message Too Large 127 Interworking (+)<br \/>\n600 Busy everywhere 17 User busy<br \/>\n603 Decline 21 Call rejected<br \/>\n604 Does not exist anywhere 1 Unallocated number<br \/>\n606 Not acceptable &#8212; by Warning header<\/p>\n<p>(*) \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445,SIP \u0448\u043b\u044e\u0437\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u043c\u043e\u0447\u0438\u044f SIP UAS \u043e\u0442\u0432\u0435\u0440\u0433\u0430\u0442\u044c INVITE \u043a\u043e\u0433\u0434\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u0430. \u0422\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0448\u043b\u044e\u0437 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u043e\u043d \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u0434 21.<br \/>\n(+) \u0415\u0441\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e SIP \u0448\u043b\u044e\u0437 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0442\u044c\u0441\u044f \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u043f\u043e\u043f\u044b\u0442\u0430\u0432\u0448\u0438\u0441\u044c \u043f\u0435\u0440\u0435\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0441\u0441\u0438\u044e. <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Warning header \u0432 SIP 606 \u0438\u043b\u0438 488 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0441\u043e\u0431\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 ISDN cause code \u0432 Warning code. &#8217;31 Normal, unspecified&#8217; \u0414\u041e\u041b\u0416\u0415\u041d \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 Warning codes. \u0415\u0441\u043b\u0438 Warning code \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043d\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c cause code &#8217;65 Bearer Capability Not Implemented&#8217;.<\/p>\n<p>3. h extension<br \/>\n\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0434\u0438\u0430\u043b\u043f\u043b\u0430\u043d\u0430 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u043e\u0432\u0435\u0441\u0438\u043b\u0438 \u0442\u0440\u0443\u0431\u043a\u0443.<br \/>\n\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f DeadAGI \u0432\u043c\u0435\u0441\u0442\u043e AGI.<br \/>\n\u041d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0439\u0442\u0435 Hangup \u0438\u0437 h extension.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f &#8216;h&#8217; extension, \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0430 \u0443\u0436\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b. \u041d\u0435\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u044d\u0442\u043e, \u0438 \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0447\u0438\u0442\u0430\u0442\u044c \u0430\u0443\u0434\u0438\u043e \u0438\u0437 \u043a\u0430\u043d\u0430\u043b\u0430. Playback() \u0438\u043b\u0438 Background(), \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442!. \u041f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0432\u0435\u0449\u044c \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432 &#8216;h&#8217; extension \u044d\u0442\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u0441 \u043a\u0430\u043d\u0430\u043b\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0435. \u041d\u0435\u0442 \u0430\u0443\u0434\u0438\u043e, \u043d\u0435\u0442 DTMF \u0438\u0442\u0434..<\/p>\n<p><strong>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432 \u0438\u043b\u0438 Sub\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 h extension<\/strong><br \/>\n\u0423\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u0431\u0435\u043a\u0430, \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u044f\u043a\u0438\u0445 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0435\u0439(AGI \u0441\u043a\u0440\u0438\u043f\u0442\u044b) \u0438\u0442\u0434<\/p>\n<p>4. Hangupcause \u0432 Asterisk<br \/>\n\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0437\u0432\u043e\u043d\u043a\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0437\u0432\u043e\u043d\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438, \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439<br \/>\n<strong> ${HANGUPCAUSE} <\/strong> \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0432\u044b\u0437\u043e\u0432\u0430(\u0441\u043c \u043f.2) \u0423\u0434\u043e\u0431\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 CDR, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043e \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<br \/>\n<code>same => n,Set(CDR(userfield)=HC:${HANGUPCAUSE})  <\/code><\/p>\n<p>\u041d\u043e \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u0432\u0435\u0440\u0445\u0443\u0448\u043a\u0430 \u0430\u0439\u0441\u0431\u0435\u0440\u0433\u0430. \u0412 11\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438(Hangup Handlers)<br \/>\n\u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u0430\u0440\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<br \/>\n<strong>HANGUPCAUSE<\/strong>(channel,type) \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0434\u0430\u0435\u0442 \u043a\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0438\u043b\u0438 \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0443\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0430\u0442\u0441\u0435\u0440\u0438\u0441\u043a.<br \/>\n\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b:<br \/>\nchannel &#8211; \u0418\u043c\u044f \u043a\u0430\u043d\u0430\u043b\u0430 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043a\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0432\u044b\u0437\u043e\u0432\u0430.<br \/>\ntype &#8211; \u043a\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c:<br \/>\n tech &#8211; \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043a\u0430\u043d\u0430\u043b\u0430.<br \/>\n ast &#8211; \u043a\u043e\u0434 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u0441\u0442\u0435\u0440\u0438\u0441\u043a\u043e\u043c.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<br \/>\nsame => n,Noop(${HANGUPCAUSE(\u0418\u041c\u042f_\u041a\u0410\u041d\u0410\u041b\u0410,tech)})<br \/>\nsame => n,Noop(${HANGUPCAUSE(\u0418\u041c\u042f_\u041a\u0410\u041d\u0410\u041b\u0410,ast)})<br \/>\nTechnology-specific cause information: IAX2 HANGUP (16),<br \/>\nAsterisk Cause Code:  Normal Clearing<\/p>\n<p><strong>HANGUPCAUSE_KEYS()<\/strong> \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0434\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a(\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438) \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043a\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0432\u044b\u0437\u043e\u0432\u0430(\u0435\u0441\u043b\u0438 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432) \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 HANGUPCAUSE.<\/p>\n<p><strong>HangupCauseClear()<\/strong> \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0447\u0438\u0449\u0430\u0435\u0442 \u0432\u0441\u0435  \u043a\u043e\u0434\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043a\u0430\u043d\u0430\u043b\u0430. \u042d\u0442\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 Dial()\u043e\u0432).<br \/>\n<code>exten => s,1,NoOp()<br \/>\nsame => n,Set(CHANNEL(hangup_handler_push)=handler,s,1)<br \/>\nsame => n,Dial(SIP\/foo,10)<br \/>\nsame => n,HangupCauseClear()<br \/>\nsame => n,Dial(SIP\/bar,10)<br \/>\nsame => n,Hangup()<\/p>\n<p>[handler]<br \/>\nexten => s,1,NoOp()<br \/>\nsame => n,Set(HANGUPCAUSE_STRING=${HANGUPCAUSE_KEYS()})<br \/>\nsame => n,Verbose(0, Channels with hangup cause information: ${HANGUPCAUSE_STRING})<br \/>\nsame => n,Return()<\/code><br \/>\n\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0443\u0437\u043d\u0430\u0435\u043c \u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0437\u0432\u043e\u043d\u043a\u0430 SIP\/foo! <\/p>\n<p>\u0418 \u0442\u0430\u043a, \u0447\u0442\u043e \u0436\u0435 \u0442\u0430\u043a\u043e\u0435 Hangup Handlers &#8211; \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0430\u0431\u0440\u043e\u0443\u0442\u044b(subroutines), \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c Gosub. \u041e\u043d\u0438 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u044f\u044e\u0442\u0441\u044f \u043a \u043a\u0430\u043d\u0430\u043b\u0443 \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u0437\u0430 \u043d\u0438\u043c \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0434\u0438\u0430\u043b\u043f\u043b\u0430\u043d\u0443, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u043f\u043e\u0434\u043b\u043e\u0433\u043e h, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435((( \u041a \u043a\u0430\u043d\u0430\u043b\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0446\u0435\u043f\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0438 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0438\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f.<br \/>\n!\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 h. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 h.<br \/>\n!\u0422\u0440\u0430\u043d\u0441\u0444\u0435\u0440, \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442, \u043f\u0430\u0440\u043a\u043e\u0432\u043a\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u0441\u0442\u0430\u0440\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u044f\u0434\u0440\u0430 \u0430\u0441\u0442\u0435\u0440\u0438\u0441\u043a\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u0440\u0438\u0434\u0436, \u0434\u043e 13!<br \/>\n!Hangup handlers \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u043f\u043b\u0435\u0447\u0443 \u0432\u044b\u0437\u043e\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f pre-dial handlers.<br \/>\n!!\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 hangup handlers \u044d\u0442\u043e \u0441\u0430\u0431\u0440\u043e\u0443\u0442\u044b, \u0442\u043e \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Return \u0434\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430.<br \/>\n!!\u0414\u043e\u0431\u0430\u0432\u0438\u0432 hangup handler \u0432 h \u0438\u043b\u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 hangup handler \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c&#8230;(\u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u0447\u0442\u043e).<br \/>\n!!hangup handlers, \u043a\u0430\u043a \u0438 h, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f(\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0431\u0440\u043e\u0441\u0430 \u043f\u043b\u0435\u0447\u0430 \u0432\u044b\u0437\u043e\u0432\u0430). \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b  \u043a\u0430\u043a ISDN \u0438 SIP \u043c\u043e\u0433\u0443\u0442 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0447\u0440\u0435\u0437\u043c\u0435\u0440\u043d\u0443\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u043f\u0440\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0432\u044b\u0437\u043e\u0432\u0430.<br \/>\n\u0412\u0441\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 CHANNEL<br \/>\n<code>;\u043d\u0430\u0432\u0435\u0448\u0438\u0432\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<br \/>\nsame => n,Set(CHANNEL(hangup_handler_push)=[[context,]exten,]priority[(arg1[,...][,argN])])<br \/>\n;\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u043b\u0438 \u0435\u0433\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c<br \/>\nsame => n,Set(CHANNEL(hangup_handler_pop)=[[[context,]exten,]priority[(arg1[,...][,argN])]])<br \/>\n;\u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438<br \/>\nsame => n,Set(CHANNEL(hangup_handler_wipe)=[[[context,]exten,]priority[(arg1[,...][,argN])]])<br \/>\n<\/code><br \/>\n\u043a\u043e\u043c\u0430\u043d\u0434\u0430 CLI \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u0430\u043d\u0430\u043b\u043e\u0432<br \/>\n<code>core show hanguphandlers all<\/code><\/p>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 SIP UA \u043c\u043e\u0433\u0443\u0442 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0438\u043b UA. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: SIP 180 Ringing.<\/p>\n<p>\u0416\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440: \u0437\u0432\u043e\u043d\u043e\u043a \u043d\u0430 2 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043a SIP\/foo \u0438 SIP\/bar. hangup handler \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u043c\u0443 \u043a\u0430\u043d\u0430\u043b\u0443. \u041f\u0430\u0440\u0441\u044f\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442\u044b \u043e\u0442 \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0438 \u0432\u0432\u043e\u0434\u0438\u0442\u0441\u044f 2 \u0432\u0438\u0434\u0430 \u043a\u043e\u0434\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f(\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043a\u0430\u043d\u0430\u043b\u0430 \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u0441\u0442\u0435\u0440\u0438\u0441\u043a\u043e\u043c).<br \/>\n<code>[default]<br \/>\nexten => s,1,NoOp()<br \/>\nsame => n,Set(CHANNEL(hangup_handler_push)=handler,s,1)<br \/>\nsame => n,Dial(SIP\/foo&SIP\/bar,10)<br \/>\nsame => n,Hangup()<\/p>\n<p>[handler]<br \/>\nexten => s,1,NoOp()<br \/>\nsame => n,Set(HANGUPCAUSE_STRING=${HANGUPCAUSE_KEYS()})<br \/>\n; \u041d\u0430\u0447\u0430\u043b\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<br \/>\nsame => n(hu_begin),NoOp()<br \/>\n; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 (\u043d\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438)<br \/>\nsame => n,GotoIf($[${LEN(${HANGUPCAUSE_STRING})}=0]?hu_exit)<br \/>\n; \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u0430\u043d\u0430\u043b<br \/>\nsame => n,Set(ARRAY(item)=${HANGUPCAUSE_STRING})<br \/>\nsame => n,Set(HANGUPCAUSE_STRING=${HANGUPCAUSE_STRING:${LEN(${item})}})<br \/>\n; \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u0438\u043c\u044f \u043a\u0430\u043d\u0430\u043b\u0430 \u0438 \u043a\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f<br \/>\nsame => n,Verbose(0, Got Channel ID ${item} with Technology Cause Code ${HANGUPCAUSE(${item},tech)}, Asterisk Cause Code ${HANGUPCAUSE(${item},ast)})<br \/>\n; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 (\u043d\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438)<br \/>\nsame => n,GotoIf($[${LEN(${HANGUPCAUSE_STRING})}=0]?hu_exit)<br \/>\n; \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u043f\u044f\u0442\u0443\u044e<br \/>\nsame => n,Set(HANGUPCAUSE_STRING=${HANGUPCAUSE_STRING:1})<br \/>\n; \u0438\u0434\u0435\u043c \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0446\u0438\u043a\u043b\u0430<br \/>\nsame => n,Goto(hu_begin)<br \/>\nsame => n(hu_exit),NoOp()<br \/>\nsame => n,Return()<\/code><\/p>\n<p>5.hangupsource<br \/>\n\u0414\u0430\u043d\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043a\u0430\u043d\u0430\u043b\u0430(CHANNEL(hangupsource)) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043a\u0442\u043e \u0431\u0440\u043e\u0441\u0438\u043b \u0442\u0440\u0443\u0431\u043a\u0443.<br \/>\n\u041c\u043e\u0436\u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0438\u043b\u0438 \u0441\u0440\u0430\u0437\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 CDR.<br \/>\n<code><br \/>\nexten => h,1,Set(CDR(userfield)=${CHANNEL(hangupsource)})<br \/>\n<\/code><\/p>\n<p>P.S. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u0440\u043e\u043f\u043d\u0443\u0442\u044c \u043a\u0430\u043d\u0430\u043b, \u0442\u043e \u0432 CLI \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c:<br \/>\n<code>channel request hangup \u0418\u041c\u042f_\u041a\u0410\u041d\u0410\u041b\u0410<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u043e\u0432\u0435\u0441\u0442\u043a\u0430 \u0434\u043d\u044f: 1. Hangup() Softhangup() 2. Hangup cause 3. h extension 4. Hangupcause \u0432 Asterisk 5. hangupsource<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[61,47],"_links":{"self":[{"href":"https:\/\/bos-info.com\/index.php?rest_route=\/wp\/v2\/posts\/525"}],"collection":[{"href":"https:\/\/bos-info.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bos-info.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bos-info.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bos-info.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=525"}],"version-history":[{"count":5,"href":"https:\/\/bos-info.com\/index.php?rest_route=\/wp\/v2\/posts\/525\/revisions"}],"predecessor-version":[{"id":909,"href":"https:\/\/bos-info.com\/index.php?rest_route=\/wp\/v2\/posts\/525\/revisions\/909"}],"wp:attachment":[{"href":"https:\/\/bos-info.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bos-info.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bos-info.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}