diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index fe433aace..cbd1bfb95 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -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; } diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp index 621630eab..20886ff2c 100644 --- a/sflphone-common/src/sip/sipvoiplink.cpp +++ b/sflphone-common/src/sip/sipvoiplink.cpp @@ -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);