New Version 1.6
authorroot <root@nuedel.(none)>
Sun, 6 Sep 2009 13:36:36 +0000 (15:36 +0200)
committerroot <root@nuedel.(none)>
Sun, 6 Sep 2009 13:36:36 +0000 (15:36 +0200)
Fix of conference release bug.
Calls can now be forwarded during alerting phase via "*3#".

modified:   README
modified:   apppbx.cpp
modified:   configure
modified:   configure.ac
new file:   default/openbsc.cfg
modified:   dss1.cpp
modified:   gsm.cpp
modified:   joinpbx.cpp

README
apppbx.cpp
configure
configure.ac
default/openbsc.cfg [new file with mode: 0644]
dss1.cpp
gsm.cpp
joinpbx.cpp

diff --git a/README b/README
index e863b8b..77f3714 100644 (file)
--- a/README
+++ b/README
@@ -508,6 +508,11 @@ Changes after Version 1.5
   branch.
 - Minor fixes and source cleanups.
 - Added patch by Kai Peter to complete screening indicators. Thanx!
   branch.
 - Minor fixes and source cleanups.
 - Added patch by Kai Peter to complete screening indicators. Thanx!
+- Join conference during alerting phase, so calls can be forwarded.
+- Fixed conference release bug.
+
+New release Version 1.6
+
 
 
 
 
 
 
index fc50737..2a91364 100644 (file)
@@ -1565,7 +1565,7 @@ void EndpointAppPBX::port_information(struct port_list *portlist, int message_ty
        }
 
        /* keypad when connected */
        }
 
        /* keypad when connected */
-       if (e_state == EPOINT_STATE_CONNECT) {
+       if (e_state == EPOINT_STATE_CONNECT || e_state == EPOINT_STATE_IN_ALERTING) {
                if (e_ext.keypad || e_enablekeypad) {
                        PDEBUG(DEBUG_EPOINT, "EPOINT(%d) keypad information received during connect: %s.\n", ea_endpoint->ep_serial, param->information.id);
                        /* processing keypad function */
                if (e_ext.keypad || e_enablekeypad) {
                        PDEBUG(DEBUG_EPOINT, "EPOINT(%d) keypad information received during connect: %s.\n", ea_endpoint->ep_serial, param->information.id);
                        /* processing keypad function */
@@ -1639,7 +1639,7 @@ NOTE: vbox is now handled due to overlap state
 #endif
 
        /* check for *X# sequence */
 #endif
 
        /* check for *X# sequence */
-       if (e_state == EPOINT_STATE_CONNECT) {
+       if (e_state == EPOINT_STATE_CONNECT || e_state == EPOINT_STATE_IN_ALERTING) {
                if (e_dtmf_time+3 < now) {
                        /* the last digit was too far in the past to be a sequence */
                        if (param->dtmf == '*')
                if (e_dtmf_time+3 < now) {
                        /* the last digit was too far in the past to be a sequence */
                        if (param->dtmf == '*')
@@ -2758,6 +2758,9 @@ void EndpointAppPBX::join_alerting(struct port_list *portlist, int message_type,
                set_tone(portlist, "ringpbx");
        else
                set_tone(portlist, "ringing");
                set_tone(portlist, "ringpbx");
        else
                set_tone(portlist, "ringing");
+
+       if (e_ext.number[0])
+               e_dtmf = 1; /* allow dtmf */
 }
 
 /* join MESSAGE_CONNECT */
 }
 
 /* join MESSAGE_CONNECT */
@@ -3514,7 +3517,7 @@ void EndpointAppPBX::join_join(void)
        class Port *our_port, *other_port;
        class Pdss1 *our_pdss1, *other_pdss1;
 
        class Port *our_port, *other_port;
        class Pdss1 *our_pdss1, *other_pdss1;
 
-       /* are we a candidate to join a join */
+       /* are we a candidate to join a join? */
        our_join = find_join_id(ea_endpoint->ep_join_id);
        if (!our_join) {
                PDEBUG(DEBUG_EPOINT, "EPOINT(%d) cannot join: our join doesn't exist anymore.\n", ea_endpoint->ep_serial);
        our_join = find_join_id(ea_endpoint->ep_join_id);
        if (!our_join) {
                PDEBUG(DEBUG_EPOINT, "EPOINT(%d) cannot join: our join doesn't exist anymore.\n", ea_endpoint->ep_serial);
@@ -3575,14 +3578,14 @@ void EndpointAppPBX::join_join(void)
                other_eapp = other_eapp->next;
        }
        if (!other_eapp) {
                other_eapp = other_eapp->next;
        }
        if (!other_eapp) {
-               PDEBUG(DEBUG_EPOINT, "EPOINT(%d) cannot join: no other endpoint on same isdn interface with port on hold.\n", ea_endpoint->ep_serial);
+               PDEBUG(DEBUG_EPOINT, "EPOINT(%d) cannot join: no other endpoint on same isdn terminal.\n", ea_endpoint->ep_serial);
                return;
        }
                return;
        }
-       PDEBUG(DEBUG_EPOINT, "EPOINT(%d) port on hold found.\n", ea_endpoint->ep_serial);
+       PDEBUG(DEBUG_EPOINT, "EPOINT(%d) port with same terminal found.\n", ea_endpoint->ep_serial);
 
        /* if we have the same join */
        if (other_eapp->ea_endpoint->ep_join_id == ea_endpoint->ep_join_id) {
 
        /* if we have the same join */
        if (other_eapp->ea_endpoint->ep_join_id == ea_endpoint->ep_join_id) {
-               PDEBUG(DEBUG_EPOINT, "EPOINT(%d) cannot join: we an the other have the same join.\n", ea_endpoint->ep_serial);
+               PDEBUG(DEBUG_EPOINT, "EPOINT(%d) cannot join: we and the other have the same join.\n", ea_endpoint->ep_serial);
                return;
        }
        other_join = find_join_id(other_eapp->ea_endpoint->ep_join_id);
                return;
        }
        other_join = find_join_id(other_eapp->ea_endpoint->ep_join_id);
index 59b587d..a924db7 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for lcr 1.5.
+# Generated by GNU Autoconf 2.63 for lcr 1.6.
 #
 # Report bugs to <andreas@eversberg.eu>.
 #
 #
 # Report bugs to <andreas@eversberg.eu>.
 #
@@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='lcr'
 PACKAGE_TARNAME='lcr'
 # Identity of this package.
 PACKAGE_NAME='lcr'
 PACKAGE_TARNAME='lcr'
-PACKAGE_VERSION='1.5'
-PACKAGE_STRING='lcr 1.5'
+PACKAGE_VERSION='1.6'
+PACKAGE_STRING='lcr 1.6'
 PACKAGE_BUGREPORT='andreas@eversberg.eu'
 
 ac_unique_file="main.c"
 PACKAGE_BUGREPORT='andreas@eversberg.eu'
 
 ac_unique_file="main.c"
@@ -1300,7 +1300,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures lcr 1.5 to adapt to many kinds of systems.
+\`configure' configures lcr 1.6 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1366,7 +1366,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of lcr 1.5:";;
+     short | recursive ) echo "Configuration of lcr 1.6:";;
    esac
   cat <<\_ACEOF
 
    esac
   cat <<\_ACEOF
 
@@ -1466,7 +1466,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-lcr configure 1.5
+lcr configure 1.6
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1480,7 +1480,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by lcr $as_me 1.5, which was
+It was created by lcr $as_me 1.6, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -4038,7 +4038,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=lcr
 
 # Define the identity of the package.
  PACKAGE=lcr
- VERSION=1.5
+ VERSION=1.6
 
 
 cat >>confdefs.h <<_ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
@@ -10148,7 +10148,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by lcr $as_me 1.5, which was
+This file was extended by lcr $as_me 1.6, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -10211,7 +10211,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-lcr config.status 1.5
+lcr config.status 1.6
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
index c4850b3..eaa0af5 100644 (file)
@@ -24,7 +24,7 @@ dnl    Boston, MA 02110-1301, USA.
 dnl This keeps being the first instruction.
 dnl Change the 2nd argument if the version increases
 dnl 1st + 2nd argument is used for distribution package name
 dnl This keeps being the first instruction.
 dnl Change the 2nd argument if the version increases
 dnl 1st + 2nd argument is used for distribution package name
-AC_INIT(lcr, 1.5, andreas@eversberg.eu)
+AC_INIT(lcr, 1.6, andreas@eversberg.eu)
 AC_PREREQ(2.59)
 AC_CONFIG_SRCDIR([main.c])
 AM_CONFIG_HEADER(config.h)
 AC_PREREQ(2.59)
 AC_CONFIG_SRCDIR([main.c])
 AM_CONFIG_HEADER(config.h)
@@ -32,7 +32,7 @@ AM_CONFIG_HEADER(config.h)
 # fix warnings from autoconf + automake
 AC_GNU_SOURCE
 # AC_USE_SYSTEM_EXTENSIONS
 # fix warnings from autoconf + automake
 AC_GNU_SOURCE
 # AC_USE_SYSTEM_EXTENSIONS
-AM_INIT_AUTOMAKE(lcr,1.5)
+AM_INIT_AUTOMAKE(lcr,1.6)
 
 
 
 
 
 
diff --git a/default/openbsc.cfg b/default/openbsc.cfg
new file mode 100644 (file)
index 0000000..05ec4c0
--- /dev/null
@@ -0,0 +1,155 @@
+!
+! OpenBSC configuration saved from vty
+!   !
+password foo
+!
+line vty
+ no login
+!
+network
+! select county code and network code. 1 equals test network
+ network country code 1
+ mobile network code 1
+! name the network
+ short name OpenBSC
+ long name OpenBSC
+! define first bts (counted from 0)
+ bts 0
+  type bs11
+  band GSM900
+  location_area_code 1
+  training_sequence_code 7
+  base_station_id_code 63
+  oml e1 line 0 timeslot 1 sub-slot full
+  oml e1 tei 25
+! define tranceiver for this bts (counted from 0)
+  trx 0
+! frequency number from 1 to 124 (GSM900)
+   arfcn 121
+   max_power_red 0
+! all line numbers (0 in this case) must match your mISDN port
+   rsl e1 line 0 timeslot 1 sub-slot full
+   rsl e1 tei 1
+    timeslot 0
+     phys_chan_config CCCH+SDCCH4
+     e1 line 0 timeslot 1 sub-slot full
+    timeslot 1
+     phys_chan_config SDCCH8
+     e1 line 0 timeslot 2 sub-slot 1
+    timeslot 2
+     phys_chan_config TCH/F
+     e1 line 0 timeslot 2 sub-slot 2
+    timeslot 3
+     phys_chan_config TCH/F
+     e1 line 0 timeslot 2 sub-slot 3
+    timeslot 4
+     phys_chan_config TCH/F
+     e1 line 0 timeslot 3 sub-slot 0
+    timeslot 5
+     phys_chan_config TCH/F
+     e1 line 0 timeslot 3 sub-slot 1
+    timeslot 6
+     phys_chan_config TCH/F
+     e1 line 0 timeslot 3 sub-slot 2
+    timeslot 7
+     phys_chan_config TCH/F
+     e1 line 0 timeslot 3 sub-slot 3
+! uncomment this for second TRX, if enabled on BS11
+!  trx 1
+!   arfcn 123
+!   max_power_red 0
+!   rsl e1 line 0 timeslot 1 sub-slot full
+!   rsl e1 tei 2
+!    timeslot 0
+!     phys_chan_config TCH/F
+!     e1 line 0 timeslot 4 sub-slot 0
+!    timeslot 1
+!     phys_chan_config TCH/F
+!     e1 line 0 timeslot 4 sub-slot 1
+!    timeslot 2
+!     phys_chan_config TCH/F
+!     e1 line 0 timeslot 4 sub-slot 2
+!    timeslot 3
+!     phys_chan_config TCH/F
+!     e1 line 0 timeslot 4 sub-slot 3
+!    timeslot 4
+!     phys_chan_config TCH/F
+!     e1 line 0 timeslot 5 sub-slot 0
+!    timeslot 5
+!     phys_chan_config TCH/F
+!     e1 line 0 timeslot 5 sub-slot 1
+!    timeslot 6
+!     phys_chan_config TCH/F
+!     e1 line 0 timeslot 5 sub-slot 2
+!    timeslot 7
+!     phys_chan_config TCH/F
+!     e1 line 0 timeslot 5 sub-slot 3
+! enable this for second BS11 on mISDN port 1
+! bts 1
+!  type bs11
+!  band GSM900
+!  location_area_code 2
+!  training_sequence_code 7
+!  base_station_id_code 63
+!  oml e1 line 1 timeslot 6 sub-slot full
+!  oml e1 tei 25
+!  trx 0
+!   arfcn 122
+!   max_power_red 0
+!   rsl e1 line 1 timeslot 6 sub-slot full
+!   rsl e1 tei 1
+!    timeslot 0
+!     phys_chan_config CCCH+SDCCH4
+!     e1 line 1 timeslot 7 sub-slot 0
+!    timeslot 1
+!     phys_chan_config SDCCH8
+!     e1 line 1 timeslot 7 sub-slot 1
+!    timeslot 2
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 7 sub-slot 2
+!    timeslot 3
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 7 sub-slot 3
+!    timeslot 4
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 8 sub-slot 0
+!    timeslot 5
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 8 sub-slot 1
+!    timeslot 6
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 8 sub-slot 2
+!    timeslot 7
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 8 sub-slot 3
+!  trx 1
+!   arfcn 124
+!   max_power_red 0
+!   rsl e1 line 1 timeslot 6 sub-slot full
+!   rsl e1 tei 2
+!    timeslot 0
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 9 sub-slot 0
+!    timeslot 1
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 9 sub-slot 1
+!    timeslot 2
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 9 sub-slot 2
+!    timeslot 3
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 9 sub-slot 3
+!    timeslot 4
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 10 sub-slot 0
+!    timeslot 5
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 10 sub-slot 1
+!    timeslot 6
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 10 sub-slot 2
+!    timeslot 7
+!     phys_chan_config TCH/F
+!     e1 line 1 timeslot 10 sub-slot 3
+
+
index 610049f..a5d32bd 100644 (file)
--- a/dss1.cpp
+++ b/dss1.cpp
@@ -2239,7 +2239,7 @@ void Pdss1::message_notify(unsigned int epoint_id, int message_id, union paramet
        int notify;
        int plan = 0, type = -1, present = 0;
 
        int notify;
        int plan = 0, type = -1, present = 0;
 
-       printf("if = %d\n", param->notifyinfo.notify);
+//     printf("if = %d\n", param->notifyinfo.notify);
        if (param->notifyinfo.notify>INFO_NOTIFY_NONE)
                notify = param->notifyinfo.notify & 0x7f;
        else
        if (param->notifyinfo.notify>INFO_NOTIFY_NONE)
                notify = param->notifyinfo.notify & 0x7f;
        else
diff --git a/gsm.cpp b/gsm.cpp
index 9c19e94..50a8b1d 100644 (file)
--- a/gsm.cpp
+++ b/gsm.cpp
@@ -1217,7 +1217,7 @@ void Pgsm::message_notify(unsigned int epoint_id, int message_id, union paramete
        struct gsm_mncc *mncc;
        int notify;
 
        struct gsm_mncc *mncc;
        int notify;
 
-       printf("if = %d\n", param->notifyinfo.notify);
+//     printf("if = %d\n", param->notifyinfo.notify);
        if (param->notifyinfo.notify>INFO_NOTIFY_NONE) {
                notify = param->notifyinfo.notify & 0x7f;
                if (p_state!=PORT_STATE_CONNECT /*&& p_state!=PORT_STATE_IN_PROCEEDING*/ && p_state!=PORT_STATE_IN_ALERTING) {
        if (param->notifyinfo.notify>INFO_NOTIFY_NONE) {
                notify = param->notifyinfo.notify & 0x7f;
                if (p_state!=PORT_STATE_CONNECT /*&& p_state!=PORT_STATE_IN_PROCEEDING*/ && p_state!=PORT_STATE_IN_ALERTING) {
index 5c686dc..dd54e9b 100644 (file)
@@ -525,7 +525,7 @@ int joinpbx_countrelations(unsigned int join_id)
        if (!join)
                return(0);
 
        if (!join)
                return(0);
 
-       if (join->j_type != JOIN_TYPE_REMOTE)
+       if (join->j_type == JOIN_TYPE_REMOTE)
                return(2);
 
        if (join->j_type != JOIN_TYPE_PBX)
                return(2);
 
        if (join->j_type != JOIN_TYPE_PBX)
@@ -635,6 +635,9 @@ void JoinPBX::message_epoint(unsigned int epoint_id, int message_type, union par
                return;
        }
 
                return;
        }
 
+       /* count relations */
+       num=joinpbx_countrelations(j_serial);
+
        /* process party line */
        if (message_type == MESSAGE_SETUP) if (param->setup.partyline && !j_partyline) {
                j_partyline = param->setup.partyline;
        /* process party line */
        if (message_type == MESSAGE_SETUP) if (param->setup.partyline && !j_partyline) {
                j_partyline = param->setup.partyline;
@@ -783,7 +786,12 @@ void JoinPBX::message_epoint(unsigned int epoint_id, int message_type, union par
                                release(j_relation, LOCATION_PRIVATE_LOCAL, CAUSE_NORMAL);
                                return; // must return, because join IS destroyed
                        }
                                release(j_relation, LOCATION_PRIVATE_LOCAL, CAUSE_NORMAL);
                                return; // must return, because join IS destroyed
                        }
-                       /* remove all relations that are in called */
+                       /* in a conf, we don't kill the other members */
+                       if (num > 2) {
+                               release(relation, 0, 0);
+                               return;
+                       }
+                       /* remove all relations that are of called type */
                        release_again2:
                        reltemp = j_relation;
                        while(reltemp) {
                        release_again2:
                        reltemp = j_relation;
                        while(reltemp) {
@@ -809,9 +817,6 @@ void JoinPBX::message_epoint(unsigned int epoint_id, int message_type, union par
                return; // must return, because join may be destroyed
        }
 
                return; // must return, because join may be destroyed
        }
 
-       /* count relations */
-       num=joinpbx_countrelations(j_serial);
-
        /* check number of relations */
        if (num > 2) {
                PDEBUG(DEBUG_JOIN, "join has more than two relations so there is no need to send a message.\n");
        /* check number of relations */
        if (num > 2) {
                PDEBUG(DEBUG_JOIN, "join has more than two relations so there is no need to send a message.\n");