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

Function check_to

modules/auth_db/checks.c:149–161  ·  view source on GitHub ↗

* Check username part in To header field */

Source from the content-addressed store, hash-verified

147 * Check username part in To header field
148 */
149int check_to(struct sip_msg* _m, str* _table)
150{
151 if (!_m->to && ((parse_headers(_m, HDR_TO_F, 0) == -1) || (!_m->to))) {
152 LM_ERR("Error while parsing To header field\n");
153 return ERR_INTERNAL;
154 }
155 if(parse_to_uri(_m)==NULL) {
156 LM_ERR("Error while parsing To header URI\n");
157 return ERR_INTERNAL;
158 }
159
160 return check_username(_m, _table, &get_to(_m)->parsed_uri);
161}
162
163
164/*

Callers

nothing calls this directly

Calls 2

parse_to_uriFunction · 0.85
check_usernameFunction · 0.85

Tested by

no test coverage detected