X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=apppbx.cpp;h=25521dddb6907efd68cd774233cd31fc124453c8;hp=2a91364c3c03b22cc749fe0352c0ef339cd70ed9;hb=feea42c7f7f2e171c1490bd0d3af09beba629f21;hpb=8e459a7c85348cb68e66daecafe2dd6e5e06a23e diff --git a/apppbx.cpp b/apppbx.cpp index 2a91364..25521dd 100644 --- a/apppbx.cpp +++ b/apppbx.cpp @@ -550,28 +550,36 @@ struct mISDNport *EndpointAppPBX::hunt_port(char *ifname, int *channel) struct select_channel *selchannel; struct mISDNport *mISDNport; int index, i; + int there_is_an_external = 0; interface = interface_first; /* first find the given interface or, if not given, one with no extension */ checknext: - if (!interface) + if (!interface) { + if (!there_is_an_external && !(ifname && ifname[0])) { + trace_header("CHANNEL SELECTION (no external interface specified)", DIRECTION_NONE); + add_trace("info", NULL, "Add 'external' parameter to interface.conf."); + end_trace(); + } return(NULL); + } /* check for given interface */ - if (ifname) { + if (ifname && ifname[0]) { if (!strcasecmp(interface->name, ifname)) { /* found explicit interface */ - trace_header("CHANNEL SELECTION (found interface)", DIRECTION_NONE); + trace_header("CHANNEL SELECTION (found given interface)", DIRECTION_NONE); add_trace("interface", NULL, "%s", ifname); end_trace(); goto foundif; } } else { - if (!interface->extension) { + if (interface->external) { + there_is_an_external = 1; /* found non extension */ - trace_header("CHANNEL SELECTION (found non extension interface)", DIRECTION_NONE); + trace_header("CHANNEL SELECTION (found external interface)", DIRECTION_NONE); add_trace("interface", NULL, "%s", interface->name); end_trace(); goto foundif;