MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / err2reason_phrase

Function err2reason_phrase

error.c:47–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45int prev_ser_error=-1;
46
47int err2reason_phrase(
48 int error, /*!< current internal ser error */
49 int *sip_error, /*!< the sip error code to which ser error will be turned */
50 char *phrase, /*!< resulting error text */
51 int etl, /*!< error text buffer length */
52 char *signature ) /*!< extra text to be appended */
53{
54
55 char *error_txt;
56
57 switch( error ) {
58 case E_IP_BLOCKED:
59 error_txt="Filtered destination";
60 *sip_error=-error;
61 break;
62 case E_SEND:
63 error_txt="Send failed";
64 *sip_error=-error;
65 break;
66 case E_BAD_ADDRESS:
67 error_txt="Unresolvable destination";
68 *sip_error=-error;
69 break;
70 case E_BAD_REQ:
71 error_txt="Bad Request";
72 *sip_error=-error;
73 break;
74 case E_BAD_URI:
75 error_txt="Bad URI";
76 *sip_error=-error;
77 break;
78 case E_BAD_TUPEL:
79 error_txt="Transaction tuple incomplete";
80 *sip_error=-E_BAD_REQ;
81 break;
82 case E_BAD_TO:
83 error_txt="Bad To";
84 *sip_error=-E_BAD_REQ;
85 break;
86 case E_EXEC:
87 error_txt="Error in external logic";
88 *sip_error=-E_BAD_SERVER;
89 break;
90 case E_TOO_MANY_BRANCHES:
91 error_txt="Forking capacity exceeded";
92 *sip_error=-E_BAD_SERVER;
93 break;
94 case E_Q_INV_CHAR:
95 error_txt="Invalid character in q parameter";
96 *sip_error=-E_BAD_REQ;
97 break;
98 case E_Q_EMPTY:
99 error_txt="Empty q parameter";
100 *sip_error=-E_BAD_REQ;
101 break;;
102 case E_Q_TOO_BIG:
103 error_txt="q parameter too big";
104 *sip_error=-E_BAD_REQ;

Callers 3

sl_reply_errorFunction · 0.85
kill_transactionFunction · 0.85
mi_tm_uac_dlgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected