fxo_modes.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. /*
  2. * FXO port mode settings for various regions
  3. *
  4. * Copyright (C) 2008 Digium, Inc.
  5. *
  6. * extracted from wctdm.c by
  7. * Kevin P. Fleming <kpfleming@digium.com>
  8. *
  9. * All rights reserved.
  10. */
  11. /*
  12. * See http://www.asterisk.org for more information about
  13. * the Asterisk project. Please do not directly contact
  14. * any of the maintainers of this project for assistance;
  15. * the project provides a web site, mailing lists and IRC
  16. * channels for your use.
  17. *
  18. * This program is free software, distributed under the terms of
  19. * the GNU General Public License Version 2 as published by the
  20. * Free Software Foundation. See the LICENSE file included with
  21. * this program for more details.
  22. */
  23. #ifndef _FXO_MODES_H
  24. #define _FXO_MODES_H
  25. static const struct fxo_mode {
  26. const char *name;
  27. unsigned char ohs:1;
  28. unsigned char ohs2:1;
  29. unsigned char rz:1;
  30. unsigned char rt:1;
  31. unsigned char ilim:1;
  32. unsigned char dcv:2;
  33. unsigned char mini:2;
  34. unsigned char acim:4;
  35. unsigned short int ring_osc;
  36. unsigned short int ring_x;
  37. unsigned short int battdebounce; /* in milliseconds */
  38. unsigned short int battalarm; /* in milliseconds */
  39. unsigned short int battthresh; /* unknown units */
  40. } fxo_modes[] =
  41. {
  42. /* US, Canada */
  43. { .name = "FCC",
  44. .rt = 1,
  45. .dcv = 0x3,
  46. .battdebounce = 64,
  47. .battalarm = 1000,
  48. .battthresh = 3,
  49. },
  50. /* Austria, Belgium, Denmark, Finland, France, Germany,
  51. Greece, Iceland, Ireland, Italy, Luxembourg, Netherlands,
  52. Norway, Portugal, Spain, Sweden, Switzerland, and UK */
  53. { .name = "TBR21",
  54. .ilim = 1,
  55. .dcv = 0x3,
  56. .acim = 0x2,
  57. .ring_osc = 0x7e6c,
  58. .ring_x = 0x023a,
  59. .battdebounce = 64,
  60. .battalarm = 1000,
  61. .battthresh = 3,
  62. },
  63. { .name = "ARGENTINA",
  64. .dcv = 0x3,
  65. .battdebounce = 64,
  66. .battalarm = 1000,
  67. .battthresh = 3,
  68. },
  69. { .name = "AUSTRALIA",
  70. .ohs = 1,
  71. .mini = 0x3,
  72. .acim = 0x3,
  73. .battdebounce = 64,
  74. .battalarm = 1000,
  75. .battthresh = 3,
  76. },
  77. { .name = "AUSTRIA",
  78. .ohs2 = 1,
  79. .ilim = 1,
  80. .dcv = 0x3,
  81. .acim = 0x3,
  82. .battdebounce = 64,
  83. .battalarm = 1000,
  84. .battthresh = 3,
  85. },
  86. { .name = "BAHRAIN",
  87. .ilim = 1,
  88. .dcv = 0x3,
  89. .acim = 0x2,
  90. .battdebounce = 64,
  91. .battalarm = 1000,
  92. .battthresh = 3,
  93. },
  94. { .name = "BELGIUM",
  95. .ohs2 = 1,
  96. .ilim = 1,
  97. .dcv = 0x3,
  98. .acim = 0x2,
  99. .battdebounce = 64,
  100. .battalarm = 1000,
  101. .battthresh = 3,
  102. },
  103. { .name = "BRAZIL",
  104. .mini = 0x3,
  105. .battdebounce = 64,
  106. .battalarm = 1000,
  107. .battthresh = 3,
  108. },
  109. { .name = "BULGARIA",
  110. .ilim = 1,
  111. .dcv = 0x3,
  112. .mini = 0x0,
  113. .acim = 0x3,
  114. .battdebounce = 64,
  115. .battalarm = 1000,
  116. .battthresh = 3,
  117. },
  118. { .name = "CANADA",
  119. .dcv = 0x3,
  120. .battdebounce = 64,
  121. .battalarm = 1000,
  122. .battthresh = 3,
  123. },
  124. { .name = "CHILE",
  125. .dcv = 0x3,
  126. .battdebounce = 64,
  127. .battalarm = 1000,
  128. .battthresh = 3,
  129. },
  130. { .name = "CHINA",
  131. .mini = 0x3,
  132. .acim = 0xf,
  133. .battdebounce = 64,
  134. .battalarm = 1000,
  135. .battthresh = 3,
  136. },
  137. { .name = "COLOMBIA",
  138. .dcv = 0x3,
  139. .battdebounce = 64,
  140. .battalarm = 1000,
  141. .battthresh = 3,
  142. },
  143. { .name = "CROATIA",
  144. .ilim = 1,
  145. .dcv = 0x3,
  146. .mini = 0,
  147. .acim = 0x2,
  148. .battdebounce = 64,
  149. .battalarm = 1000,
  150. .battthresh = 3,
  151. },
  152. { .name = "CYPRUS",
  153. .ilim = 1,
  154. .dcv = 0x3,
  155. .acim = 0x2,
  156. .battdebounce = 64,
  157. .battalarm = 1000,
  158. .battthresh = 3,
  159. },
  160. { .name = "CZECH",
  161. .ilim = 1,
  162. .dcv = 0x3,
  163. .mini = 0,
  164. .acim = 0x2,
  165. .battdebounce = 64,
  166. .battalarm = 1000,
  167. .battthresh = 3,
  168. },
  169. { .name = "DENMARK",
  170. .ohs2 = 1,
  171. .ilim = 1,
  172. .dcv = 0x3,
  173. .acim = 0x2,
  174. .battdebounce = 64,
  175. .battalarm = 1000,
  176. .battthresh = 3,
  177. },
  178. { .name = "ECUADOR",
  179. .dcv = 0x3,
  180. .battdebounce = 64,
  181. .battalarm = 1000,
  182. .battthresh = 3,
  183. },
  184. { .name = "EGYPT",
  185. .mini = 0x3,
  186. .battdebounce = 64,
  187. .battalarm = 1000,
  188. .battthresh = 3,
  189. },
  190. { .name = "ELSALVADOR",
  191. .dcv = 0x3,
  192. .battdebounce = 64,
  193. .battalarm = 1000,
  194. .battthresh = 3,
  195. },
  196. { .name = "FINLAND",
  197. .ohs2 = 1,
  198. .ilim = 1,
  199. .dcv = 0x3,
  200. .acim = 0x2,
  201. .battdebounce = 64,
  202. .battalarm = 1000,
  203. .battthresh = 3,
  204. },
  205. { .name = "FRANCE",
  206. .ohs2 = 1,
  207. .ilim = 1,
  208. .dcv = 0x3,
  209. .mini = 0,
  210. .acim = 0x2,
  211. .battdebounce = 64,
  212. .battalarm = 1000,
  213. .battthresh = 3,
  214. },
  215. { .name = "GERMANY",
  216. .ohs2 = 1,
  217. .ilim = 1,
  218. .dcv = 0x3,
  219. .acim = 0x3,
  220. .battdebounce = 64,
  221. .battalarm = 1000,
  222. .battthresh = 3,
  223. },
  224. { .name = "GREECE",
  225. .ohs2 = 1,
  226. .ilim = 1,
  227. .dcv = 0x3,
  228. .acim = 0x2,
  229. .battdebounce = 64,
  230. .battalarm = 1000,
  231. .battthresh = 3,
  232. },
  233. { .name = "GUAM",
  234. .dcv = 0x3,
  235. .battdebounce = 64,
  236. .battalarm = 1000,
  237. .battthresh = 3,
  238. },
  239. { .name = "HONGKONG",
  240. .dcv = 0x3,
  241. .battdebounce = 64,
  242. .battalarm = 1000,
  243. .battthresh = 3,
  244. },
  245. { .name = "HUNGARY",
  246. .dcv = 0x3,
  247. .battdebounce = 64,
  248. .battalarm = 1000,
  249. .battthresh = 3,
  250. },
  251. { .name = "ICELAND",
  252. .ohs2 = 1,
  253. .ilim = 1,
  254. .dcv = 0x3,
  255. .acim = 0x2,
  256. .battdebounce = 64,
  257. .battalarm = 1000,
  258. .battthresh = 3,
  259. },
  260. { .name = "INDIA",
  261. .dcv = 0x3,
  262. .acim = 0x4,
  263. .battdebounce = 64,
  264. .battalarm = 1000,
  265. .battthresh = 3,
  266. },
  267. { .name = "INDONESIA",
  268. .dcv = 0x3,
  269. .battdebounce = 64,
  270. .battalarm = 1000,
  271. .battthresh = 3,
  272. },
  273. { .name = "IRELAND",
  274. .ohs2 = 1,
  275. .ilim = 1,
  276. .dcv = 0x3,
  277. .acim = 0x2,
  278. .battdebounce = 64,
  279. .battalarm = 1000,
  280. .battthresh = 3,
  281. },
  282. { .name = "ISRAEL",
  283. .ilim = 1,
  284. .dcv = 0x3,
  285. .acim = 0x2,
  286. .battdebounce = 64,
  287. .battalarm = 1000,
  288. .battthresh = 3,
  289. },
  290. { .name = "ITALY",
  291. .ohs2 = 1,
  292. .ilim = 1,
  293. .dcv = 0x3,
  294. .acim = 0x2,
  295. .battdebounce = 64,
  296. .battalarm = 1000,
  297. .battthresh = 3,
  298. },
  299. { .name = "JAPAN",
  300. .mini = 0x3,
  301. .battdebounce = 64,
  302. .battalarm = 1000,
  303. .battthresh = 3,
  304. },
  305. { .name = "JORDAN",
  306. .mini = 0x3,
  307. .battdebounce = 64,
  308. .battalarm = 1000,
  309. .battthresh = 3,
  310. },
  311. { .name = "KAZAKHSTAN",
  312. .dcv = 0x3,
  313. .battdebounce = 64,
  314. .battalarm = 1000,
  315. .battthresh = 3,
  316. },
  317. { .name = "KUWAIT",
  318. .dcv = 0x3,
  319. .battdebounce = 64,
  320. .battalarm = 1000,
  321. .battthresh = 3,
  322. },
  323. { .name = "LATVIA",
  324. .ilim = 1,
  325. .dcv = 0x3,
  326. .acim = 0x2,
  327. .battdebounce = 64,
  328. .battalarm = 1000,
  329. .battthresh = 3,
  330. },
  331. { .name = "LEBANON",
  332. .ilim = 1,
  333. .dcv = 0x3,
  334. .acim = 0x2,
  335. .battdebounce = 64,
  336. .battalarm = 1000,
  337. .battthresh = 3,
  338. },
  339. { .name = "LUXEMBOURG",
  340. .ohs2 = 1,
  341. .ilim = 1,
  342. .dcv = 0x3,
  343. .acim = 0x2,
  344. .battdebounce = 64,
  345. .battalarm = 1000,
  346. .battthresh = 3,
  347. },
  348. { .name = "MACAO",
  349. .dcv = 0x3,
  350. .battdebounce = 64,
  351. .battalarm = 1000,
  352. .battthresh = 3,
  353. },
  354. /* Current loop >= 20ma */
  355. { .name = "MALAYSIA",
  356. .mini = 0x3,
  357. .battdebounce = 64,
  358. .battalarm = 1000,
  359. .battthresh = 3,
  360. },
  361. { .name = "MALTA",
  362. .ilim = 1,
  363. .dcv = 0x3,
  364. .acim = 0x2,
  365. .battdebounce = 64,
  366. .battalarm = 1000,
  367. .battthresh = 3,
  368. },
  369. { .name = "MEXICO",
  370. .dcv = 0x3,
  371. .battdebounce = 64,
  372. .battalarm = 1000,
  373. .battthresh = 3,
  374. },
  375. { .name = "MOROCCO",
  376. .ilim = 1,
  377. .dcv = 0x3,
  378. .acim = 0x2,
  379. .battdebounce = 64,
  380. .battalarm = 1000,
  381. .battthresh = 3,
  382. },
  383. { .name = "NETHERLANDS",
  384. .ohs2 = 1,
  385. .ilim = 1,
  386. .dcv = 0x3,
  387. .acim = 0x2,
  388. .battdebounce = 64,
  389. .battalarm = 1000,
  390. .battthresh = 3,
  391. },
  392. { .name = "NEWZEALAND",
  393. .dcv = 0x3,
  394. .acim = 0x4,
  395. .battdebounce = 64,
  396. .battalarm = 1000,
  397. .battthresh = 3,
  398. },
  399. { .name = "NIGERIA",
  400. .ilim = 0x1,
  401. .dcv = 0x3,
  402. .acim = 0x2,
  403. .battdebounce = 64,
  404. .battalarm = 1000,
  405. .battthresh = 3,
  406. },
  407. { .name = "NORWAY",
  408. .ohs2 = 1,
  409. .ilim = 1,
  410. .dcv = 0x3,
  411. .acim = 0x2,
  412. .battdebounce = 64,
  413. .battalarm = 1000,
  414. .battthresh = 3,
  415. },
  416. { .name = "OMAN",
  417. .mini = 0x3,
  418. .battdebounce = 64,
  419. .battalarm = 1000,
  420. .battthresh = 3,
  421. },
  422. { .name = "PAKISTAN",
  423. .mini = 0x3,
  424. .battdebounce = 64,
  425. .battalarm = 1000,
  426. .battthresh = 3,
  427. },
  428. { .name = "PERU",
  429. .dcv = 0x3,
  430. .battdebounce = 64,
  431. .battalarm = 1000,
  432. .battthresh = 3,
  433. },
  434. { .name = "PHILIPPINES",
  435. .mini = 0x3,
  436. .battdebounce = 64,
  437. .battalarm = 1000,
  438. .battthresh = 3,
  439. },
  440. { .name = "POLAND",
  441. .rz = 1,
  442. .rt = 1,
  443. .dcv = 0x3,
  444. .battdebounce = 64,
  445. .battalarm = 1000,
  446. .battthresh = 3,
  447. },
  448. { .name = "PORTUGAL",
  449. .ohs2 = 1,
  450. .ilim = 1,
  451. .dcv = 0x3,
  452. .acim = 0x2,
  453. .battdebounce = 64,
  454. .battalarm = 1000,
  455. .battthresh = 3,
  456. },
  457. { .name = "ROMANIA",
  458. .dcv = 3,
  459. .battdebounce = 64,
  460. .battalarm = 1000,
  461. .battthresh = 3,
  462. },
  463. { .name = "RUSSIA",
  464. .mini = 0x3,
  465. .battdebounce = 64,
  466. .battalarm = 1000,
  467. .battthresh = 3,
  468. },
  469. { .name = "SAUDIARABIA",
  470. .dcv = 0x3,
  471. .battdebounce = 64,
  472. .battalarm = 1000,
  473. .battthresh = 3,
  474. },
  475. { .name = "SINGAPORE",
  476. .dcv = 0x3,
  477. .battdebounce = 64,
  478. .battalarm = 1000,
  479. .battthresh = 3,
  480. },
  481. { .name = "SLOVAKIA",
  482. .dcv = 0x3,
  483. .acim = 0x3,
  484. .battdebounce = 64,
  485. .battalarm = 1000,
  486. .battthresh = 3,
  487. },
  488. { .name = "SLOVENIA",
  489. .dcv = 0x3,
  490. .acim = 0x2,
  491. .battdebounce = 64,
  492. .battalarm = 1000,
  493. .battthresh = 3,
  494. },
  495. { .name = "SOUTHAFRICA",
  496. .ohs = 1,
  497. .rz = 1,
  498. .dcv = 0x3,
  499. .acim = 0x3,
  500. .battdebounce = 64,
  501. .battalarm = 1000,
  502. .battthresh = 3,
  503. },
  504. { .name = "SOUTHKOREA",
  505. .dcv = 0x3,
  506. .battdebounce = 64,
  507. .battalarm = 1000,
  508. .battthresh = 3,
  509. },
  510. { .name = "SPAIN",
  511. .ohs2 = 1,
  512. .ilim = 1,
  513. .dcv = 0x3,
  514. .acim = 0x2,
  515. .battdebounce = 64,
  516. .battalarm = 1000,
  517. .battthresh = 3,
  518. },
  519. { .name = "SWEDEN",
  520. .ohs2 = 1,
  521. .ilim = 1,
  522. .dcv = 0x3,
  523. .acim = 0x2,
  524. .battdebounce = 64,
  525. .battalarm = 1000,
  526. .battthresh = 3,
  527. },
  528. { .name = "SWITZERLAND",
  529. .ohs2 = 1,
  530. .ilim = 1,
  531. .dcv = 0x3,
  532. .acim = 0x2,
  533. .battdebounce = 64,
  534. .battalarm = 1000,
  535. .battthresh = 3,
  536. },
  537. { .name = "SYRIA",
  538. .mini = 0x3,
  539. .battdebounce = 64,
  540. .battalarm = 1000,
  541. .battthresh = 3,
  542. },
  543. { .name = "TAIWAN",
  544. .mini = 0x3,
  545. .battdebounce = 64,
  546. .battalarm = 1000,
  547. .battthresh = 3,
  548. },
  549. { .name = "THAILAND",
  550. .mini = 0x3,
  551. .battdebounce = 64,
  552. .battalarm = 1000,
  553. .battthresh = 3,
  554. },
  555. { .name = "UAE",
  556. .dcv = 0x3,
  557. .battdebounce = 64,
  558. .battalarm = 1000,
  559. .battthresh = 3,
  560. },
  561. { .name = "UK",
  562. .ohs2 = 1,
  563. .ilim = 1,
  564. .dcv = 0x3,
  565. .acim = 0x5,
  566. .battdebounce = 64,
  567. .battalarm = 1000,
  568. .battthresh = 3,
  569. },
  570. { .name = "USA",
  571. .dcv = 0x3,
  572. .battdebounce = 64,
  573. .battalarm = 1000,
  574. .battthresh = 3,
  575. },
  576. { .name = "YEMEN",
  577. .dcv = 0x3,
  578. .battdebounce = 64,
  579. .battalarm = 1000,
  580. .battthresh = 3,
  581. },
  582. };
  583. #endif /* _FXO_MODES_H */