Commit 382ba818 authored by Alexandre Savard's avatar Alexandre Savard

[#1722] Handle SIPS URI

parent 138b0001
......@@ -80,6 +80,10 @@ static gboolean _is_direct_call(callable_obj_t * c) {
return 1;
}
if(g_str_has_prefix (c->_peer_number, "sips:")) {
return 1;
}
return 0;
}
......
......@@ -1591,10 +1591,11 @@ bool SIPVoIPLink::new_ip_to_ip_call (const CallID& id, const std::string& to)
pj_str_t remote;
int at = toUri.find("@");
std::string remotestr = toUri.substr(at+1, toUri.size()-1);
int trns = toUri.find(";transport");
std::string remotestr = toUri.substr(at+1, trns-at-1);
pj_cstr(&remote, remotestr.c_str());
pj_sockaddr_in_init(&rem_addr, &remote, (pj_uint16_t)5060);
pj_sockaddr_in_init(&rem_addr, &remote, (pj_uint16_t)5061);
pjsip_transport *tcp;
pjsip_endpt_acquire_transport(_endpt, PJSIP_TRANSPORT_TLS, &rem_addr, sizeof(rem_addr),
......@@ -1664,6 +1665,10 @@ bool SIPVoIPLink::new_ip_to_ip_call (const CallID& id, const std::string& to)
init_transport_selector (account->getAccountTransport(), &tp);
if(!account->getAccountTransport()) {
_debug("Error transport is NULL in ip to ip call");
}
// set_transport methods increment transport's ref_count
status = pjsip_dlg_set_transport (dialog, tp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment