Skip to content
Snippets Groups Projects
Commit e23c383d authored by Tristan Matthews's avatar Tristan Matthews
Browse files

sip: removed unused sip_utils::createRouteSetList function

parent 482a0502
Branches
Tags
No related merge requests found
...@@ -97,36 +97,6 @@ sip_utils::createRouteSet(const std::string &route, pj_pool_t *hdr_pool) ...@@ -97,36 +97,6 @@ sip_utils::createRouteSet(const std::string &route, pj_pool_t *hdr_pool)
return route_set; return route_set;
} }
pjsip_route_hdr *
sip_utils::createRouteSetList(const std::string &route, pj_pool_t *hdr_pool)
{
pjsip_route_hdr *route_set = pjsip_route_hdr_create(hdr_pool);
std::string host;
int port = 0;
size_t found = route.find(":");
if (found != std::string::npos) {
host = route.substr(0, found);
port = atoi(route.substr(found + 1, route.length() - found).c_str());
} else
host = route;
std::vector<std::string> ipList(getIPList(host));
for (std::vector<std::string>::const_iterator iter = ipList.begin(); iter != ipList.end(); ++iter) {
pjsip_route_hdr *routing = pjsip_route_hdr_create(hdr_pool);
pjsip_sip_uri *url = pjsip_sip_uri_create(hdr_pool, 0);
url->lr_param = 1;
routing->name_addr.uri = (pjsip_uri*) url;
pj_strdup2(hdr_pool, &url->host, iter->c_str());
url->port = port;
DEBUG("Adding route %s", iter->c_str());
pj_list_push_back(route_set, pjsip_hdr_clone(hdr_pool, routing));
}
return route_set;
}
std::string std::string
sip_utils::parseDisplayName(const char * buffer) sip_utils::parseDisplayName(const char * buffer)
......
...@@ -49,9 +49,6 @@ namespace sip_utils { ...@@ -49,9 +49,6 @@ namespace sip_utils {
pjsip_route_hdr * pjsip_route_hdr *
createRouteSet(const std::string &route, pj_pool_t *hdr_pool); createRouteSet(const std::string &route, pj_pool_t *hdr_pool);
pjsip_route_hdr *
createRouteSetList(const std::string &route, pj_pool_t *hdr_pool);
void stripSipUriPrefix(std::string& sipUri); void stripSipUriPrefix(std::string& sipUri);
std::string parseDisplayName(const char * buffer); std::string parseDisplayName(const char * buffer);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment