summaryrefslogtreecommitdiffstats
path: root/apppbx.cpp
diff options
context:
space:
mode:
authorAndreas Eversberg2009-09-23 10:07:00 +0200
committerAndreas Eversberg2009-09-23 10:07:00 +0200
commitfeea42c7f7f2e171c1490bd0d3af09beba629f21 (patch)
tree9a3dfc15ae995a73d6269b81ce6de59cbe7ca5c0 /apppbx.cpp
parentFixed bad bug in joining calls. Please update, if you have changed to version... (diff)
downloadlcr-feea42c7f7f2e171c1490bd0d3af09beba629f21.tar.gz
lcr-feea42c7f7f2e171c1490bd0d3af09beba629f21.tar.xz
lcr-feea42c7f7f2e171c1490bd0d3af09beba629f21.zip
Added 'extern' flag to interface.conf.
If no specific interface is given for the 'extern' rule in the routing.conf, or if call is forwarded (settings), then only interfaces marked with 'extern' flag are used. You need to set this flag when upgrading to this version. See default/interface.conf for hint. modified: README modified: apppbx.cpp modified: default/interface.conf modified: interface.c modified: interface.h
Diffstat (limited to 'apppbx.cpp')
-rw-r--r--apppbx.cpp18
1 files changed, 13 insertions, 5 deletions
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;