diff --git a/apps/examples/urlcatcher/Makefile b/apps/examples/urlcatcher/Makefile index cabf8aa7..3035ed29 100644 --- a/apps/examples/urlcatcher/Makefile +++ b/apps/examples/urlcatcher/Makefile @@ -3,5 +3,5 @@ plug_in_name = urlcatcher module_ldflags = module_cflags = -COREPATH ?=../../core +COREPATH ?=../../../core include $(COREPATH)/plug-in/Makefile.app_module diff --git a/apps/examples/urlcatcher/UrlCatcher.cpp b/apps/examples/urlcatcher/UrlCatcher.cpp index ebb06f76..147dedc7 100644 --- a/apps/examples/urlcatcher/UrlCatcher.cpp +++ b/apps/examples/urlcatcher/UrlCatcher.cpp @@ -75,7 +75,13 @@ AmSession* UrlCatcherFactory::onInvite(const AmSipRequest& req) if (sdp.uri.empty()) throw AmSession::Exception(404, "Not Found Here (No Call URI found)"); - system((UrlCatcherFactory::ExecCmd + " \""+sdp.uri+"\"").c_str()); + int res = system((UrlCatcherFactory::ExecCmd + " \""+sdp.uri+"\"").c_str()); + if (res == -1) { + ERROR("executing system command '%s'\n", + (UrlCatcherFactory::ExecCmd + " \""+sdp.uri+"\"").c_str()); + } else { + DBG("command returned code %d\n", res); + } throw AmSession::Exception(404, "Not Found Here (but I got your URL)"); }