diff --git a/src/sipvoiplink.cpp b/src/sipvoiplink.cpp index c7c3852a16b0b059882b39cd96436fd3e454686f..2ca9965b9a610018b011d6fdc0dd7cd73cb0c0e2 100644 --- a/src/sipvoiplink.cpp +++ b/src/sipvoiplink.cpp @@ -240,19 +240,29 @@ SipVoIPLink::outgoingInvite (short id, const string& to_url) if (get_config_fields_str(SIGNALISATION, PROXY).empty()) { // If no SIP proxy setting for direct call with only IP address - if (startCall(id, from, to, "", "") <= 0) { - _debug("Warning SipVoIPLink: call not started\n"); - return -1; - } + if (checkNetwork()) { + if (startCall(id, from, to, "", "") <= 0) { + _debug("Warning SipVoIPLink: call not started\n"); + return -1; + } + } else { + Manager::instance().displayErrorText("No network found\n"); + return -1; + } return 0; } else { // If SIP proxy setting string route = "<sip:" + get_config_fields_str(SIGNALISATION, PROXY) + ";lr>"; - if (startCall(id, from, to, "", route) <= 0) { - _debug("Warning SipVoIPLink: call not started\n"); - return -1; - } + if (checkNetwork()) { + if (startCall(id, from, to, "", route) <= 0) { + _debug("Warning SipVoIPLink: call not started\n"); + return -1; + } + } else { + Manager::instance().displayErrorText("No network found\n"); + return -1; + } return 0; } }