const.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package gb28181
  2. var reasons = map[int]string{
  3. 100: "Trying",
  4. 180: "Ringing",
  5. 181: "Call Is Being Forwarded",
  6. 182: "Queued",
  7. 183: "Session Progress",
  8. 200: "OK",
  9. 202: "Accepted",
  10. 300: "Multiple Choices",
  11. 301: "Moved Permanently",
  12. 302: "Moved Temporarily",
  13. 305: "Use Proxy",
  14. 380: "Alternative Service",
  15. 400: "Bad Request",
  16. 401: "Unauthorized",
  17. 402: "Payment Required",
  18. 403: "Forbidden",
  19. 404: "Not Found",
  20. 405: "Method Not Allowed",
  21. 406: "Not Acceptable",
  22. 407: "Proxy Authentication Required",
  23. 408: "Request Timeout",
  24. 410: "Gone",
  25. 413: "Request Entity Too Large",
  26. 414: "Request-URI Too Long",
  27. 415: "Unsupported Media Type",
  28. 416: "Unsupported URI Scheme",
  29. 420: "Bad Extension",
  30. 421: "Extension Required",
  31. 423: "Interval Too Brief",
  32. 480: "Temporarily Unavailable",
  33. 481: "Call transaction Does Not Exist",
  34. 482: "Loop Detected",
  35. 483: "Too Many Hops",
  36. 484: "Address Incomplete",
  37. 485: "Ambiguous",
  38. 486: "Busy Here",
  39. 487: "Request Terminated",
  40. 488: "Not Acceptable Here",
  41. 489: "Bad Event",
  42. 491: "Request Pending",
  43. 493: "Undecipherable",
  44. 500: "Server Internal Error",
  45. 501: "Not Implemented",
  46. 502: "Bad Gateway",
  47. 503: "Service Unavailable",
  48. 504: "Server Tim",
  49. 505: "Version Not Supported",
  50. 513: "message Too Large",
  51. 600: "Busy Everywhere",
  52. 603: "Decline",
  53. 604: "Does Not Exist Anywhere",
  54. 606: "SESSION NOT ACCEPTABLE",
  55. }
  56. func Explain(statusCode int) string {
  57. return reasons[statusCode]
  58. }
  59. const (
  60. INVIDE_MODE_MANUAL = iota
  61. INVIDE_MODE_AUTO
  62. INVIDE_MODE_ONSUBSCRIBE
  63. )