This source file includes following definitions.
- ft_to_sngss7_cfg_all
- ftmod_ss7_mtp1_gen_config
- ftmod_ss7_mtp2_gen_config
- ftmod_ss7_mtp3_gen_config
- ftmod_ss7_isup_gen_config
- ftmod_ss7_cc_gen_config
- ftmod_ss7_mtp1_psap_config
- ftmod_ss7_mtp2_dlsap_config
- ftmod_ss7_mtp3_dlsap_config
- ftmod_ss7_mtp3_nsap_config
- ftmod_ss7_mtp3_linkset_config
- ftmod_ss7_mtp3_route_config
- ftmod_ss7_isup_nsap_config
- ftmod_ss7_isup_intf_config
- ftmod_ss7_isup_ckt_config
- ftmod_ss7_isup_isap_config
- ftmod_ss7_cc_isap_config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 #include "ftmod_sangoma_ss7_main.h"
36
37
38
39
40
41
42
43
44
45 int ft_to_sngss7_cfg_all(void);
46
47 int ftmod_ss7_mtp1_gen_config(void);
48 int ftmod_ss7_mtp2_gen_config(void);
49 int ftmod_ss7_mtp3_gen_config(void);
50 int ftmod_ss7_isup_gen_config(void);
51 int ftmod_ss7_cc_gen_config(void);
52
53 int ftmod_ss7_mtp1_psap_config(int id);
54
55 int ftmod_ss7_mtp2_dlsap_config(int id);
56
57 int ftmod_ss7_mtp3_dlsap_config(int id);
58 int ftmod_ss7_mtp3_nsap_config(int id);
59 int ftmod_ss7_mtp3_linkset_config(int id);
60 int ftmod_ss7_mtp3_route_config(int id);
61
62 int ftmod_ss7_isup_nsap_config(int id);
63 int ftmod_ss7_isup_intf_config(int id);
64 int ftmod_ss7_isup_ckt_config(int id);
65 int ftmod_ss7_isup_isap_config(int id);
66
67 int ftmod_ss7_cc_isap_config(int id);
68
69
70
71 int ft_to_sngss7_cfg_all(void)
72 {
73 int x = 0;
74
75
76 if (!(g_ftdm_sngss7_data.gen_config)) {
77
78 if (sng_validate_license(g_ftdm_sngss7_data.cfg.license,
79 g_ftdm_sngss7_data.cfg.signature,
80 g_ftdm_sngss7_data.cfg.spc)) {
81
82 SS7_CRITICAL("License verification failed..ending!\n");
83 return 1;
84 }
85
86 if (ftmod_ss7_mtp1_gen_config()) {
87 SS7_CRITICAL("MTP1 General configuration FAILED!\n");
88 return 1;
89 } else {
90 SS7_INFO("MTP1 General configuration DONE\n");
91 }
92
93 if (ftmod_ss7_mtp2_gen_config()) {
94 SS7_CRITICAL("MTP2 General configuration FAILED!\n");
95 return 1;
96 } else {
97 SS7_INFO("MTP2 General configuration DONE\n");
98 }
99
100 if (ftmod_ss7_mtp3_gen_config()) {
101 SS7_CRITICAL("MTP3 General configuration FAILED!\n");
102 return 1;
103 } else {
104 SS7_INFO("MTP3 General configuration DONE\n");
105 }
106
107 if (ftmod_ss7_isup_gen_config()) {
108 SS7_CRITICAL("ISUP General configuration FAILED!\n");
109 return 1;
110 } else {
111 SS7_INFO("ISUP General configuration DONE\n");
112 }
113
114 if (ftmod_ss7_cc_gen_config()) {
115 SS7_CRITICAL("CC General configuration FAILED!\n");
116 return 1;
117 } else {
118 SS7_INFO("CC General configuration DONE\n");
119 }
120
121
122 g_ftdm_sngss7_data.gen_config = 1;
123 }
124
125
126 x = 1;
127 while (g_ftdm_sngss7_data.cfg.mtpLink[x].id != 0) {
128
129 if (!(g_ftdm_sngss7_data.cfg.mtpLink[x].flags & CONFIGURED)) {
130
131
132 if (ftmod_ss7_mtp1_psap_config(x)) {
133 SS7_CRITICAL("MTP1 PSAP %d configuration FAILED!\n", x);
134 return 1;;
135 } else {
136 SS7_INFO("MTP1 PSAP %d configuration DONE!\n", x);
137 }
138
139
140 if (ftmod_ss7_mtp2_dlsap_config(x)) {
141 SS7_CRITICAL("MTP2 DLSAP %d configuration FAILED!\n",x);
142 return 1;;
143 } else {
144 SS7_INFO("MTP2 DLSAP %d configuration DONE!\n", x);
145 }
146
147
148 if (ftmod_ss7_mtp3_dlsap_config(x)) {
149 SS7_CRITICAL("MTP3 DLSAP %d configuration FAILED!\n", x);
150 return 1;;
151 } else {
152 SS7_INFO("MTP3 DLSAP %d configuration DONE!\n", x);
153 }
154
155
156 g_ftdm_sngss7_data.cfg.mtpLink[x].flags |= CONFIGURED;
157 }
158
159 x++;
160 }
161
162 x = 1;
163 while (g_ftdm_sngss7_data.cfg.nsap[x].id != 0) {
164
165 if (!(g_ftdm_sngss7_data.cfg.nsap[x].flags & CONFIGURED)) {
166
167 if (ftmod_ss7_mtp3_nsap_config(x)) {
168 SS7_CRITICAL("MTP3 NSAP %d configuration FAILED!\n", x);
169 return 1;
170 } else {
171 SS7_INFO("MTP3 NSAP %d configuration DONE!\n", x);
172 }
173
174 if (ftmod_ss7_isup_nsap_config(x)) {
175 SS7_CRITICAL("ISUP NSAP %d configuration FAILED!\n", x);
176 return 1;
177 } else {
178 SS7_INFO("ISUP NSAP %d configuration DONE!\n", x);
179 }
180
181
182 g_ftdm_sngss7_data.cfg.nsap[x].flags |= CONFIGURED;
183 }
184
185 x++;
186 }
187
188 x = 1;
189 while (g_ftdm_sngss7_data.cfg.mtpLinkSet[x].id != 0) {
190
191 if (!(g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags & CONFIGURED)) {
192
193 if (ftmod_ss7_mtp3_linkset_config(x)) {
194 SS7_CRITICAL("MTP3 LINKSET %d configuration FAILED!\n", x);
195 return 1;
196 } else {
197 SS7_INFO("MTP3 LINKSET %d configuration DONE!\n", x);
198 }
199
200
201 g_ftdm_sngss7_data.cfg.mtpLinkSet[x].flags |= CONFIGURED;
202 }
203
204 x++;
205 }
206
207 x = 1;
208 while ((g_ftdm_sngss7_data.cfg.mtpRoute[x].id != 0)) {
209
210 if (!(g_ftdm_sngss7_data.cfg.mtpRoute[x].flags & CONFIGURED)) {
211
212 if (ftmod_ss7_mtp3_route_config(x)) {
213 SS7_CRITICAL("MTP3 ROUTE %d configuration FAILED!\n", x);
214 return 1;
215 } else {
216 SS7_INFO("MTP3 ROUTE %d configuration DONE!\n",x);
217 }
218
219
220 g_ftdm_sngss7_data.cfg.mtpRoute[x].flags |= CONFIGURED;
221 }
222
223 x++;
224 }
225
226 if (!(g_ftdm_sngss7_data.cfg.mtpRoute[0].flags & CONFIGURED)) {
227
228 if (ftmod_ss7_mtp3_route_config(0)) {
229 SS7_CRITICAL("MTP3 ROUTE 0 configuration FAILED!\n");
230 return 1;
231 } else {
232 SS7_INFO("MTP3 ROUTE 0 configuration DONE!\n");
233 }
234
235
236 g_ftdm_sngss7_data.cfg.mtpRoute[0].flags |= CONFIGURED;
237 }
238
239
240 x = 1;
241 while (g_ftdm_sngss7_data.cfg.isap[x].id != 0) {
242
243 if (!(g_ftdm_sngss7_data.cfg.isap[x].flags & CONFIGURED)) {
244
245 if (ftmod_ss7_isup_isap_config(x)) {
246 SS7_CRITICAL("ISUP ISAP %d configuration FAILED!\n", x);
247 return 1;
248 } else {
249 SS7_INFO("ISUP ISAP %d configuration DONE!\n", x);
250 }
251
252 if (ftmod_ss7_cc_isap_config(x)) {
253 SS7_CRITICAL("CC ISAP %d configuration FAILED!\n", x);
254 return 1;
255 } else {
256 SS7_INFO("CC ISAP %d configuration DONE!\n", x);
257 }
258
259
260 g_ftdm_sngss7_data.cfg.isap[x].flags |= CONFIGURED;
261 }
262
263 x++;
264 }
265
266 x = 1;
267 while (g_ftdm_sngss7_data.cfg.isupIntf[x].id != 0) {
268
269 if (!(g_ftdm_sngss7_data.cfg.isupIntf[x].flags & CONFIGURED)) {
270
271 if (ftmod_ss7_isup_intf_config(x)) {
272 SS7_CRITICAL("ISUP INTF %d configuration FAILED!\n", x);
273 return 1;
274 } else {
275 SS7_INFO("ISUP INTF %d configuration DONE!\n", x);
276
277 sngss7_set_flag(&g_ftdm_sngss7_data.cfg.isupIntf[x], SNGSS7_PAUSED);
278 }
279
280
281 g_ftdm_sngss7_data.cfg.isupIntf[x].flags |= CONFIGURED;
282 }
283
284 x++;
285 }
286
287 x = 1;
288 while (g_ftdm_sngss7_data.cfg.isupCkt[x].id != 0) {
289
290 if (!(g_ftdm_sngss7_data.cfg.isupCkt[x].flags & CONFIGURED)) {
291 if ( g_ftdm_sngss7_data.cfg.isupCkt[x].type == 0) {
292 if (ftmod_ss7_isup_ckt_config(x)) {
293 SS7_CRITICAL("ISUP CKT %d configuration FAILED!\n", x);
294 return 1;
295 } else {
296 SS7_INFO("ISUP CKT %d configuration DONE!\n", x);
297 }
298 }
299
300
301 g_ftdm_sngss7_data.cfg.isupCkt[x].flags |= CONFIGURED;
302 }
303
304 x++;
305 }
306
307 return 0;
308 }
309
310
311 int ftmod_ss7_mtp1_gen_config(void)
312 {
313 L1Mngmt cfg;
314 Pst pst;
315
316
317 smPstInit(&pst);
318
319
320 pst.dstEnt = ENTL1;
321
322
323 memset(&cfg, 0x0, sizeof(L1Mngmt));
324
325
326 smHdrInit(&cfg.hdr);
327
328
329 smPstInit( &cfg.t.cfg.s.l1Gen.sm );
330
331
332 cfg.hdr.msgType = TCFG;
333 cfg.hdr.entId.ent = ENTL1;
334 cfg.hdr.entId.inst = S_INST;
335 cfg.hdr.elmId.elmnt = STGEN;
336
337 cfg.t.cfg.s.l1Gen.sm.srcEnt = ENTL1;
338 cfg.t.cfg.s.l1Gen.sm.dstEnt = ENTSM;
339
340 cfg.t.cfg.s.l1Gen.nmbLnks = MAX_L1_LINKS;
341 cfg.t.cfg.s.l1Gen.poolTrUpper = POOL_UP_TR;
342 cfg.t.cfg.s.l1Gen.poolTrLower = POOL_LW_TR;
343
344 return(sng_cfg_mtp1(&pst, &cfg));
345 }
346
347
348 int ftmod_ss7_mtp2_gen_config(void)
349 {
350 SdMngmt cfg;
351 Pst pst;
352
353
354 smPstInit(&pst);
355
356
357 pst.dstEnt = ENTSD;
358
359
360 memset(&cfg, 0x0, sizeof(SdMngmt));
361
362
363 smHdrInit(&cfg.hdr);
364
365
366 smPstInit( &cfg.t.cfg.s.sdGen.sm );
367
368
369 cfg.hdr.msgType = TCFG;
370 cfg.hdr.entId.ent = ENTSD;
371 cfg.hdr.entId.inst = S_INST;
372 cfg.hdr.elmId.elmnt = STGEN;
373
374 cfg.t.cfg.s.sdGen.sm.srcEnt = ENTSD;
375 cfg.t.cfg.s.sdGen.sm.dstEnt = ENTSM;
376
377 cfg.t.cfg.s.sdGen.nmbLnks = MAX_SD_LINKS;
378 cfg.t.cfg.s.sdGen.poolTrUpper = POOL_UP_TR;
379 cfg.t.cfg.s.sdGen.poolTrLower = POOL_LW_TR;
380
381 return(sng_cfg_mtp2(&pst, &cfg));
382 }
383
384
385 int ftmod_ss7_mtp3_gen_config(void)
386 {
387 SnMngmt cfg;
388 Pst pst;
389
390
391 smPstInit(&pst);
392
393
394 pst.dstEnt = ENTSN;
395
396
397 memset(&cfg, 0x0, sizeof(SnMngmt));
398
399
400 smHdrInit(&cfg.hdr);
401
402
403 smPstInit(&cfg.t.cfg.s.snGen.sm);
404
405
406 cfg.hdr.msgType = TCFG;
407 cfg.hdr.entId.ent = ENTSN;
408 cfg.hdr.entId.inst = S_INST;
409 cfg.hdr.elmId.elmnt = STGEN;
410
411 cfg.t.cfg.s.snGen.sm.srcEnt = ENTSN;
412 cfg.t.cfg.s.snGen.sm.dstEnt = ENTSM;
413
414
415 cfg.t.cfg.s.snGen.typeSP = LSN_TYPE_SP;
416 cfg.t.cfg.s.snGen.spCode1 = g_ftdm_sngss7_data.cfg.spc;
417
418 #if (SS7_ANS92 || SS7_ANS88 || SS7_ANS96 || SS7_CHINA || defined(TDS_ROLL_UPGRADE_SUPPORT))
419 cfg.t.cfg.s.snGen.spCode2 = g_ftdm_sngss7_data.cfg.spc;
420 #endif
421
422 cfg.t.cfg.s.snGen.ssfValid = TRUE;
423 cfg.t.cfg.s.snGen.nmbDLSap = MAX_SN_LINKS;
424 cfg.t.cfg.s.snGen.nmbNSap = MAX_SN_VARIANTS;
425 cfg.t.cfg.s.snGen.nmbRouts = MAX_SN_ROUTES;
426 cfg.t.cfg.s.snGen.nmbLnkSets = MAX_SN_LINKSETS;
427 cfg.t.cfg.s.snGen.nmbRteInst = MAX_SN_ROUTES*16;
428 cfg.t.cfg.s.snGen.cbTimeRes = SN_CB_PERIOD;
429 cfg.t.cfg.s.snGen.spTimeRes = SN_SP_PERIOD;
430 cfg.t.cfg.s.snGen.rteTimeRes = SN_RTE_PERIOD;
431 cfg.t.cfg.s.snGen.extCmbndLnkst = FALSE;
432
433 #if (defined(LSNV3) || defined(SN_MULTIPLE_NETWORK_RESTART))
434
435 #else
436 cfg.t.cfg.s.snGen.rstReq = LSN_NO_RST;
437 cfg.t.cfg.s.snGen.tfrReq = FALSE;
438 cfg.t.cfg.s.snGen.tmr.t15.enb = TRUE;
439 cfg.t.cfg.s.snGen.tmr.t15.val = 30;
440 cfg.t.cfg.s.snGen.tmr.t16.enb = TRUE;
441 cfg.t.cfg.s.snGen.tmr.t16.val = 20;
442 cfg.t.cfg.s.snGen.tmr.t18.enb = TRUE;
443 cfg.t.cfg.s.snGen.tmr.t18.val = 200;
444 cfg.t.cfg.s.snGen.tmr.t19.enb = TRUE;
445 cfg.t.cfg.s.snGen.tmr.t19.val = 690;
446 cfg.t.cfg.s.snGen.tmr.t21.enb = TRUE;
447 cfg.t.cfg.s.snGen.tmr.t21.val = 650;
448 # if (SS7_ANS92 || SS7_ANS88 || SS7_ANS96 || defined(TDS_ROLL_UPGRADE_SUPPORT))
449 cfg.t.cfg.s.snGen.tmr.t26.enb = TRUE;
450 cfg.t.cfg.s.snGen.tmr.t26.val = 600;
451 # endif
452 #endif
453
454 #if (SS7_ANS88 || SS7_ANS92 || SS7_ANS96)
455 cfg.t.cfg.s.snGen.mopc = FALSE;
456 #endif
457
458 return(sng_cfg_mtp3(&pst, &cfg));
459 }
460
461
462 int ftmod_ss7_isup_gen_config(void)
463 {
464 SiMngmt cfg;
465 Pst pst;
466
467
468 smPstInit(&pst);
469
470
471 pst.dstEnt = ENTSI;
472
473
474 memset(&cfg, 0x0, sizeof(SiMngmt));
475
476
477 smHdrInit(&cfg.hdr);
478
479
480 smPstInit( &cfg.t.cfg.s.siGen.sm );
481
482
483 cfg.hdr.msgType = TCFG;
484 cfg.hdr.entId.ent = ENTSI;
485 cfg.hdr.entId.inst = S_INST;
486 cfg.hdr.elmId.elmnt = STGEN;
487
488 cfg.t.cfg.s.siGen.sm.srcEnt = ENTSI;
489 cfg.t.cfg.s.siGen.sm.dstEnt = ENTSM;
490
491 cfg.t.cfg.s.siGen.nmbSaps = MAX_CC_INTERFACE;
492 cfg.t.cfg.s.siGen.nmbNSaps = MAX_SN_INTERFACE;
493 cfg.t.cfg.s.siGen.nmbCir = MAX_SI_CIRCUITS;
494 cfg.t.cfg.s.siGen.nmbIntf = MAX_SI_INTERFACES;
495 cfg.t.cfg.s.siGen.nmbCirGrp = MAX_SI_CIR_GRP;
496 cfg.t.cfg.s.siGen.nmbCalRef = MAX_SI_CALL_REF;
497 cfg.t.cfg.s.siGen.timeRes = SI_PERIOD;
498 cfg.t.cfg.s.siGen.sccpSup = FALSE;
499 cfg.t.cfg.s.siGen.handleTTBinCC = FALSE;
500 cfg.t.cfg.s.siGen.mapCPCandFCI = TRUE;
501 #if (LSIV3 || LSIV4 || LSIV5)
502 cfg.t.cfg.s.siGen.lnkSelOpt = SI_LINK_SELECTION;
503 #endif
504 cfg.t.cfg.s.siGen.poolTrUpper = POOL_UP_TR;
505 cfg.t.cfg.s.siGen.poolTrLower = POOL_LW_TR;
506 cfg.t.cfg.s.siGen.cirGrTmr.t18.enb = TRUE;
507 cfg.t.cfg.s.siGen.cirGrTmr.t18.val = 300;
508 cfg.t.cfg.s.siGen.cirGrTmr.t19.enb = TRUE;
509 cfg.t.cfg.s.siGen.cirGrTmr.t19.val = 3000;
510 cfg.t.cfg.s.siGen.cirGrTmr.t20.enb = TRUE;
511 cfg.t.cfg.s.siGen.cirGrTmr.t20.val = 300;
512 cfg.t.cfg.s.siGen.cirGrTmr.t21.enb = TRUE;
513 cfg.t.cfg.s.siGen.cirGrTmr.t21.val = 3000;
514 cfg.t.cfg.s.siGen.cirGrTmr.t22.enb = TRUE;
515 cfg.t.cfg.s.siGen.cirGrTmr.t22.val = 300;
516 cfg.t.cfg.s.siGen.cirGrTmr.t23.enb = TRUE;
517 cfg.t.cfg.s.siGen.cirGrTmr.t23.val = 3000;
518 #ifndef SS7_UK
519 cfg.t.cfg.s.siGen.cirGrTmr.t28.enb = TRUE;
520 cfg.t.cfg.s.siGen.cirGrTmr.t28.val = 100;
521 #endif
522 #if (SS7_ANS88 || SS7_ANS92 || SS7_ANS95 || SS7_BELL)
523 cfg.t.cfg.s.siGen.cirGrTmr.tFGR.enb = TRUE;
524 cfg.t.cfg.s.siGen.cirGrTmr.tFGR.val = 50;
525 #endif
526 #if CGPN_CHK
527 cfg.t.cfg.s.siGen.cgPtyNumGenCfg = TRUE;
528 #endif
529 #ifdef SI_SUPPRESS_CFN
530 cfg.t.cfg.s.siGen.suppressCfn = TRUE;
531 #endif
532
533 return(sng_cfg_isup(&pst, &cfg));
534
535 }
536
537
538 int ftmod_ss7_cc_gen_config(void)
539 {
540 CcMngmt cfg;
541 Pst pst;
542
543
544 smPstInit(&pst);
545
546
547 pst.dstEnt = ENTCC;
548
549
550 memset(&cfg, 0x0, sizeof(CcMngmt));
551
552
553 smHdrInit(&cfg.hdr);
554
555
556 smPstInit( &cfg.t.cfg.s.ccGen.sm );
557
558
559 cfg.hdr.msgType = TCFG;
560 cfg.hdr.entId.ent = ENTCC;
561 cfg.hdr.entId.inst = S_INST;
562 cfg.hdr.elmId.elmnt = STGEN;
563
564 cfg.t.cfg.s.ccGen.sm.srcEnt = ENTCC;
565 cfg.t.cfg.s.ccGen.sm.dstEnt = ENTSM;
566
567 cfg.t.cfg.s.ccGen.poolTrUpper = POOL_UP_TR;
568 cfg.t.cfg.s.ccGen.poolTrLower = POOL_LW_TR;
569
570 return(sng_cfg_cc(&pst, &cfg));
571 }
572
573
574 int ftmod_ss7_mtp1_psap_config(int id)
575 {
576 L1Mngmt cfg;
577 Pst pst;
578 sng_mtp_link_t *k = &g_ftdm_sngss7_data.cfg.mtpLink[id];
579
580
581 smPstInit(&pst);
582
583
584 pst.dstEnt = ENTL1;
585
586
587 memset(&cfg, 0x0, sizeof(L1Mngmt));
588
589
590 smHdrInit(&cfg.hdr);
591
592
593 cfg.hdr.msgType = TCFG;
594 cfg.hdr.entId.ent = ENTL1;
595 cfg.hdr.entId.inst = S_INST;
596 cfg.hdr.elmId.elmnt = STPSAP;
597
598 cfg.hdr.elmId.elmntInst1 = k->id;
599
600 cfg.t.cfg.s.l1PSAP.span = k->mtp1.span;
601 cfg.t.cfg.s.l1PSAP.chan = k->mtp1.chan;
602 cfg.t.cfg.s.l1PSAP.spId = k->id;
603
604 return(sng_cfg_mtp1(&pst, &cfg));
605 }
606
607
608 int ftmod_ss7_mtp2_dlsap_config(int id)
609 {
610 SdMngmt cfg;
611 Pst pst;
612 sng_mtp_link_t *k = &g_ftdm_sngss7_data.cfg.mtpLink[id];
613
614
615 smPstInit( &pst);
616
617
618 pst.dstEnt = ENTSD;
619
620
621 memset(&cfg, 0x0, sizeof(SdMngmt));
622
623
624 smHdrInit(&cfg.hdr);
625
626
627 cfg.hdr.msgType = TCFG;
628 cfg.hdr.entId.ent = ENTSD;
629 cfg.hdr.entId.inst = S_INST;
630 cfg.hdr.elmId.elmnt = STDLSAP;
631
632 cfg.hdr.elmId.elmntInst1 = k->id;
633
634 cfg.t.cfg.s.sdDLSAP.mem.region = S_REG;
635 cfg.t.cfg.s.sdDLSAP.mem.pool = S_POOL;
636 cfg.t.cfg.s.sdDLSAP.swtch = k->mtp2.linkType;
637 cfg.t.cfg.s.sdDLSAP.priorDl = PRIOR0;
638 cfg.t.cfg.s.sdDLSAP.routeDl = RTESPEC;
639 cfg.t.cfg.s.sdDLSAP.selectorDl = 0;
640 cfg.t.cfg.s.sdDLSAP.dstProcId = SFndProcId();
641 cfg.t.cfg.s.sdDLSAP.entMac = ENTL1;
642 cfg.t.cfg.s.sdDLSAP.instMac = S_INST;
643 cfg.t.cfg.s.sdDLSAP.priorMac = PRIOR0;
644 cfg.t.cfg.s.sdDLSAP.routeMac = RTESPEC;
645 cfg.t.cfg.s.sdDLSAP.selectorMac = 0;
646 cfg.t.cfg.s.sdDLSAP.memMac.region = S_REG;
647 cfg.t.cfg.s.sdDLSAP.memMac.pool = S_POOL;
648 cfg.t.cfg.s.sdDLSAP.maxOutsFrms = MAX_SD_OUTSTANDING;
649 cfg.t.cfg.s.sdDLSAP.errType = k->mtp2.errorType;
650 cfg.t.cfg.s.sdDLSAP.t1.enb = TRUE;
651 cfg.t.cfg.s.sdDLSAP.t1.val = k->mtp2.t1;
652 cfg.t.cfg.s.sdDLSAP.t2.enb = TRUE;
653 cfg.t.cfg.s.sdDLSAP.t2.val = k->mtp2.t2;
654 cfg.t.cfg.s.sdDLSAP.t3.enb = TRUE;
655 cfg.t.cfg.s.sdDLSAP.t3.val = k->mtp2.t3;
656 cfg.t.cfg.s.sdDLSAP.t5.enb = TRUE;
657 cfg.t.cfg.s.sdDLSAP.t5.val = k->mtp2.t5;
658 cfg.t.cfg.s.sdDLSAP.t6.enb = TRUE;
659 cfg.t.cfg.s.sdDLSAP.t6.val = k->mtp2.t6;
660 cfg.t.cfg.s.sdDLSAP.t7.enb = TRUE;
661 cfg.t.cfg.s.sdDLSAP.t7.val = k->mtp2.t7;
662 cfg.t.cfg.s.sdDLSAP.provEmrgcy = k->mtp2.t4e;
663 cfg.t.cfg.s.sdDLSAP.provNormal = k->mtp2.t4n;
664 cfg.t.cfg.s.sdDLSAP.lssuLen = k->mtp2.lssuLength;
665 cfg.t.cfg.s.sdDLSAP.maxFrmLen = MAX_SD_FRAME_LEN;
666 cfg.t.cfg.s.sdDLSAP.congDisc = FALSE;
667 cfg.t.cfg.s.sdDLSAP.sdT = MAX_SD_SUERM;
668 cfg.t.cfg.s.sdDLSAP.sdTie = MAX_SD_AERM_EMERGENCY;
669 cfg.t.cfg.s.sdDLSAP.sdTin = MAX_SD_AERM_NORMAL;
670 cfg.t.cfg.s.sdDLSAP.sdN1 = MAX_SD_MSU_RETRANS;
671 cfg.t.cfg.s.sdDLSAP.sdN2 = MAX_SD_OCTETS_RETRANS;
672 cfg.t.cfg.s.sdDLSAP.sdCp = MAX_SD_ALIGN_ATTEMPTS;
673 cfg.t.cfg.s.sdDLSAP.spIdSE = k->mtp2.mtp1Id;
674 cfg.t.cfg.s.sdDLSAP.sdtFlcStartTr = 256;
675 cfg.t.cfg.s.sdDLSAP.sdtFlcEndTr = 512;
676
677 #ifdef SD_HSL
678 cfg.t.cfg.s.sdDLSAP.sapType =;
679 cfg.t.cfg.s.sdDLSAP.sapFormat =;
680 cfg.t.cfg.s.sdDLSAP.t8.enb =;
681 cfg.t.cfg.s.sdDLSAP.sdTe =;
682 cfg.t.cfg.s.sdDLSAP.sdUe =;
683 cfg.t.cfg.s.sdDLSAP.sdDe =;
684 #endif
685
686 #if (SS7_TTC || SS7_NTT)
687 cfg.t.cfg.s.sdDLSAP.numRtb =;
688 cfg.t.cfg.s.sdDLSAP.tf =;
689 cfg.t.cfg.s.sdDLSAP.tfv =;
690 cfg.t.cfg.s.sdDLSAP.to =;
691 cfg.t.cfg.s.sdDLSAP.ta =;
692 cfg.t.cfg.s.sdDLSAP.ts =;
693 cfg.t.cfg.s.sdDLSAP.tso =;
694 cfg.t.cfg.s.sdDLSAP.te =;
695 #endif
696
697 #if (SS7_NTT)
698 cfg.t.cfg.s.sdDLSAP.repMsuNack =;
699 cfg.t.cfg.s.sdDLSAP.invFibIgnore =;
700 cfg.t.cfg.s.sdDLSAP.invBsnIgnore =;
701 cfg.t.cfg.s.sdDLSAP.congAbatOnNack =;
702 #endif
703
704 #ifdef TDS_ROLL_UPGRADE_SUPPORT
705 cfg.t.cfg.s.sdDLSAP.hlremIntfValid = FALSE;
706 cfg.t.cfg.s.sdDLSAP.remIntfVer = SDTIFVER;
707 #endif
708
709 return(sng_cfg_mtp2(&pst, &cfg));
710 return 0;
711 }
712
713
714 int ftmod_ss7_mtp3_dlsap_config(int id)
715 {
716 Pst pst;
717 SnMngmt cfg;
718 sng_mtp_link_t *k = &g_ftdm_sngss7_data.cfg.mtpLink[id];
719
720
721
722 smPstInit(&pst);
723
724
725 pst.dstEnt = ENTSN;
726
727
728 memset(&cfg, 0x0, sizeof(SnMngmt));
729
730
731 smHdrInit(&cfg.hdr);
732
733
734 cfg.hdr.msgType = TCFG;
735 cfg.hdr.entId.ent = ENTSN;
736 cfg.hdr.entId.inst = S_INST;
737 cfg.hdr.elmId.elmnt = STDLSAP;
738
739 cfg.hdr.elmId.elmntInst1 = k->id;
740
741 cfg.t.cfg.s.snDLSAP.lnkSetId = k->mtp3.linkSetId;
742 cfg.t.cfg.s.snDLSAP.opc = k->mtp3.spc;
743 cfg.t.cfg.s.snDLSAP.adjDpc = k->mtp3.apc;
744 cfg.t.cfg.s.snDLSAP.lnkPrior = 0;
745 cfg.t.cfg.s.snDLSAP.msgSize = MAX_SN_MSG_SIZE;
746 cfg.t.cfg.s.snDLSAP.msgPrior = 0;
747 cfg.t.cfg.s.snDLSAP.lnkType = k->mtp3.linkType;
748 cfg.t.cfg.s.snDLSAP.upSwtch = k->mtp3.switchType;
749 cfg.t.cfg.s.snDLSAP.maxSLTtry = MAX_SLTM_RETRIES;
750 cfg.t.cfg.s.snDLSAP.p0QLen = 32;
751 cfg.t.cfg.s.snDLSAP.p1QLen = 32;
752 cfg.t.cfg.s.snDLSAP.p2QLen = 32;
753 cfg.t.cfg.s.snDLSAP.p3QLen = 32;
754 cfg.t.cfg.s.snDLSAP.discPrior = 0;
755 #ifndef SDT2
756 cfg.t.cfg.s.snDLSAP.maxCredit = MAX_SN_CREDIT;
757 #endif
758 cfg.t.cfg.s.snDLSAP.lnkId = 0;
759 cfg.t.cfg.s.snDLSAP.lnkTstSLC = k->mtp3.slc;
760 cfg.t.cfg.s.snDLSAP.tstLen = 6;
761 cfg.t.cfg.s.snDLSAP.tst[0] = 'K';
762 cfg.t.cfg.s.snDLSAP.tst[1] = 'O';
763 cfg.t.cfg.s.snDLSAP.tst[2] = 'N';
764 cfg.t.cfg.s.snDLSAP.tst[3] = 'R';
765 cfg.t.cfg.s.snDLSAP.tst[4] = 'A';
766 cfg.t.cfg.s.snDLSAP.tst[5] = 'D';
767 cfg.t.cfg.s.snDLSAP.ssf = k->mtp3.ssf;
768 cfg.t.cfg.s.snDLSAP.dstProcId = SFndProcId();
769 cfg.t.cfg.s.snDLSAP.dstEnt = ENTSD;
770 cfg.t.cfg.s.snDLSAP.dstInst = S_INST;
771 cfg.t.cfg.s.snDLSAP.prior = PRIOR0;
772 cfg.t.cfg.s.snDLSAP.route = RTESPEC;
773 cfg.t.cfg.s.snDLSAP.selector = 0;
774 cfg.t.cfg.s.snDLSAP.mem.region = S_REG;
775 cfg.t.cfg.s.snDLSAP.mem.pool = S_POOL;
776 cfg.t.cfg.s.snDLSAP.spId = k->mtp3.mtp2Id ;
777
778 switch (k->mtp3.linkType) {
779
780 case (LSN_SW_ANS):
781 case (LSN_SW_ANS96):
782 case (LSN_SW_CHINA):
783 cfg.t.cfg.s.snDLSAP.dpcLen = DPC24;
784 cfg.t.cfg.s.snDLSAP.l2Type = LSN_MTP2_56KBPS;
785 cfg.t.cfg.s.snDLSAP.isCLink = FALSE;
786 break;
787
788 case (LSN_SW_ITU):
789 cfg.t.cfg.s.snDLSAP.dpcLen = DPC14;
790 break;
791
792 default:
793 cfg.t.cfg.s.snDLSAP.dpcLen = DPC14;
794 break;
795
796 }
797
798 switch (k->mtp3.linkType) {
799
800 case (LSN_SW_ANS):
801 case (LSN_SW_ANS96):
802 cfg.t.cfg.s.snDLSAP.flushContFlag = TRUE;
803 break;
804
805 case (LSN_SW_ITU):
806 case (LSN_SW_CHINA):
807 cfg.t.cfg.s.snDLSAP.flushContFlag = FALSE;
808 break;
809
810 default:
811 cfg.t.cfg.s.snDLSAP.flushContFlag = FALSE;
812 break;
813
814 }
815
816 cfg.t.cfg.s.snDLSAP.tmr.t1.enb = TRUE;
817 cfg.t.cfg.s.snDLSAP.tmr.t1.val = k->mtp3.t1;
818 cfg.t.cfg.s.snDLSAP.tmr.t2.enb = TRUE;
819 cfg.t.cfg.s.snDLSAP.tmr.t2.val = k->mtp3.t2;
820 cfg.t.cfg.s.snDLSAP.tmr.t3.enb = TRUE;
821 cfg.t.cfg.s.snDLSAP.tmr.t3.val = k->mtp3.t3;
822 cfg.t.cfg.s.snDLSAP.tmr.t4.enb = TRUE;
823 cfg.t.cfg.s.snDLSAP.tmr.t4.val = k->mtp3.t4;
824 cfg.t.cfg.s.snDLSAP.tmr.t5.enb = TRUE;
825 cfg.t.cfg.s.snDLSAP.tmr.t5.val = k->mtp3.t5;
826 cfg.t.cfg.s.snDLSAP.tmr.t7.enb = TRUE;
827 cfg.t.cfg.s.snDLSAP.tmr.t7.val = k->mtp3.t7;
828 cfg.t.cfg.s.snDLSAP.tmr.t12.enb = TRUE;
829 cfg.t.cfg.s.snDLSAP.tmr.t12.val = k->mtp3.t12;
830 cfg.t.cfg.s.snDLSAP.tmr.t13.enb = TRUE;
831 cfg.t.cfg.s.snDLSAP.tmr.t13.val = k->mtp3.t13;
832 cfg.t.cfg.s.snDLSAP.tmr.t14.enb = TRUE;
833 cfg.t.cfg.s.snDLSAP.tmr.t14.val = k->mtp3.t14;
834 cfg.t.cfg.s.snDLSAP.tmr.t17.enb = TRUE;
835 cfg.t.cfg.s.snDLSAP.tmr.t17.val = k->mtp3.t17;
836 cfg.t.cfg.s.snDLSAP.tmr.t22.enb = TRUE;
837 cfg.t.cfg.s.snDLSAP.tmr.t22.val = k->mtp3.t22;
838 cfg.t.cfg.s.snDLSAP.tmr.t23.enb = TRUE;
839 cfg.t.cfg.s.snDLSAP.tmr.t23.val = k->mtp3.t23;
840 cfg.t.cfg.s.snDLSAP.tmr.t24.enb = TRUE;
841 cfg.t.cfg.s.snDLSAP.tmr.t24.val = k->mtp3.t24;
842 cfg.t.cfg.s.snDLSAP.tmr.t31.enb = TRUE;
843 cfg.t.cfg.s.snDLSAP.tmr.t31.val = k->mtp3.t31;
844 cfg.t.cfg.s.snDLSAP.tmr.t32.enb = TRUE;
845 cfg.t.cfg.s.snDLSAP.tmr.t32.val = k->mtp3.t32;
846 cfg.t.cfg.s.snDLSAP.tmr.t33.enb = TRUE;
847 cfg.t.cfg.s.snDLSAP.tmr.t33.val = k->mtp3.t33;
848 cfg.t.cfg.s.snDLSAP.tmr.t34.enb = TRUE;
849 cfg.t.cfg.s.snDLSAP.tmr.t34.val = k->mtp3.t34;
850 #if (SS7_ANS92 || SS7_ANS88 || SS7_ANS96 || defined(TDS_ROLL_UPGRADE_SUPPORT))
851 cfg.t.cfg.s.snDLSAP.tmr.t35.enb = TRUE;
852 cfg.t.cfg.s.snDLSAP.tmr.t35.val = k->mtp3.t35;
853 cfg.t.cfg.s.snDLSAP.tmr.t36.enb = TRUE;
854 cfg.t.cfg.s.snDLSAP.tmr.t36.val = k->mtp3.t36;
855 cfg.t.cfg.s.snDLSAP.tmr.t37.enb = TRUE;
856 cfg.t.cfg.s.snDLSAP.tmr.t37.val = k->mtp3.t37;
857 cfg.t.cfg.s.snDLSAP.tmr.tCraft.enb = TRUE;
858 cfg.t.cfg.s.snDLSAP.tmr.tCraft.val = k->mtp3.tcraft;
859 #endif
860 #ifdef SDT2
861 cfg.t.cfg.s.snDLSAP.tmr.tFlc.enb = TRUE;
862 cfg.t.cfg.s.snDLSAP.tmr.tFlc.val = 300;
863 cfg.t.cfg.s.snDLSAP.tmr.tBnd.enb = TRUE;
864 cfg.t.cfg.s.snDLSAP.tmr.tBnd.val = 20;
865 #endif
866 #ifdef TDS_ROLL_UPGRADE_SUPPORT
867 cfg.t.cfg.s.snDLSAP.remIntfValid = FALSE;
868 cfg.t.cfg.s.snDLSAP.remIntfVer = SNTIFVER;
869 #endif
870
871 return(sng_cfg_mtp3(&pst, &cfg));
872 }
873
874
875 int ftmod_ss7_mtp3_nsap_config(int id)
876 {
877 Pst pst;
878 SnMngmt cfg;
879 sng_nsap_t *k = &g_ftdm_sngss7_data.cfg.nsap[id];
880
881
882 smPstInit(&pst);
883
884
885 pst.dstEnt = ENTSN;
886
887
888 memset(&cfg, 0x0, sizeof(SnMngmt));
889
890
891 smHdrInit(&cfg.hdr);
892
893
894 cfg.hdr.msgType = TCFG;
895 cfg.hdr.entId.ent = ENTSN;
896 cfg.hdr.entId.inst = S_INST;
897 cfg.hdr.elmId.elmnt = STNSAP;
898
899 cfg.hdr.elmId.elmntInst1 = k->spId;
900
901 cfg.t.cfg.s.snNSAP.ssf = k->ssf;
902 cfg.t.cfg.s.snNSAP.lnkType = k->linkType;
903 cfg.t.cfg.s.snNSAP.upSwtch = k->switchType;
904 cfg.t.cfg.s.snNSAP.selector = 0;
905 cfg.t.cfg.s.snNSAP.mem.region = S_REG;
906 cfg.t.cfg.s.snNSAP.mem.pool = S_POOL;
907 cfg.t.cfg.s.snNSAP.prior = PRIOR0;
908 cfg.t.cfg.s.snNSAP.route = RTESPEC;
909 #if( SS7_ANS92 || SS7_ANS88 || SS7_ANS96 || SS7_CHINA )
910 cfg.t.cfg.s.snNSAP.dpcLen = DPC24;
911 #else
912 cfg.t.cfg.s.snNSAP.dpcLen = DPC14;
913 #endif
914 #if (defined(SN_SG) || defined(TDS_ROLL_UPGRADE_SUPPORT))
915 cfg.t.cfg.s.snNSAP.usrParts = ;
916 #endif
917 #ifdef TDS_ROLL_UPGRADE_SUPPORT
918 cfg.t.cfg.s.snNSAP.remIntfValid = FALSE;
919 cfg.t.cfg.s.snNSAP.remIntfVer = SNTIFVER;
920 #endif
921
922 return(sng_cfg_mtp3(&pst, &cfg));
923 }
924
925
926 int ftmod_ss7_mtp3_linkset_config(int id)
927 {
928 Pst pst;
929 SnMngmt cfg;
930 int c;
931 sng_link_set_t *k = &g_ftdm_sngss7_data.cfg.mtpLinkSet[id];
932
933
934 smPstInit(&pst);
935
936
937 pst.dstEnt = ENTSN;
938
939
940 memset(&cfg, 0x0, sizeof(SnMngmt));
941
942
943 smHdrInit(&cfg.hdr);
944
945
946 cfg.hdr.msgType = TCFG;
947 cfg.hdr.entId.ent = ENTSN;
948 cfg.hdr.entId.inst = S_INST;
949 cfg.hdr.elmId.elmnt = STLNKSET;
950
951 cfg.hdr.elmId.elmntInst1 = k->id;
952
953 cfg.t.cfg.s.snLnkSet.lnkSetId = k->id;
954 cfg.t.cfg.s.snLnkSet.lnkSetType = k->linkType;
955 cfg.t.cfg.s.snLnkSet.adjDpc = k->apc;
956 cfg.t.cfg.s.snLnkSet.nmbActLnkReqd = k->minActive;
957 cfg.t.cfg.s.snLnkSet.nmbCmbLnkSet = k->numLinks;
958 for(c = 0; c < k->numLinks;c++) {
959 cfg.t.cfg.s.snLnkSet.cmbLnkSet[c].cmbLnkSetId = k->links[c];
960 cfg.t.cfg.s.snLnkSet.cmbLnkSet[c].lnkSetPrior = 0;
961 }
962
963
964 return(sng_cfg_mtp3(&pst, &cfg));
965 }
966
967
968 int ftmod_ss7_mtp3_route_config(int id)
969 {
970 Pst pst;
971 SnMngmt cfg;
972 sng_route_t *k = &g_ftdm_sngss7_data.cfg.mtpRoute[id];
973
974
975 smPstInit(&pst);
976
977
978 pst.dstEnt = ENTSN;
979
980
981 memset(&cfg, 0x0, sizeof(SnMngmt));
982
983
984 smHdrInit(&cfg.hdr);
985
986
987 cfg.hdr.msgType = TCFG;
988 cfg.hdr.entId.ent = ENTSN;
989 cfg.hdr.entId.inst = S_INST;
990 cfg.hdr.elmId.elmnt = STROUT;
991
992 cfg.hdr.elmId.elmntInst1 = k->id;
993
994 cfg.t.cfg.s.snRout.dpc = k->dpc;
995 cfg.t.cfg.s.snRout.spType = LSN_TYPE_SP;
996 cfg.t.cfg.s.snRout.swtchType = k->linkType;
997 cfg.t.cfg.s.snRout.upSwtch = k->switchType;
998 cfg.t.cfg.s.snRout.cmbLnkSetId = k->cmbLinkSetId;
999 if (k->id == 0) {
1000 cfg.t.cfg.s.snRout.dir = LSN_RTE_UP;
1001 } else {
1002 cfg.t.cfg.s.snRout.dir = LSN_RTE_DN;
1003 }
1004 cfg.t.cfg.s.snRout.rteToAdjSp = 0;
1005 cfg.t.cfg.s.snRout.ssf = k->ssf;
1006 cfg.t.cfg.s.snRout.brdcastFlg = TRUE;
1007 if (cfg.t.cfg.s.snRout.swtchType == LSN_SW_ITU) {
1008 cfg.t.cfg.s.snRout.rstReq = LSN_ITU92_RST;
1009 } else if ((cfg.t.cfg.s.snRout.swtchType == LSN_SW_ANS) ||
1010 (cfg.t.cfg.s.snRout.swtchType == LSN_SW_ANS96)) {
1011 cfg.t.cfg.s.snRout.rstReq = LSN_ANS_RST;
1012 } else {
1013 cfg.t.cfg.s.snRout.rstReq = LSN_NO_RST;
1014 }
1015 if ((cfg.t.cfg.s.snRout.swtchType == LSN_SW_ITU) ||
1016 (cfg.t.cfg.s.snRout.swtchType == LSN_SW_CHINA) ||
1017 (cfg.t.cfg.s.snRout.swtchType == LSN_SW_BICI)) {
1018 cfg.t.cfg.s.snRout.slsRange = LSN_ITU_SLS_RANGE;
1019 } else {
1020 cfg.t.cfg.s.snRout.slsRange = LSN_ANSI_5BIT_SLS_RANGE;
1021 }
1022 cfg.t.cfg.s.snRout.lsetSel = 0x1;
1023 cfg.t.cfg.s.snRout.multiMsgPrior = TRUE;
1024 cfg.t.cfg.s.snRout.rctReq = TRUE;
1025 cfg.t.cfg.s.snRout.slsLnk = FALSE;
1026 #ifdef LSNV2
1027 # if (SS7_NTT || defined(TDS_ROLL_UPGRADE_SUPPORT))
1028 cfg.t.cfg.s.snRout.destSpec =;
1029 # endif
1030 #endif
1031 #if (defined(LSNV3) || defined(SN_MULTIPLE_NETWORK_RESTART))
1032 cfg.t.cfg.s.snRout.tfrReq =;
1033 #endif
1034 cfg.t.cfg.s.snRout.tmr.t6.enb = TRUE;
1035 cfg.t.cfg.s.snRout.tmr.t6.val = k->t6;
1036 cfg.t.cfg.s.snRout.tmr.t8.enb = TRUE;
1037 cfg.t.cfg.s.snRout.tmr.t8.val = k->t8;
1038 cfg.t.cfg.s.snRout.tmr.t10.enb = TRUE;
1039 cfg.t.cfg.s.snRout.tmr.t10.val = k->t10;
1040 cfg.t.cfg.s.snRout.tmr.t11.enb = TRUE;
1041 cfg.t.cfg.s.snRout.tmr.t11.val = k->t11;
1042 cfg.t.cfg.s.snRout.tmr.t19.enb = TRUE;
1043 cfg.t.cfg.s.snRout.tmr.t19.val = k->t19;
1044 cfg.t.cfg.s.snRout.tmr.t21.enb = TRUE;
1045 cfg.t.cfg.s.snRout.tmr.t21.val = k->t21;
1046
1047 #if (defined(LSNV3) || defined(SN_MULTIPLE_NETWORK_RESTART))
1048 cfg.t.cfg.s.snRout.tmr.t15.enb = TRUE;
1049 cfg.t.cfg.s.snRout.tmr.t15.val = k->t15;
1050 cfg.t.cfg.s.snRout.tmr.t16.enb = TRUE;
1051 cfg.t.cfg.s.snRout.tmr.t16.val = k->t16;
1052 cfg.t.cfg.s.snRout.tmr.t18.enb = TRUE;
1053 cfg.t.cfg.s.snRout.tmr.t18.val = k->t18;
1054 # if (SS7_ANS92 || SS7_ANS88 || SS7_ANS96 || defined(TDS_ROLL_UPGRADE_SUPPORT))
1055 cfg.t.cfg.s.snRout.tmr.t25.enb = TRUE;
1056 cfg.t.cfg.s.snRout.tmr.t25.val = k->t25;
1057 cfg.t.cfg.s.snRout.tmr.t26.enb = TRUE;
1058 cfg.t.cfg.s.snRout.tmr.t26.val = k->t26;
1059 # endif
1060 #endif
1061 #if (SS7_TTC || SS7_NTT || defined(TDS_ROLL_UPGRADE_SUPPORT))
1062 cfg.t.cfg.s.snRout.tmr.tc.enb = TRUE;
1063 cfg.t.cfg.s.snRout.tmr.tc.val = k->tc;
1064 #endif
1065 #if (defined(SN_SG) || defined(TDS_ROLL_UPGRADE_SUPPORT))
1066 cfg.t.cfg.s.snRout.tmr.tQry.enb = TRUE;
1067 cfg.t.cfg.s.snRout.tmr.tQry.val = k->tqry;
1068 #endif
1069
1070 return(sng_cfg_mtp3(&pst, &cfg));
1071 }
1072
1073
1074 int ftmod_ss7_isup_nsap_config(int id)
1075 {
1076 SiMngmt cfg;
1077 Pst pst;
1078 sng_nsap_t *k = &g_ftdm_sngss7_data.cfg.nsap[id];
1079
1080
1081 smPstInit(&pst);
1082
1083
1084 pst.dstEnt = ENTSI;
1085
1086
1087 memset(&cfg, 0x0, sizeof(SiMngmt));
1088
1089
1090 smHdrInit(&cfg.hdr);
1091
1092
1093 cfg.hdr.msgType = TCFG;
1094 cfg.hdr.entId.ent = ENTSI;
1095 cfg.hdr.entId.inst = S_INST;
1096 cfg.hdr.elmId.elmnt = STNSAP;
1097
1098 cfg.hdr.elmId.elmntInst1 = k->id;
1099
1100 #if (SI_LMINT3 || SMSI_LMINT3)
1101 cfg.t.cfg.s.siNSap.nsapId = k->id;
1102 #endif
1103 cfg.t.cfg.s.siNSap.nwId = k->nwId;
1104 cfg.t.cfg.s.siNSap.spId = k->spId;
1105 cfg.t.cfg.s.siNSap.ssf = k->ssf;
1106 cfg.t.cfg.s.siNSap.dstEnt = ENTSN;
1107 cfg.t.cfg.s.siNSap.dstInst = S_INST;
1108 cfg.t.cfg.s.siNSap.prior = PRIOR0;
1109 cfg.t.cfg.s.siNSap.route = RTESPEC;
1110 cfg.t.cfg.s.siNSap.dstProcId = SFndProcId();
1111 cfg.t.cfg.s.siNSap.sapType = SAP_MTP;
1112 cfg.t.cfg.s.siNSap.selector = 0;
1113 cfg.t.cfg.s.siNSap.tINT.enb = TRUE;
1114 cfg.t.cfg.s.siNSap.tINT.val = 50;
1115 cfg.t.cfg.s.siNSap.mem.region = S_REG;
1116 cfg.t.cfg.s.siNSap.mem.pool = S_POOL;
1117
1118 #ifdef TDS_ROLL_UPGRADE_SUPPORT
1119 cfg.t.cfg.s.siNSap.remIntfValid = FALSE;
1120 cfg.t.cfg.s.siNSap.remIntfVer;
1121 #endif
1122
1123 return(sng_cfg_isup(&pst, &cfg));
1124 }
1125
1126
1127 int ftmod_ss7_isup_intf_config(int id)
1128 {
1129 SiMngmt cfg;
1130 Pst pst;
1131 sng_isup_inf_t *k = &g_ftdm_sngss7_data.cfg.isupIntf[id];
1132
1133
1134 smPstInit(&pst);
1135
1136
1137 pst.dstEnt = ENTSI;
1138
1139
1140 memset(&cfg, 0x0, sizeof(SiMngmt));
1141
1142
1143 smHdrInit(&cfg.hdr);
1144
1145
1146 cfg.hdr.msgType = TCFG;
1147 cfg.hdr.entId.ent = ENTSI;
1148 cfg.hdr.entId.inst = S_INST;
1149 cfg.hdr.elmId.elmnt = SI_STINTF;
1150
1151 cfg.hdr.elmId.elmntInst1 = k->id;
1152
1153 cfg.t.cfg.s.siIntfCb.intfId = k->id;
1154 cfg.t.cfg.s.siIntfCb.nwId = k->nwId;
1155 cfg.t.cfg.s.siIntfCb.sapId = k->isap;
1156 cfg.t.cfg.s.siIntfCb.opc = k->spc;
1157 cfg.t.cfg.s.siIntfCb.phyDpc = k->dpc;
1158 cfg.t.cfg.s.siIntfCb.swtch = k->switchType;
1159 cfg.t.cfg.s.siIntfCb.ssf = k->ssf;
1160 cfg.t.cfg.s.siIntfCb.pauseActn = SI_PAUSE_CLRTRAN;
1161 cfg.t.cfg.s.siIntfCb.dpcCbTmr.t4.enb = TRUE;
1162 cfg.t.cfg.s.siIntfCb.dpcCbTmr.t4.val = k->t4;
1163 cfg.t.cfg.s.siIntfCb.dpcCbTmr.tPAUSE.enb = TRUE;
1164 cfg.t.cfg.s.siIntfCb.dpcCbTmr.tPAUSE.val = k->tpause;
1165 cfg.t.cfg.s.siIntfCb.dpcCbTmr.tSTAENQ.enb = TRUE;
1166 cfg.t.cfg.s.siIntfCb.dpcCbTmr.tSTAENQ.val = k->tstaenq;
1167 #if SS7_ANS95
1168 cfg.t.cfg.s.siIntfCb.availTest = FALSE;
1169 #endif
1170 #if (SS7_ITU97 || SS7_ETSIV3 || SS7_UK || SS7_NZL || SS7_ITU2000 || SS7_KZ)
1171 cfg.t.cfg.s.siIntfCb.checkTable = LSI_CHKTBLE_MRATE;
1172 #endif
1173 #if (SS7_ANS95 || SS7_ITU97 || SS7_ETSIV3 || SS7_UK || SS7_NZL || SS7_ITU2000 || SS7_KZ)
1174 switch (k->switchType) {
1175 case LSI_SW_TST:
1176 case LSI_SW_ITU:
1177 case LSI_SW_ITU97:
1178 case LSI_SW_ITU2000:
1179 case LSI_SW_ETSI:
1180 case LSI_SW_ETSIV3:
1181 case LSI_SW_RUSSIA:
1182 case LSI_SW_RUSS2000:
1183 case LSI_SW_INDIA:
1184 case LSI_SW_CHINA:
1185 cfg.t.cfg.s.siIntfCb.trunkType = TRUE;
1186 break;
1187 case LSI_SW_ANS88:
1188 case LSI_SW_ANS92:
1189 case LSI_SW_ANS95:
1190 case LSI_SW_BELL:
1191 cfg.t.cfg.s.siIntfCb.trunkType = FALSE;
1192 break;
1193 }
1194
1195 #endif
1196 #if (LSIV4 || LSIV5)
1197 cfg.t.cfg.s.siIntfCb.lnkSelOpt = LSI_LINSEK_CIC;
1198 # if (SS7_ANS88 || SS7_ANS92 || SS7_ANS95 || SS7_BELL)
1199 cfg.t.cfg.s.siIntfCb.lnkSelBits = LSI_LNKSEL_8BITS;
1200 # endif
1201 #endif
1202
1203 return(sng_cfg_isup(&pst, &cfg));
1204 }
1205
1206
1207 int ftmod_ss7_isup_ckt_config(int id)
1208 {
1209 SiMngmt cfg;
1210 Pst pst;
1211 U32 tmp_flag;
1212 sng_isup_ckt_t *k = &g_ftdm_sngss7_data.cfg.isupCkt[id];
1213
1214
1215 smPstInit(&pst);
1216
1217
1218 pst.dstEnt = ENTSI;
1219
1220
1221 memset(&cfg, 0x0, sizeof(SiMngmt));
1222
1223
1224 smHdrInit(&cfg.hdr);
1225
1226
1227 cfg.hdr.msgType = TCFG;
1228 cfg.hdr.entId.ent = ENTSI;
1229 cfg.hdr.entId.inst = S_INST;
1230 cfg.hdr.elmId.elmnt = STICIR;
1231
1232 cfg.hdr.elmId.elmntInst1 = k->id;
1233
1234 cfg.t.cfg.s.siCir.cirId = k->id;
1235 cfg.t.cfg.s.siCir.cic = k->cic;
1236 cfg.t.cfg.s.siCir.intfId = k->infId;
1237 cfg.t.cfg.s.siCir.typeCntrl = k->typeCntrl;
1238 cfg.t.cfg.s.siCir.contReq = FALSE;
1239 #if (SI_218_COMP || SS7_ANS88 || SS7_ANS92 || SS7_ANS95 || SS7_BELL)
1240 cfg.t.cfg.s.siCir.firstCic = 1;
1241 cfg.t.cfg.s.siCir.numCir = 24;
1242 cfg.t.cfg.s.siCir.nonSS7Con = TRUE;
1243 cfg.t.cfg.s.siCir.outTrkGrpN.length = 0;
1244 cfg.t.cfg.s.siCir.cvrTrkClli.length = 0;
1245 cfg.t.cfg.s.siCir.clli.length = 0;
1246 #endif
1247 cfg.t.cfg.s.siCir.cirTmr.t3.enb = TRUE;
1248 cfg.t.cfg.s.siCir.cirTmr.t3.val = k->t3;
1249 cfg.t.cfg.s.siCir.cirTmr.t12.enb = TRUE;
1250 cfg.t.cfg.s.siCir.cirTmr.t12.val = k->t12;
1251 cfg.t.cfg.s.siCir.cirTmr.t13.enb = TRUE;
1252 cfg.t.cfg.s.siCir.cirTmr.t13.val = k->t13;
1253 cfg.t.cfg.s.siCir.cirTmr.t14.enb = TRUE;
1254 cfg.t.cfg.s.siCir.cirTmr.t14.val = k->t14;
1255 cfg.t.cfg.s.siCir.cirTmr.t15.enb = TRUE;
1256 cfg.t.cfg.s.siCir.cirTmr.t15.val = k->t15;
1257 cfg.t.cfg.s.siCir.cirTmr.t16.enb = TRUE;
1258 cfg.t.cfg.s.siCir.cirTmr.t16.val = k->t16;
1259 cfg.t.cfg.s.siCir.cirTmr.t17.enb = TRUE;
1260 cfg.t.cfg.s.siCir.cirTmr.t17.val = k->t17;
1261 #if (SS7_ANS88 || SS7_ANS92 || SS7_ANS95 || SS7_BELL)
1262 cfg.t.cfg.s.siCir.cirTmr.tVal.enb = TRUE;
1263 cfg.t.cfg.s.siCir.cirTmr.tVal.val = k->tval;
1264 #endif
1265 #if (SS7_ANS95 || SS7_ITU97 || SS7_ETSIV3 || SS7_UK)
1266 tmp_flag = 0x0;
1267
1268 tmp_flag = ( 1 );
1269
1270
1271 tmp_flag |= !(0x20);
1272
1273
1274 tmp_flag |= !(0x40);
1275
1276 cfg.t.cfg.s.siCir.slotId = tmp_flag ;
1277 cfg.t.cfg.s.siCir.ctrlMult = 0;
1278 #endif
1279
1280 tmp_flag = 0x0;
1281
1282 tmp_flag = k->ssf;
1283
1284
1285 tmp_flag |= LSI_CIRFLG_CFN_ON;
1286
1287
1288 tmp_flag |= LSI_CFCI_ANALDIG;
1289
1290
1291 tmp_flag |= LSI_CFAC_UNKNOWN;
1292
1293
1294 tmp_flag |= LSI_CFCO_NONE;
1295
1296 cfg.t.cfg.s.siCir.cirFlg = tmp_flag;
1297
1298 return(sng_cfg_isup(&pst, &cfg));
1299 }
1300
1301
1302 int ftmod_ss7_isup_isap_config(int id)
1303 {
1304 SiMngmt cfg;
1305 Pst pst;
1306 sng_isap_t *k = &g_ftdm_sngss7_data.cfg.isap[id];
1307
1308
1309 smPstInit(&pst);
1310
1311
1312 pst.dstEnt = ENTSI;
1313
1314
1315 memset(&cfg, 0x0, sizeof(SiMngmt));
1316
1317
1318 smHdrInit(&cfg.hdr);
1319
1320
1321 cfg.hdr.msgType = TCFG;
1322 cfg.hdr.entId.ent = ENTSI;
1323 cfg.hdr.entId.inst = S_INST;
1324 cfg.hdr.elmId.elmnt = STISAP;
1325
1326 cfg.hdr.elmId.elmntInst1 = k->id;
1327
1328 #if (SI_LMINT3 || SMSI_LMINT3)
1329 cfg.t.cfg.s.siSap.sapId = k->id;
1330 #endif
1331 cfg.t.cfg.s.siSap.swtch = k->switchType;
1332 cfg.t.cfg.s.siSap.ssf = k->ssf;
1333 cfg.t.cfg.s.siSap.sidIns = FALSE;
1334 cfg.t.cfg.s.siSap.sidVer = FALSE;
1335 if ( cfg.t.cfg.s.siSap.sidIns == TRUE ) {
1336 #if 0
1337 cfg.t.cfg.s.siSap.sid =;
1338 cfg.t.cfg.s.siSap.natAddrInd =;
1339 cfg.t.cfg.s.siSap.sidNPlan =;
1340 cfg.t.cfg.s.siSap.sidPresInd =;
1341 cfg.t.cfg.s.siSap.incSidPresRes =;
1342 cfg.t.cfg.s.siSap.sidPresRes =;
1343 #endif
1344 } else {
1345 cfg.t.cfg.s.siSap.sid.length = 0;
1346
1347 cfg.t.cfg.s.siSap.natAddrInd = ADDR_NOTPRSNT;
1348 cfg.t.cfg.s.siSap.sidNPlan = NP_ISDN;
1349 cfg.t.cfg.s.siSap.sidPresInd = FALSE;
1350 cfg.t.cfg.s.siSap.incSidPresRes = FALSE;
1351 cfg.t.cfg.s.siSap.sidPresRes = 0;
1352 }
1353 cfg.t.cfg.s.siSap.reqOpt = FALSE;
1354 cfg.t.cfg.s.siSap.allCallMod = TRUE;
1355 cfg.t.cfg.s.siSap.maxLenU2U = MAX_SI_USER_2_USER_LEN;
1356 cfg.t.cfg.s.siSap.passOnFlag = TRUE;
1357 cfg.t.cfg.s.siSap.relLocation = ILOC_PRIVNETLU;
1358 cfg.t.cfg.s.siSap.prior = PRIOR0;
1359 cfg.t.cfg.s.siSap.route = RTESPEC;
1360 cfg.t.cfg.s.siSap.selector = 0;
1361 cfg.t.cfg.s.siSap.mem.region = S_REG;
1362 cfg.t.cfg.s.siSap.mem.pool = S_POOL;
1363
1364 cfg.t.cfg.s.siSap.tmr.t1.enb = TRUE;
1365 cfg.t.cfg.s.siSap.tmr.t1.val = k->t1;
1366 cfg.t.cfg.s.siSap.tmr.t2.enb = TRUE;
1367 cfg.t.cfg.s.siSap.tmr.t2.val = k->t2;
1368 cfg.t.cfg.s.siSap.tmr.t5.enb = TRUE;
1369 cfg.t.cfg.s.siSap.tmr.t5.val = k->t5;
1370 cfg.t.cfg.s.siSap.tmr.t6.enb = TRUE;
1371 cfg.t.cfg.s.siSap.tmr.t6.val = k->t6;
1372 cfg.t.cfg.s.siSap.tmr.t7.enb = TRUE;
1373 cfg.t.cfg.s.siSap.tmr.t7.val = k->t7;
1374 cfg.t.cfg.s.siSap.tmr.t8.enb = TRUE;
1375 cfg.t.cfg.s.siSap.tmr.t8.val = k->t8;
1376 cfg.t.cfg.s.siSap.tmr.t9.enb = TRUE;
1377 cfg.t.cfg.s.siSap.tmr.t9.val = k->t9;
1378 cfg.t.cfg.s.siSap.tmr.t27.enb = TRUE;
1379 cfg.t.cfg.s.siSap.tmr.t27.val = k->t27;
1380 cfg.t.cfg.s.siSap.tmr.t31.enb = TRUE;
1381 cfg.t.cfg.s.siSap.tmr.t31.val = k->t31;
1382 cfg.t.cfg.s.siSap.tmr.t33.enb = TRUE;
1383 cfg.t.cfg.s.siSap.tmr.t33.val = k->t33;
1384 cfg.t.cfg.s.siSap.tmr.t34.enb = TRUE;
1385 cfg.t.cfg.s.siSap.tmr.t34.val = k->t34;
1386 cfg.t.cfg.s.siSap.tmr.t36.enb = TRUE;
1387 cfg.t.cfg.s.siSap.tmr.t36.val = k->t36;
1388 cfg.t.cfg.s.siSap.tmr.tCCR.enb = TRUE;
1389 cfg.t.cfg.s.siSap.tmr.tCCR.val = k->tccr;
1390 cfg.t.cfg.s.siSap.tmr.tRELRSP.enb = TRUE;
1391 cfg.t.cfg.s.siSap.tmr.tRELRSP.val = k->trelrsp;
1392 cfg.t.cfg.s.siSap.tmr.tFNLRELRSP.enb = TRUE;
1393 cfg.t.cfg.s.siSap.tmr.tFNLRELRSP.val = k->tfnlrelrsp;
1394 #if (SS7_ANS88 || SS7_ANS92 || SS7_ANS95 || SS7_BELL)
1395 cfg.t.cfg.s.siSap.tmr.tEx.enb = TRUE;
1396 cfg.t.cfg.s.siSap.tmr.tEx.val = k->tex;
1397 cfg.t.cfg.s.siSap.tmr.tCCRt.enb = TRUE;
1398 cfg.t.cfg.s.siSap.tmr.tCCRt.val = k->tccrt;
1399 #endif
1400 #if (SS7_ANS92 || SS7_ANS95 || SS7_BELL)
1401 cfg.t.cfg.s.siSap.tmr.tCRM.enb = TRUE;
1402 cfg.t.cfg.s.siSap.tmr.tCRM.val = k->tcrm;
1403 cfg.t.cfg.s.siSap.tmr.tCRA.enb = TRUE;
1404 cfg.t.cfg.s.siSap.tmr.tCRA.val = k->tcra;
1405 #endif
1406 #if (SS7_ETSI || SS7_ITU97 || SS7_ETSIV3 || SS7_UK || SS7_NZL || SS7_KZ)
1407 cfg.t.cfg.s.siSap.tmr.tECT.enb = TRUE;
1408 cfg.t.cfg.s.siSap.tmr.tECT.val = k->tect;
1409 #endif
1410
1411 #ifdef TDS_ROLL_UPGRADE_SUPPORT
1412 cfg.t.cfg.s.siSap.remIntfValid = FALSE;
1413 cfg.t.cfg.s.siSap.remIntfVer =;
1414 #endif
1415
1416 return(sng_cfg_isup(&pst, &cfg));
1417 }
1418
1419
1420 int ftmod_ss7_cc_isap_config(int id)
1421 {
1422 CcMngmt cfg;
1423 Pst pst;
1424 sng_isap_t *k = &g_ftdm_sngss7_data.cfg.isap[id];
1425
1426
1427 smPstInit(&pst);
1428
1429
1430 pst.dstEnt = ENTCC;
1431
1432
1433 memset(&cfg, 0x0, sizeof(CcMngmt));
1434
1435
1436 smHdrInit(&cfg.hdr);
1437
1438
1439 cfg.hdr.msgType = TCFG;
1440 cfg.hdr.entId.ent = ENTCC;
1441 cfg.hdr.entId.inst = S_INST;
1442 cfg.hdr.elmId.elmnt = STISAP;
1443
1444 cfg.hdr.elmId.elmntInst1 = k->id;
1445
1446 cfg.t.cfg.s.ccISAP.suId = k->suId;
1447 cfg.t.cfg.s.ccISAP.spId = k->spId;
1448 cfg.t.cfg.s.ccISAP.pst.dstProcId = SFndProcId();
1449 cfg.t.cfg.s.ccISAP.pst.dstEnt = ENTSI;
1450 cfg.t.cfg.s.ccISAP.pst.dstInst = S_INST;
1451 cfg.t.cfg.s.ccISAP.pst.srcProcId = SFndProcId();
1452 cfg.t.cfg.s.ccISAP.pst.srcEnt = ENTCC;
1453 cfg.t.cfg.s.ccISAP.pst.srcInst = S_INST;
1454 cfg.t.cfg.s.ccISAP.pst.prior = PRIOR0;
1455 cfg.t.cfg.s.ccISAP.pst.route = RTESPEC;
1456 cfg.t.cfg.s.ccISAP.pst.region = S_REG;
1457 cfg.t.cfg.s.ccISAP.pst.pool = S_POOL;
1458 cfg.t.cfg.s.ccISAP.pst.selector = 0;
1459
1460 return(sng_cfg_cc(&pst, &cfg));
1461 }
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476