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

Function check_from

modules/auth_db/checks.c:167–179  ·  view source on GitHub ↗

* Check username part in From header field */

Source from the content-addressed store, hash-verified

165 * Check username part in From header field
166 */
167int check_from(struct sip_msg* _m, str* _table)
168{
169 if (parse_from_header(_m) < 0) {
170 LM_ERR("Error while parsing From header field\n");
171 return ERR_INTERNAL;
172 }
173 if(parse_from_uri(_m)==NULL) {
174 LM_ERR("Error while parsing From header URI\n");
175 return ERR_INTERNAL;
176 }
177
178 return check_username(_m, _table, &get_from(_m)->parsed_uri);
179}
180
181
182/*

Callers

nothing calls this directly

Calls 3

parse_from_headerFunction · 0.85
parse_from_uriFunction · 0.85
check_usernameFunction · 0.85

Tested by

no test coverage detected