代码拉取完成,页面将自动刷新
package sip
import "fmt"
//transaction sip error
var errorMap = map[int]string{
//1xx
100: "Trying",
180: "Ringing",
181: "Call Is Being Forwarded",
182: "Queued",
183: "Session Progress",
199: "Early Dialog Terminated",
//2xx
200: "OK",
202: "Accepted",
204: "No Notification",
//3xx
300: "Multiple Choices",
301: "Moved Permanently",
302: "Moved Temporarily",
305: "Use Proxy",
380: "Alternative Service",
//4xx
400: "Bad Request",
401: "Unauthorized",
402: "Payment Required",
403: "Forbidden",
404: "Not Found",
405: "Method Not Allowed",
406: "Not Acceptable",
407: "Proxy Authentication Required",
408: "Request Timeout",
409: "Conflict",
410: "Gone",
411: "Length Required",
412: "Conditional Request Failed",
413: "Request Entity Too Large",
414: "Request-URI Too Long",
415: "Unsupported Media Type",
416: "Unsupported URI Scheme",
417: "Unknown Resource-Priority",
420: "Bad Extension",
421: "Extension Required",
422: "Session Interval Too Small",
423: "Interval Too Brief",
424: "Bad Location Information",
428: "Use Identity Header",
429: "Provide Referrer Identity",
430: "Flow Failed",
433: "Anonymity Disallowed",
436: "Bad Identity Info",
437: "Unsupported Credential",
438: "Invalid Identity Header",
439: "First Hop Lacks Outbound Support",
440: "Max-Breadth Exceeded",
469: "Bad Info Package",
470: "Consent Needed",
480: "Temporarily Unavailable",
481: "Call/Transaction Does Not Exist",
482: "Loop Detected",
483: "Too Many Hops",
484: "Address Incomplete",
485: "Ambiguous",
486: "Busy Here",
487: "Request Terminated",
488: "Not Acceptable Here",
489: "Bad Event",
491: "Request Pending",
493: "Undecipherable",
494: "Security Agreement Required",
//5xx
500: "Server Internal Error",
501: "Not Implemented",
502: "Bad Gateway",
503: "Service Unavailable",
504: "Server Time-out",
505: "Version Not Supported",
513: "Message Too Large",
580: "Precondition Failure",
//6xx
600: "Busy Everywhere",
603: "Decline",
604: "Does Not Exist Anywhere",
606: "Not Acceptable",
607: "Unwanted",
687: "Dialog Terminated",
}
func DumpError(code int) string {
if code == 0 {
return "invalid status reason for request"
}
return fmt.Sprintf("%d %s", code, errorMap[code])
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。