fixed dialing bug to remote application
authorSuper User <root@isdn.jolly.ten>
Sun, 15 Jun 2008 12:29:09 +0000 (14:29 +0200)
committerSuper User <root@isdn.jolly.ten>
Sun, 15 Jun 2008 12:29:09 +0000 (14:29 +0200)
modified:   action.cpp
modified:   apppbx.cpp
modified:   chan_lcr.c
modified:   mISDN.cpp

action.cpp
apppbx.cpp
chan_lcr.c
mISDN.cpp

index 11eafe5..e815fd3 100644 (file)
@@ -393,6 +393,7 @@ void EndpointAppPBX::action_dialing_remote(void)
                {
                        SCPY(dialinginfo.id, e_extdialing);
                }
+               e_extdialing = e_dialinginfo.id + strlen(e_dialinginfo.id);
                /* send setup to remote */
                trace_header("ACTION remote (setup)", DIRECTION_NONE);
                add_trace("number", NULL, dialinginfo.id);
index e491a57..f79cd0e 100644 (file)
@@ -1705,7 +1705,8 @@ void EndpointAppPBX::port_information(struct port_list *portlist, int message_ty
        }
        if (e_action)
        if (e_action->index==ACTION_OUTDIAL
-        || e_action->index==ACTION_EXTERNAL)
+        || e_action->index==ACTION_EXTERNAL
+        || e_action->index==ACTION_REMOTE)
        {
                if (!e_extdialing)
                        set_tone(portlist, "dialing");
@@ -2886,10 +2887,16 @@ void EndpointAppPBX::join_overlap(struct port_list *portlist, int message_type,
                                set_tone(portlist, "dialtone");
                        return;
        }
-       if (e_ext.number[0])
-               set_tone(portlist, "dialpbx");
-       else
-               set_tone(portlist, "dialtone");
+       if (e_dialinginfo.id[0])
+       {
+               set_tone(portlist, "dialing");
+       } else
+       {
+               if (e_ext.number[0])
+                       set_tone(portlist, "dialpbx");
+               else
+                       set_tone(portlist, "dialtone");
+       }
 }
 
 /* join MESSAGE_PROCEEDING */
@@ -3377,7 +3384,7 @@ void EndpointAppPBX::ea_message_join(unsigned int join_id, int message_type, uni
 
                /* JOIN sends OVERLAP message */
                case MESSAGE_OVERLAP:
-               PDEBUG(DEBUG_EPOINT, "EPOINT(%d) epoint with terminal '%s' (caller id '%s') received 'more info available'\n", ea_endpoint->ep_serial, e_ext.number, e_callerinfo.id);
+               PDEBUG(DEBUG_EPOINT, "EPOINT(%d) epoint with terminal '%s' (caller id '%s') received 'more info required'\n", ea_endpoint->ep_serial, e_ext.number, e_callerinfo.id);
                if (e_state!=EPOINT_STATE_IN_SETUP
                 && e_state!=EPOINT_STATE_IN_OVERLAP)
                {
index 25043ed..3e89585 100644 (file)
@@ -958,7 +958,7 @@ static void lcr_in_information(struct chan_call *call, int message_type, union p
        if (!call->pbx_started)
        {
                CDEBUG(call, call->ast, "Asterisk not started, adding digits to number.\n");
-               strncpy(ast->exten, param->information.id, AST_MAX_EXTENSION-1);
+               strncat(ast->exten, param->information.id, AST_MAX_EXTENSION-1);
                lcr_start_pbx(call, ast, param->information.sending_complete);
                return;
        }
index 8e7d712..e120c80 100644 (file)
--- a/mISDN.cpp
+++ b/mISDN.cpp
@@ -2041,9 +2041,12 @@ int mISDN_handler(void)
 
                                        PDEBUG(DEBUG_ISDN, "the L2 establish timer expired, we try to establish the link portnum=%d.\n", mISDNport->portnum);
                                        mISDNport->ml3->to_layer3(mISDNport->ml3, MT_L2ESTABLISH, 0, NULL);
+#if 0
+no L2 establish trace on every timeout
                                        l1l2l3_trace_header(mISDNport, NULL, L2_ESTABLISH_REQ, DIRECTION_OUT);
                                        add_trace("tei", NULL, "%d", 0);
                                        end_trace();
+#endif
                                        time(&mISDNport->l2establish);
                                        return(1);
                                }