blob: 9c2dcb7fdc28791ff992aa6050d1a1ca2074c266 [file] [log] [blame]
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +02001/* OpenBSC Abis interface to E1 */
2
3/* (C) 2008-2009 by Harald Welte <laforge@gnumonks.org>
4 *
5 * All Rights Reserved
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
16 *
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#include "internal.h"
23
24#include <stdio.h>
25#include <unistd.h>
26#include <stdlib.h>
27#include <errno.h>
28#include <string.h>
29#include <time.h>
30#include <sys/fcntl.h>
31#include <sys/socket.h>
32#include <sys/ioctl.h>
33#include <arpa/inet.h>
34#include <mISDNif.h>
35
36//#define AF_COMPATIBILITY_FUNC
37//#include <compat_af_isdn.h>
38#ifndef AF_ISDN
39#define AF_ISDN 34
40#define PF_ISDN AF_ISDN
41#endif
42
43#include <osmocom/core/select.h>
44#include <osmocom/core/msgb.h>
45#include <osmocom/core/logging.h>
46#include <osmocom/core/signal.h>
Pablo Neira Ayuso177094b2011-06-07 12:21:51 +020047#include <osmocom/abis/e1_input.h>
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +020048#include <osmocom/core/linuxlist.h>
Pablo Neira Ayuso177094b2011-06-07 12:21:51 +020049#include <osmocom/abis/subchan_demux.h>
Harald Welte71d87b22011-07-18 14:49:56 +020050#include <osmocom/core/talloc.h>
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +020051
52#define NUM_E1_TS 32
53
54static void *tall_e1inp_ctx;
55
56/* list of all E1 drivers */
57LLIST_HEAD(e1inp_driver_list);
58
59/* list of all E1 lines */
60LLIST_HEAD(e1inp_line_list);
61
62static void *tall_sigl_ctx;
63
64/*
65 * pcap writing of the misdn load
66 * pcap format is from http://wiki.wireshark.org/Development/LibpcapFileFormat
67 */
68#define DLT_LINUX_LAPD 177
69#define PCAP_INPUT 0
70#define PCAP_OUTPUT 1
71
72struct pcap_hdr {
73 uint32_t magic_number;
74 uint16_t version_major;
75 uint16_t version_minor;
76 int32_t thiszone;
77 uint32_t sigfigs;
78 uint32_t snaplen;
79 uint32_t network;
80} __attribute__((packed));
81
82struct pcaprec_hdr {
83 uint32_t ts_sec;
84 uint32_t ts_usec;
85 uint32_t incl_len;
86 uint32_t orig_len;
87} __attribute__((packed));
88
89struct fake_linux_lapd_header {
90 uint16_t pkttype;
91 uint16_t hatype;
92 uint16_t halen;
93 uint64_t addr;
94 int16_t protocol;
95} __attribute__((packed));
96
97struct lapd_header {
98 uint8_t ea1 : 1;
99 uint8_t cr : 1;
100 uint8_t sapi : 6;
101 uint8_t ea2 : 1;
102 uint8_t tei : 7;
103 uint8_t control_foo; /* fake UM's ... */
104} __attribute__((packed));
105
106osmo_static_assert(offsetof(struct fake_linux_lapd_header, hatype) == 2, hatype_offset);
107osmo_static_assert(offsetof(struct fake_linux_lapd_header, halen) == 4, halen_offset);
108osmo_static_assert(offsetof(struct fake_linux_lapd_header, addr) == 6, addr_offset);
109osmo_static_assert(offsetof(struct fake_linux_lapd_header, protocol) == 14, proto_offset);
110osmo_static_assert(sizeof(struct fake_linux_lapd_header) == 16, lapd_header_size);
111
112
113static int pcap_fd = -1;
114
115void e1_set_pcap_fd(int fd)
116{
117 int ret;
118 struct pcap_hdr header = {
119 .magic_number = 0xa1b2c3d4,
120 .version_major = 2,
121 .version_minor = 4,
122 .thiszone = 0,
123 .sigfigs = 0,
124 .snaplen = 65535,
125 .network = DLT_LINUX_LAPD,
126 };
127
128 pcap_fd = fd;
129 ret = write(pcap_fd, &header, sizeof(header));
130}
131
132/* This currently only works for the D-Channel */
133static void write_pcap_packet(int direction, int sapi, int tei,
134 struct msgb *msg) {
135 if (pcap_fd < 0)
136 return;
137
138 int ret;
139 time_t cur_time;
140 struct tm *tm;
141
142 struct fake_linux_lapd_header header = {
143 .pkttype = 4,
144 .hatype = 0,
145 .halen = 0,
146 .addr = direction == PCAP_OUTPUT ? 0x0 : 0x1,
147 .protocol = ntohs(48),
148 };
149
150 struct lapd_header lapd_header = {
151 .ea1 = 0,
152 .cr = direction == PCAP_OUTPUT ? 1 : 0,
153 .sapi = sapi & 0x3F,
154 .ea2 = 1,
155 .tei = tei & 0x7F,
156 .control_foo = 0x03 /* UI */,
157 };
158
159 struct pcaprec_hdr payload_header = {
160 .ts_sec = 0,
161 .ts_usec = 0,
162 .incl_len = msgb_l2len(msg) + sizeof(struct fake_linux_lapd_header)
163 + sizeof(struct lapd_header),
164 .orig_len = msgb_l2len(msg) + sizeof(struct fake_linux_lapd_header)
165 + sizeof(struct lapd_header),
166 };
167
168
169 cur_time = time(NULL);
170 tm = localtime(&cur_time);
171 payload_header.ts_sec = mktime(tm);
172
173 ret = write(pcap_fd, &payload_header, sizeof(payload_header));
174 ret = write(pcap_fd, &header, sizeof(header));
175 ret = write(pcap_fd, &lapd_header, sizeof(lapd_header));
176 ret = write(pcap_fd, msg->l2h, msgb_l2len(msg));
177}
178
179static const char *sign_types[] = {
180 [E1INP_SIGN_NONE] = "None",
181 [E1INP_SIGN_OML] = "OML",
182 [E1INP_SIGN_RSL] = "RSL",
183};
184const char *e1inp_signtype_name(enum e1inp_sign_type tp)
185{
186 if (tp >= ARRAY_SIZE(sign_types))
187 return "undefined";
188 return sign_types[tp];
189}
190
191static const char *ts_types[] = {
192 [E1INP_TS_TYPE_NONE] = "None",
193 [E1INP_TS_TYPE_SIGN] = "Signalling",
194 [E1INP_TS_TYPE_TRAU] = "TRAU",
195};
196
197const char *e1inp_tstype_name(enum e1inp_ts_type tp)
198{
199 if (tp >= ARRAY_SIZE(ts_types))
200 return "undefined";
201 return ts_types[tp];
202}
203
Pablo Neira Ayuso96e72632011-06-26 19:08:05 +0200204int abis_sendmsg(struct msgb *msg)
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200205{
206 struct e1inp_sign_link *sign_link = msg->dst;
207 struct e1inp_driver *e1inp_driver;
208 struct e1inp_ts *e1i_ts;
209;
210 msg->l2h = msg->data;
211
212 /* don't know how to route this message. */
213 if (sign_link == NULL) {
Pablo Neira Ayuso96e72632011-06-26 19:08:05 +0200214 LOGP(DRSL, LOGL_ERROR, "abis_sendmsg: msg->dst == NULL: %s\n",
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200215 osmo_hexdump(msg->data, msg->len));
216 talloc_free(msg);
217 return -EINVAL;
218 }
219 e1i_ts = sign_link->ts;
220 if (!osmo_timer_pending(&e1i_ts->sign.tx_timer)) {
221 /* notify the driver we have something to write */
222 e1inp_driver = sign_link->ts->line->driver;
223 e1inp_driver->want_write(e1i_ts);
224 }
225 msgb_enqueue(&sign_link->tx_list, msg);
226
227 /* dump it */
228 write_pcap_packet(PCAP_OUTPUT, sign_link->sapi, sign_link->tei, msg);
229
230 return 0;
231}
232
Pablo Neira Ayuso96e72632011-06-26 19:08:05 +0200233int abis_rsl_sendmsg(struct msgb *msg)
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200234{
Pablo Neira Ayuso96e72632011-06-26 19:08:05 +0200235 return abis_sendmsg(msg);
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200236}
237
238/* Timeslot */
239int e1inp_ts_config_trau(struct e1inp_ts *ts, struct e1inp_line *line,
Pablo Neira Ayuso211d2ca2011-06-07 17:15:10 +0200240 int (*trau_rcv_cb)(struct subch_demux *dmx, int ch,
241 uint8_t *data, int len, void *_priv))
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200242{
243 if (ts->type == E1INP_TS_TYPE_TRAU && ts->line && line)
244 return 0;
245
246 ts->type = E1INP_TS_TYPE_TRAU;
247 ts->line = line;
248
249 subchan_mux_init(&ts->trau.mux);
Pablo Neira Ayuso211d2ca2011-06-07 17:15:10 +0200250 ts->trau.demux.out_cb = trau_rcv_cb;
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200251 ts->trau.demux.data = ts;
252 subch_demux_init(&ts->trau.demux);
253 return 0;
254}
255
256int e1inp_ts_config_sign(struct e1inp_ts *ts, struct e1inp_line *line)
257{
258 if (ts->type == E1INP_TS_TYPE_SIGN && ts->line && line)
259 return 0;
260
261 ts->type = E1INP_TS_TYPE_SIGN;
262 ts->line = line;
263
264 if (line && line->driver)
265 ts->sign.delay = line->driver->default_delay;
266 else
267 ts->sign.delay = 100000;
268 INIT_LLIST_HEAD(&ts->sign.sign_links);
269 return 0;
270}
271
Pablo Neira Ayuso3832c4f2011-07-07 17:47:26 +0200272struct e1inp_line *e1inp_line_find(uint8_t e1_nr)
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200273{
274 struct e1inp_line *e1i_line;
275
276 /* iterate over global list of e1 lines */
277 llist_for_each_entry(e1i_line, &e1inp_line_list, list) {
278 if (e1i_line->num == e1_nr)
279 return e1i_line;
280 }
281 return NULL;
282}
283
284struct e1inp_line *
Pablo Neira Ayusof163d232011-06-25 18:42:55 +0200285e1inp_line_create(uint8_t e1_nr, const char *driver_name)
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200286{
287 struct e1inp_driver *driver;
288 struct e1inp_line *line;
289 int i;
290
Pablo Neira Ayuso3832c4f2011-07-07 17:47:26 +0200291 line = e1inp_line_find(e1_nr);
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200292 if (line) {
293 LOGP(DINP, LOGL_ERROR, "E1 Line %u already exists\n",
294 e1_nr);
295 return NULL;
296 }
297
298 driver = e1inp_driver_find(driver_name);
299 if (!driver) {
300 LOGP(DINP, LOGL_ERROR, "No such E1 driver '%s'\n",
301 driver_name);
302 return NULL;
303 }
304
305 line = talloc_zero(tall_e1inp_ctx, struct e1inp_line);
306 if (!line)
307 return NULL;
308
309 line->driver = driver;
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200310
311 line->num = e1_nr;
312 for (i = 0; i < NUM_E1_TS; i++) {
313 line->ts[i].num = i+1;
314 line->ts[i].line = line;
315 }
Pablo Neira Ayuso3832c4f2011-07-07 17:47:26 +0200316 line->refcnt++;
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200317 llist_add_tail(&line->list, &e1inp_line_list);
318
319 return line;
320}
321
Pablo Neira Ayuso3832c4f2011-07-07 17:47:26 +0200322struct e1inp_line *
323e1inp_line_clone(void *ctx, struct e1inp_line *line)
324{
325 struct e1inp_line *clone;
326
327 /* clone virtual E1 line for this new OML link. */
328 clone = talloc_zero(ctx, struct e1inp_line);
329 if (clone == NULL)
330 return NULL;
331
332 memcpy(clone, line, sizeof(struct e1inp_line));
333 clone->refcnt = 1;
334 return clone;
335}
336
337void e1inp_line_get(struct e1inp_line *line)
338{
339 line->refcnt++;
340}
341
342void e1inp_line_put(struct e1inp_line *line)
343{
344 line->refcnt--;
345 if (line->refcnt == 0)
346 talloc_free(line);
347}
348
Pablo Neira Ayusof163d232011-06-25 18:42:55 +0200349void
350e1inp_line_bind_ops(struct e1inp_line *line, const struct e1inp_line_ops *ops)
351{
352 line->ops = ops;
353}
354
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200355#if 0
Pablo Neira Ayuso3832c4f2011-07-07 17:47:26 +0200356struct e1inp_line *e1inp_line_find_create(uint8_t e1_nr)
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200357{
358 struct e1inp_line *line;
359 int i;
360
Pablo Neira Ayuso3832c4f2011-07-07 17:47:26 +0200361 line = e1inp_line_find(e1_nr);
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200362 if (line)
363 return line;
364
365 line = talloc_zero(tall_e1inp_ctx, struct e1inp_line);
366 if (!line)
367 return NULL;
368
369 line->num = e1_nr;
370 for (i = 0; i < NUM_E1_TS; i++) {
371 line->ts[i].num = i+1;
372 line->ts[i].line = line;
373 }
374 llist_add_tail(&line->list, &e1inp_line_list);
375
376 return line;
377}
378#endif
379
380static struct e1inp_ts *e1inp_ts_get(uint8_t e1_nr, uint8_t ts_nr)
381{
382 struct e1inp_line *e1i_line;
383
Pablo Neira Ayuso3832c4f2011-07-07 17:47:26 +0200384 e1i_line = e1inp_line_find(e1_nr);
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200385 if (!e1i_line)
386 return NULL;
387
388 return &e1i_line->ts[ts_nr-1];
389}
390
391struct subch_mux *e1inp_get_mux(uint8_t e1_nr, uint8_t ts_nr)
392{
393 struct e1inp_ts *e1i_ts = e1inp_ts_get(e1_nr, ts_nr);
394
395 if (!e1i_ts)
396 return NULL;
397
398 return &e1i_ts->trau.mux;
399}
400
401/* Signalling Link */
402
403struct e1inp_sign_link *e1inp_lookup_sign_link(struct e1inp_ts *e1i,
404 uint8_t tei, uint8_t sapi)
405{
406 struct e1inp_sign_link *link;
407
408 llist_for_each_entry(link, &e1i->sign.sign_links, list) {
409 if (link->sapi == sapi && link->tei == tei)
410 return link;
411 }
412
413 return NULL;
414}
415
416/* create a new signalling link in a E1 timeslot */
417
418struct e1inp_sign_link *
419e1inp_sign_link_create(struct e1inp_ts *ts, enum e1inp_sign_type type,
420 struct gsm_bts_trx *trx, uint8_t tei,
421 uint8_t sapi)
422{
423 struct e1inp_sign_link *link;
424
425 if (ts->type != E1INP_TS_TYPE_SIGN)
426 return NULL;
427
428 link = talloc_zero(tall_sigl_ctx, struct e1inp_sign_link);
429 if (!link)
430 return NULL;
431
432 link->ts = ts;
433 link->type = type;
434 INIT_LLIST_HEAD(&link->tx_list);
435 link->trx = trx;
436 link->tei = tei;
437 link->sapi = sapi;
438
439 llist_add_tail(&link->list, &ts->sign.sign_links);
440
441 return link;
442}
443
444void e1inp_sign_link_destroy(struct e1inp_sign_link *link)
445{
446 struct msgb *msg;
447
448 llist_del(&link->list);
449 while (!llist_empty(&link->tx_list)) {
450 msg = msgb_dequeue(&link->tx_list);
451 msgb_free(msg);
452 }
453
454 if (link->ts->type == E1INP_TS_TYPE_SIGN)
455 osmo_timer_del(&link->ts->sign.tx_timer);
456
Pablo Neira Ayusoc9c4fd32011-06-30 12:19:42 +0200457 if (link->ts->line->driver->close)
Pablo Neira Ayusoadd3ec82011-07-05 14:45:46 +0200458 link->ts->line->driver->close(link);
Pablo Neira Ayusoc9c4fd32011-06-30 12:19:42 +0200459
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200460 talloc_free(link);
461}
462
463/* XXX */
464/* the E1 driver tells us he has received something on a TS */
465int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg,
466 uint8_t tei, uint8_t sapi)
467{
468 struct e1inp_sign_link *link;
469 int ret = 0;
470
471 switch (ts->type) {
472 case E1INP_TS_TYPE_SIGN:
473 /* consult the list of signalling links */
474 write_pcap_packet(PCAP_INPUT, sapi, tei, msg);
475 link = e1inp_lookup_sign_link(ts, tei, sapi);
476 if (!link) {
477 LOGP(DMI, LOGL_ERROR, "didn't find signalling link for "
478 "tei %d, sapi %d\n", tei, sapi);
479 return -EINVAL;
480 }
Pablo Neira Ayusof163d232011-06-25 18:42:55 +0200481 if (!ts->line->ops->sign_link) {
Pablo Neira Ayuso5a4b7c52011-06-07 14:07:48 +0200482 LOGP(DINP, LOGL_ERROR, "Fix your application, "
483 "no action set for signalling messages.\n");
484 return -ENOENT;
485 }
Pablo Neira Ayusodbd82fb2011-07-05 15:29:23 +0200486 msg->dst = link;
487 ts->line->ops->sign_link(msg);
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200488 break;
489 case E1INP_TS_TYPE_TRAU:
Pablo Neira Ayuso211d2ca2011-06-07 17:15:10 +0200490 ret = subch_demux_in(&ts->trau.demux, msg->l2h, msgb_l2len(msg));
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200491 break;
492 default:
493 ret = -EINVAL;
494 LOGP(DMI, LOGL_ERROR, "unknown TS type %u\n", ts->type);
495 break;
496 }
497
498 return ret;
499}
500
501#define TSX_ALLOC_SIZE 4096
502
503/* called by driver if it wants to transmit on a given TS */
504struct msgb *e1inp_tx_ts(struct e1inp_ts *e1i_ts,
505 struct e1inp_sign_link **sign_link)
506{
507 struct e1inp_sign_link *link;
508 struct msgb *msg = NULL;
509 int len;
510
511 switch (e1i_ts->type) {
512 case E1INP_TS_TYPE_SIGN:
513 /* FIXME: implement this round robin */
514 llist_for_each_entry(link, &e1i_ts->sign.sign_links, list) {
515 msg = msgb_dequeue(&link->tx_list);
516 if (msg) {
517 if (sign_link)
518 *sign_link = link;
519 break;
520 }
521 }
522 break;
523 case E1INP_TS_TYPE_TRAU:
524 msg = msgb_alloc(TSX_ALLOC_SIZE, "TRAU_TX");
525 if (!msg)
526 return NULL;
527 len = subchan_mux_out(&e1i_ts->trau.mux, msg->data, 40);
528 msgb_put(msg, 40);
529 break;
530 default:
531 LOGP(DMI, LOGL_ERROR, "unsupported E1 TS type %u\n", e1i_ts->type);
532 return NULL;
533 }
534 return msg;
535}
536
537/* called by driver in case some kind of link state event */
538int e1inp_event(struct e1inp_ts *ts, int evt, uint8_t tei, uint8_t sapi)
539{
540 struct e1inp_sign_link *link;
541 struct input_signal_data isd;
542
543 link = e1inp_lookup_sign_link(ts, tei, sapi);
544 if (!link)
545 return -EINVAL;
546
547 isd.link_type = link->type;
548 isd.trx = link->trx;
549 isd.tei = tei;
550 isd.sapi = sapi;
551
552 /* report further upwards */
553 osmo_signal_dispatch(SS_INPUT, evt, &isd);
554 return 0;
555}
556
557/* register a driver with the E1 core */
558int e1inp_driver_register(struct e1inp_driver *drv)
559{
560 llist_add_tail(&drv->list, &e1inp_driver_list);
561 return 0;
562}
563
564struct e1inp_driver *e1inp_driver_find(const char *name)
565{
566 struct e1inp_driver *drv;
567
568 llist_for_each_entry(drv, &e1inp_driver_list, list) {
569 if (!strcasecmp(name, drv->name))
570 return drv;
571 }
572 return NULL;
573}
574
Pablo Neira Ayusof163d232011-06-25 18:42:55 +0200575int e1inp_line_update(struct e1inp_line *line)
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200576{
577 struct input_signal_data isd;
578 int rc;
579
Pablo Neira Ayuso3832c4f2011-07-07 17:47:26 +0200580 e1inp_line_get(line);
581
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200582 /* This line has been already initialized, skip this. */
Pablo Neira Ayuso3832c4f2011-07-07 17:47:26 +0200583 if (line->refcnt > 2)
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200584 return 0;
585
Pablo Neira Ayusof163d232011-06-25 18:42:55 +0200586 if (line->driver && line->ops && line->driver->line_update) {
587 rc = line->driver->line_update(line, line->ops->role,
588 line->ops->addr);
589 } else
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200590 rc = 0;
591
592 /* Send a signal to anyone who is interested in new lines being
593 * configured */
594 memset(&isd, 0, sizeof(isd));
595 isd.line = line;
596 osmo_signal_dispatch(SS_INPUT, S_INP_LINE_INIT, &isd);
597
598 return rc;
599}
600
Pablo Neira Ayusoa20762a2011-07-02 19:01:58 +0200601static int e1i_sig_cb(unsigned int subsys, unsigned int signal,
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200602 void *handler_data, void *signal_data)
603{
604 if (subsys != SS_GLOBAL ||
605 signal != S_GLOBAL_SHUTDOWN)
606 return 0;
607
608 if (pcap_fd) {
609 close(pcap_fd);
610 pcap_fd = -1;
611 }
612
613 return 0;
614}
615
616void e1inp_misdn_init(void);
617void e1inp_dahdi_init(void);
618void e1inp_ipaccess_init(void);
619void e1inp_hsl_init(void);
620
621void e1inp_init(void)
622{
Pablo Neira Ayuso54b49792011-06-07 12:15:26 +0200623 tall_e1inp_ctx = talloc_named_const(libosmo_abis_ctx, 1, "e1inp");
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +0200624 tall_sigl_ctx = talloc_named_const(tall_e1inp_ctx, 1,
625 "e1inp_sign_link");
626 osmo_signal_register_handler(SS_GLOBAL, e1i_sig_cb, NULL);
627
628 e1inp_misdn_init();
629#ifdef HAVE_DAHDI_USER_H
630 e1inp_dahdi_init();
631#endif
632 e1inp_ipaccess_init();
633 e1inp_hsl_init();
634}