aboutsummaryrefslogtreecommitdiffstats
path: root/channels/misdn
diff options
context:
space:
mode:
authorcrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-23 10:05:54 +0000
committercrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-23 10:05:54 +0000
commitce6b278e29cb1fd6df0cdab8480372f8e0b80036 (patch)
treea05c4b4a5964318c2fc12975150fdf1fb6a86d45 /channels/misdn
parent21dcb715db4b1482f66d32ac80bb061ae08663c6 (diff)
manually merged r49922 and r50335, because of conflicts. this commint includes addition of the ISDN RESTART Message
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51648 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/misdn')
-rw-r--r--channels/misdn/isdn_lib.c25
-rw-r--r--channels/misdn/isdn_lib.h1
2 files changed, 26 insertions, 0 deletions
diff --git a/channels/misdn/isdn_lib.c b/channels/misdn/isdn_lib.c
index 69fa12a0c..d655b9305 100644
--- a/channels/misdn/isdn_lib.c
+++ b/channels/misdn/isdn_lib.c
@@ -3603,6 +3603,31 @@ int misdn_lib_pid_restart(int pid)
return 0;
}
+/*Sends Restart message for every bchnanel*/
+int misdn_lib_send_restart(int port)
+{
+ struct misdn_stack *stack=find_stack_by_port(port);
+ cb_log(0, port, "Sending Restarts on this port.\n");
+
+ struct misdn_bchannel dummybc;
+ memset (&dummybc,0,sizeof(dummybc));
+ dummybc.port=stack->port;
+ dummybc.l3_id=MISDN_ID_DUMMY;
+ dummybc.nt=stack->nt;
+
+ int max=stack->pri?30:2;
+ int i;
+ for (i=1;i<max;i++) {
+ dummybc.channel=i;
+ cb_log(0, port, "Restarting channel %d\n",i);
+ misdn_lib_send_event(&dummybc, EVENT_RESTART);
+ /*do we need to wait before we get an EVENT_RESTART_ACK ?*/
+ }
+
+ return 0;
+}
+
+/*reinitializes the L2/L3*/
int misdn_lib_port_restart(int port)
{
struct misdn_stack *stack=find_stack_by_port(port);
diff --git a/channels/misdn/isdn_lib.h b/channels/misdn/isdn_lib.h
index ccd87bcfb..e320882dd 100644
--- a/channels/misdn/isdn_lib.h
+++ b/channels/misdn/isdn_lib.h
@@ -409,6 +409,7 @@ void isdn_lib_stop_dtmf (struct misdn_bchannel *bc);
int misdn_lib_port_restart(int port);
int misdn_lib_pid_restart(int pid);
+int misdn_lib_send_restart(int port);
int misdn_lib_get_port_info(int port);