summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuper User2008-06-15 14:29:09 +0200
committerSuper User2008-06-15 14:29:09 +0200
commit609582c9ae75f3cd53df8d3b3ff3c303ad5d3d91 (patch)
tree94b3172dc896147c36bb4f7e52f61758933e035b
parentchan_lcr: in lcr_in_information: information.id already contains the (diff)
downloadlcr-609582c9ae75f3cd53df8d3b3ff3c303ad5d3d91.tar.gz
lcr-609582c9ae75f3cd53df8d3b3ff3c303ad5d3d91.tar.xz
lcr-609582c9ae75f3cd53df8d3b3ff3c303ad5d3d91.zip
fixed dialing bug to remote application
modified: action.cpp modified: apppbx.cpp modified: chan_lcr.c modified: mISDN.cpp
-rw-r--r--action.cpp1
-rw-r--r--apppbx.cpp19
-rw-r--r--chan_lcr.c2
-rw-r--r--mISDN.cpp3
4 files changed, 18 insertions, 7 deletions
diff --git a/action.cpp b/action.cpp
index 11eafe5..e815fd3 100644
--- a/action.cpp
+++ b/action.cpp
@@ -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);
diff --git a/apppbx.cpp b/apppbx.cpp
index e491a57..f79cd0e 100644
--- a/apppbx.cpp
+++ b/apppbx.cpp
@@ -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)
{
diff --git a/chan_lcr.c b/chan_lcr.c
index 25043ed..3e89585 100644
--- a/chan_lcr.c
+++ b/chan_lcr.c
@@ -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;
}
diff --git a/mISDN.cpp b/mISDN.cpp
index 8e7d712..e120c80 100644
--- 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);
}