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

Function parse_to_uri

parser/parse_to.c:844–865  ·  view source on GitHub ↗

* */

Source from the content-addressed store, hash-verified

842 *
843 */
844struct sip_uri *parse_to_uri(struct sip_msg *msg)
845{
846 struct to_body *tb = NULL;
847 if(msg==NULL || msg->to==NULL || msg->to->parsed==NULL)
848 return NULL;
849
850 tb = get_to(msg);
851
852 if(tb->parsed_uri.user.s!=NULL || tb->parsed_uri.host.s!=NULL)
853 return &tb->parsed_uri;
854
855 if (parse_uri(tb->uri.s, tb->uri.len , &tb->parsed_uri)<0)
856 {
857 LM_ERR("failed to parse To uri\n");
858 memset(&tb->parsed_uri, 0, sizeof(struct sip_uri));
859 set_err_info(OSER_EC_PARSER, OSER_EL_MEDIUM, "error parsing To uri");
860 set_err_reply(400, "bad To uri");
861 return NULL;
862 }
863
864 return &tb->parsed_uri;
865}
866
867int parse_to_header( struct sip_msg *msg)
868{

Callers 13

pv_get_xto_attrFunction · 0.85
get_realmFunction · 0.85
w_sip_validateFunction · 0.85
check_toFunction · 0.85
ospParseSubscribeFunction · 0.85
get_username_domainFunction · 0.85
aaa_is_user_inFunction · 0.85
get_uri_userFunction · 0.85
b2bl_insert_newFunction · 0.85
b2b_msg_get_toFunction · 0.85
l_siplua_getURI_UserFunction · 0.85
l_sipwatch_getFlagFunction · 0.85

Calls 3

parse_uriFunction · 0.85
set_err_infoFunction · 0.85
set_err_replyFunction · 0.85

Tested by

no test coverage detected