fixed dialing-bug when dialing chan_lcr
authorSuper User <root@isdn.jolly.ten>
Sat, 7 Jun 2008 18:32:12 +0000 (20:32 +0200)
committerSuper User <root@isdn.jolly.ten>
Sat, 7 Jun 2008 18:32:12 +0000 (20:32 +0200)
modified:   action.cpp
modified:   apppbx.h
modified:   configure.ac

action.cpp
apppbx.h
configure.ac

index ce741c6..11eafe5 100644 (file)
@@ -17,7 +17,7 @@ extern char **environ;
 /*
  * process init 'internal' / 'external' / 'remote' / 'vbox-record' / 'partyline'...
  */
 /*
  * process init 'internal' / 'external' / 'remote' / 'vbox-record' / 'partyline'...
  */
-void EndpointAppPBX::_action_init_call(char *remote)
+int EndpointAppPBX::_action_init_call(char *remote)
 {
        class Join              *join;
        struct port_list        *portlist = ea_endpoint->ep_portlist;
 {
        class Join              *join;
        struct port_list        *portlist = ea_endpoint->ep_portlist;
@@ -28,7 +28,7 @@ void EndpointAppPBX::_action_init_call(char *remote)
        {
                if (options.deb & DEBUG_EPOINT)
                        PERROR("EPOINT(%d): We already have a call instance, this should never happen!\n", ea_endpoint->ep_serial);
        {
                if (options.deb & DEBUG_EPOINT)
                        PERROR("EPOINT(%d): We already have a call instance, this should never happen!\n", ea_endpoint->ep_serial);
-               return;
+               return(0);
        }
 
        /* create join */
        }
 
        /* create join */
@@ -51,7 +51,7 @@ void EndpointAppPBX::_action_init_call(char *remote)
                        message_disconnect_port(portlist, CAUSE_OUTOFORDER, LOCATION_PRIVATE_LOCAL, "");
                        new_state(EPOINT_STATE_OUT_DISCONNECT);
                        set_tone(portlist,"cause_1b");
                        message_disconnect_port(portlist, CAUSE_OUTOFORDER, LOCATION_PRIVATE_LOCAL, "");
                        new_state(EPOINT_STATE_OUT_DISCONNECT);
                        set_tone(portlist,"cause_1b");
-                       return;
+                       return(0);
                }
                join = new JoinRemote(ea_endpoint->ep_serial, remote, admin->sock);
        }
                }
                join = new JoinRemote(ea_endpoint->ep_serial, remote, admin->sock);
        }
@@ -60,6 +60,7 @@ void EndpointAppPBX::_action_init_call(char *remote)
        if (!join)
                FATAL("No memoy for Join instance.\n");
        ea_endpoint->ep_join_id = join->j_serial;
        if (!join)
                FATAL("No memoy for Join instance.\n");
        ea_endpoint->ep_join_id = join->j_serial;
+       return(1);
 }
 void EndpointAppPBX::action_init_call(void)
 {
 }
 void EndpointAppPBX::action_init_call(void)
 {
@@ -358,7 +359,7 @@ void EndpointAppPBX::action_dialing_remote(void)
        char                    context[128] = "";
        char                    remote[32];
 
        char                    context[128] = "";
        char                    remote[32];
 
-       if (e_state == EPOINT_STATE_IN_SETUP && !ea_endpoint->ep_join_id)
+       if (!ea_endpoint->ep_join_id)
        {
                /* no join yet, sending setup */
                if (!(rparam = routeparam(e_action, PARAM_APPLICATION)))
        {
                /* no join yet, sending setup */
                if (!(rparam = routeparam(e_action, PARAM_APPLICATION)))
@@ -371,7 +372,8 @@ void EndpointAppPBX::action_dialing_remote(void)
                        return;
                }
                SCPY(remote, rparam->string_value);
                        return;
                }
                SCPY(remote, rparam->string_value);
-               _action_init_call(remote);
+               if (!_action_init_call(remote))
+                       return;
 
                /* create bearer/caller/dialinginfo */
                memcpy(&capainfo, &e_capainfo, sizeof(capainfo));
 
                /* create bearer/caller/dialinginfo */
                memcpy(&capainfo, &e_capainfo, sizeof(capainfo));
index d9c9638..7bdf008 100644 (file)
--- a/apppbx.h
+++ b/apppbx.h
@@ -250,7 +250,7 @@ class EndpointAppPBX : public EndpointApp
        struct route_param *routeparam(struct route_action *action, unsigned long long id);
 
        /* init / dialing / hangup */
        struct route_param *routeparam(struct route_action *action, unsigned long long id);
 
        /* init / dialing / hangup */
-       void _action_init_call(char *remote);
+       int _action_init_call(char *remote);
        void action_init_call(void);
        void action_init_remote(void);
        void action_dialing_internal(void);
        void action_init_call(void);
        void action_init_remote(void);
        void action_dialing_internal(void);
index fa3101f..dd64493 100644 (file)
@@ -1,5 +1,3 @@
-OUTDATED, please update
-
 ##   -*- autoconf -*-
 
 dnl    This file is part of linux-call-router
 ##   -*- autoconf -*-
 
 dnl    This file is part of linux-call-router
@@ -52,17 +50,6 @@ dnl AM_PROG_CC_C_O
 dnl enable this to have all special options on one place
 dnl AC_PRESERVE_HELP_ORDER
 
 dnl enable this to have all special options on one place
 dnl AC_PRESERVE_HELP_ORDER
 
-# enable socket access to misdn kernel module on demand
-dnl SOCKET_MISDN=
-AC_ARG_ENABLE([socket_misdn],
-              [AS_HELP_STRING([--enable-socket-misdn],
-                              [use socket connection to misdn kernel code (default=disable)])
-              ],
-              [use_misdn_socket="yes"],
-              [use_misdn_socket="no"]
-             )
-AM_CONDITIONAL(ENABLE_SOCKET_MISDN, test "x$use_misdn_socket" == "xyes" )
-
 # check for asterisk
 AC_ARG_WITH([asterisk],
        [AS_HELP_STRING([--with-asterisk],
 # check for asterisk
 AC_ARG_WITH([asterisk],
        [AS_HELP_STRING([--with-asterisk],
@@ -98,10 +85,6 @@ AS_IF([test "x$with_ssl" != xno],
      )
 AM_CONDITIONAL(WITH_CRYPTO, test "x$LIBCRYPTO" == "x-lcrypto" )
 
      )
 AM_CONDITIONAL(WITH_CRYPTO, test "x$LIBCRYPTO" == "x-lcrypto" )
 
-# check for isdn_net.h
-# check for mISDNlib.h
-# --with-isdn_net-include=<include>, default: env MISDNUSER= , $include/mISDNuser
-
 # self written test for mISDNuser lib
 AC_PATH_MISDNUSER
 
 # self written test for mISDNuser lib
 AC_PATH_MISDNUSER