Здравствуйте. У меня работает следующая система.
1. Есть asterisk и пара сотен ip телефонов.
2. voip шлюз fxo на 32 порта.
Все работает, но тут возникла необходимость в приеме\отправке факсов. Что я сделал:
Добавил в контекст строки (полный листинг контекста дан ниже)
exten => 222,1, Answer(3)
same => n, SendFax(/tmp/fax.tif)
exten => fax,1,ReceiveFAX(/var/spool/asterisk/tmp/fax-${CDR(uniqueid)}.tif);
exten => fax,n,return;
Все заработало, однако остался открытым вопрос, как сделать так, чтобы либо при приеме и отправке факса у моих номеров играла музыка например и после прием\отправки, звонок возвращался (т.е. человек мог поговорить с удаленной стороной и уточнить вопросы, дошел не дошел факс и насколько хорошо), либо, после приема\отправки факсов каким-то иным образом у людей вновь возвращалось голосовое общение.
Все заранее спасибо.
Листинг контекста, где все обрабатывается.
[office]
include => menu
exten => 1001,1,Goto(menu,s,1)
exten => 1002,1,Dial(SIP/1002)
exten => 1003,1,Dial(SIP/1003)
exten => 1004,1,Goto(menu1,s,1)
exten => 1005,1,Dial(SIP/1005,20)
exten => 1005,2,Dial(SIP/1999/89535021461)
exten => 1006,1,Dial(SIP/1006)
exten => 1007,1,Dial(SIP/1007)
exten => 1008,1,Dial(SIP/1008)
exten => 1009,1,Dial(SIP/1009)
exten => 1010,1,Dial(SIP/1010)
exten => 1011,1,Dial(SIP/1011)
exten => 1012,1,Dial(SIP/1012)
exten => 1013,1,Dial(SIP/1013)
exten => 1014,1,Dial(SIP/1014)
exten => 1015,1,Dial(SIP/1015)
exten => 1016,1,Dial(SIP/1016)
exten => 1017,1,Dial(SIP/1017)
exten => 1018,1,Dial(SIP/1018)
exten => 1019,1,Dial(SIP/1019)
exten => 1020,1,Dial(SIP/1020)
exten => 1021,1,Dial(SIP/1021)
exten => 1022,1,Dial(SIP/1022)
exten => 1023,1,Dial(SIP/1023)
exten => 1024,1,Dial(SIP/1024)
exten => 1025,1,Dial(SIP/1025)
exten => 1026,1,Dial(SIP/1026)
exten => 1027,1,Dial(SIP/1027)
exten => 1028,1,Dial(SIP/1028)
exten => 1029,1,Dial(SIP/1029)
exten => 1030,1,Dial(SIP/1030)
exten => 1031,1,Dial(SIP/1031)
exten => 1032,1,Dial(SIP/1032)
exten => 1033,1,Dial(SIP/1033)
exten => 1034,1,Dial(SIP/1034)
exten => 1035,1,Dial(SIP/1035)
exten => 1036,1,Dial(SIP/1036)
exten => 1037,1,Dial(SIP/1037)
exten => 1038,1,Dial(SIP/1038)
exten => 1039,1,Dial(SIP/1039)
exten => 1040,1,Dial(SIP/1040)
exten => 1041,1,Dial(SIP/1041)
exten => 1042,1,Dial(SIP/1042)
exten => 1043,1,Dial(SIP/1043)
exten => 1044,1,Dial(SIP/1044)
exten => 1045,1,Dial(SIP/1045)
exten => 1046,1,Dial(SIP/1046)
exten => 1047,1,Dial(SIP/1047)
exten => 1048,1,Dial(SIP/1048)
exten => 1049,1,Dial(SIP/1049)
exten => 1050,1,Dial(SIP/1050)
exten => 1051,1,Dial(SIP/1051)
exten => 1052,1,Dial(SIP/1052)
exten => 1053,1,Dial(SIP/1053)
exten => 1054,1,Dial(SIP/1054)
exten => 1055,1,Dial(SIP/1055)
exten => 1056,1,Dial(SIP/1056)
exten => 1057,1,Dial(SIP/1057)
exten => 1058,1,Dial(SIP/1058)
exten => 1059,1,Dial(SIP/1059)
exten => 1060,1,Dial(SIP/1060)
exten => 1061,1,Dial(SIP/1061)
exten => 1062,1,Dial(SIP/1062)
exten => 1063,1,Dial(SIP/1063)
exten => 1064,1,Dial(SIP/1064)
exten => 1065,1,Dial(SIP/1065)
exten => 1066,1,Dial(SIP/1066)
exten => 1067,1,Dial(SIP/1067)
exten => 1068,1,Dial(SIP/1068)
exten => 1069,1,Dial(SIP/1069)
exten => 1070,1,Dial(SIP/1070)
exten => 1071,1,Dial(SIP/1071)
exten => 1072,1,Dial(SIP/1072)
exten => 1073,1,Dial(SIP/1073)
exten => 1074,1,Dial(SIP/1074)
exten => 1075,1,Dial(SIP/1075)
exten => 1076,1,Dial(SIP/1076)
exten => 1077,1,Dial(SIP/1077)
exten => 1078,1,Dial(SIP/1078)
exten => 1079,1,Dial(SIP/1079)
exten => 1080,1,Dial(SIP/1080)
exten => 1081,1,Dial(SIP/1081)
exten => 1082,1,Dial(SIP/1082)
exten => 1083,1,Dial(SIP/1083)
exten => 1084,1,Dial(SIP/1084)
exten => 1085,1,Dial(SIP/1085)
exten => 1086,1,Dial(SIP/1086)
exten => 1087,1,Dial(SIP/1087)
exten => 1088,1,Dial(SIP/1088)
exten => 1089,1,Dial(SIP/1089)
exten => 1090,1,Dial(SIP/1090)
exten => 1091,1,Dial(SIP/1091)
exten => 1092,1,Dial(SIP/1092)
exten => 1093,1,Dial(SIP/1093)
exten => 1094,1,Dial(SIP/1094)
exten => 1095,1,Dial(SIP/1095)
exten => 1096,1,Dial(SIP/1096)
exten => 1097,1,Dial(SIP/1097)
exten => 1098,1,Dial(SIP/1098)
exten => 1099,1,Dial(SIP/1099)
exten => 1100,1,Dial(SIP/1100)
exten => 1101,1,Dial(SIP/1101)
exten => 1102,1,Dial(SIP/1102)
exten => 1103,1,Dial(SIP/1103)
exten => 1104,1,Dial(SIP/1104)
exten => 1105,1,Dial(SIP/1105)
exten => 1106,1,Dial(SIP/1106)
exten => 1107,1,Dial(SIP/1107)
exten => 1108,1,Dial(SIP/1108)
exten => 1109,1,Dial(SIP/1109)
exten => 1110,1,Dial(SIP/1110)
exten => 1111,1,Dial(SIP/1111)
exten => 1112,1,Dial(SIP/1112)
exten => 1113,1,Dial(SIP/1113)
exten => 1114,1,Dial(SIP/1114)
exten => 1115,1,Dial(SIP/1115)
exten => 1116,1,Dial(SIP/1116)
exten => 1117,1,Dial(SIP/1117)
exten => 1118,1,Dial(SIP/1118)
exten => 1119,1,Dial(SIP/1119)
exten => 1120,1,Dial(SIP/1120)
exten => 1121,1,Dial(SIP/1121)
exten => 1122,1,Dial(SIP/1122)
exten => 1123,1,Dial(SIP/1123)
exten => 1124,1,Dial(SIP/1124)
exten => 1125,1,Dial(SIP/1125)
exten => 1126,1,Dial(SIP/1126)
exten => 1127,1,Dial(SIP/1127)
exten => 1128,1,Dial(SIP/1128)
exten => 1129,1,Dial(SIP/1129)
exten => 1130,1,Dial(SIP/1130)
exten => 1131,1,Dial(SIP/1131)
exten => 1132,1,Dial(SIP/1132)
exten => 1133,1,Dial(SIP/1133)
exten => 1134,1,Dial(SIP/1134)
exten => 1135,1,Dial(SIP/1135)
exten => 1136,1,Dial(SIP/1136)
exten => 1137,1,Dial(SIP/1137)
exten => 1138,1,Dial(SIP/1138)
exten => 1139,1,Dial(SIP/1139)
exten => 1140,1,Dial(SIP/1140)
exten => 1141,1,Dial(SIP/1141)
exten => 1142,1,Dial(SIP/1142)
exten => 1143,1,Dial(SIP/1143)
exten => 1144,1,Dial(SIP/1144)
exten => 1145,1,Dial(SIP/1145)
exten => 1146,1,Dial(SIP/1146)
exten => 1147,1,Dial(SIP/1147)
exten => 1148,1,Dial(SIP/1148)
exten => 1149,1,Dial(SIP/1149)
exten => 1150,1,Dial(SIP/1150)
exten => 1151,1,Dial(SIP/1151)
exten => 1152,1,Dial(SIP/1152)
exten => 1153,1,Dial(SIP/1153)
exten => 1154,1,Dial(SIP/1154)
exten => 1155,1,Dial(SIP/1155)
exten => 1156,1,Dial(SIP/1156)
exten => 1157,1,Dial(SIP/1157)
exten => 1158,1,Dial(SIP/1158)
exten => 1159,1,Dial(SIP/1159)
exten => 1160,1,Dial(SIP/1160)
exten => 1161,1,Dial(SIP/1161)
exten => 1162,1,Dial(SIP/1162)
exten => 1163,1,Dial(SIP/1163)
exten => 1164,1,Dial(SIP/1164)
exten => 1165,1,Dial(SIP/1165)
exten => 1166,1,Dial(SIP/1166)
exten => 1167,1,Dial(SIP/1167)
exten => 1168,1,Dial(SIP/1168)
exten => 1169,1,Dial(SIP/1169)
exten => 1170,1,Dial(SIP/1170)
exten => 1171,1,Dial(SIP/1171)
exten => 1172,1,Dial(SIP/1172)
exten => 1173,1,Dial(SIP/1173)
exten => 1174,1,Dial(SIP/1174)
exten => 1175,1,Dial(SIP/1175)
exten => 1176,1,Dial(SIP/1176)
exten => 1177,1,Dial(SIP/1177)
exten => 1178,1,Dial(SIP/1178)
exten => 1179,1,Dial(SIP/1179)
exten => 1180,1,Dial(SIP/1180)
exten => 1181,1,Dial(SIP/1181)
exten => 1182,1,Dial(SIP/1182)
exten => 1183,1,Dial(SIP/1183)
exten => 1184,1,Dial(SIP/1184)
exten => 1185,1,Dial(SIP/1185)
exten => 1186,1,Dial(SIP/1186)
exten => 1187,1,Dial(SIP/1187)
exten => 1188,1,Dial(SIP/1188)
exten => 1189,1,Dial(SIP/1189)
exten => 1190,1,Dial(SIP/1190)
exten => 1191,1,Dial(SIP/1191)
exten => 1192,1,Dial(SIP/1192)
exten => 1193,1,Dial(SIP/1193)
exten => 1194,1,Dial(SIP/1194)
exten => 1195,1,Dial(SIP/1195)
exten => 1196,1,Dial(SIP/1196)
exten => 1197,1,Dial(SIP/1197)
exten => 1198,1,Dial(SIP/1198)
exten => 1199,1,Dial(SIP/1199)
exten => 1200,1,Dial(SIP/1200)
exten => 1201,1,Dial(SIP/1201)
exten => 1202,1,Dial(SIP/1202)
exten => 1203,1,Dial(SIP/1203)
exten => 1204,1,Dial(SIP/1204)
exten => 1205,1,Dial(SIP/1205)
exten => 1206,1,Dial(SIP/1206)
exten => 1207,1,Dial(SIP/1207)
exten => 1208,1,Dial(SIP/1208)
exten => 1209,1,Dial(SIP/1209)
exten => 1210,1,Dial(SIP/1210)
exten => 1211,1,Dial(SIP/1211)
exten => 1212,1,Dial(SIP/1212)
exten => 1213,1,Dial(SIP/1213)
exten => 1214,1,Dial(SIP/1214)
exten => 1215,1,Dial(SIP/1215)
exten => 1216,1,Dial(SIP/1216)
exten => 1217,1,Dial(SIP/1217)
exten => 1218,1,Dial(SIP/1218)
exten => 1219,1,Dial(SIP/1219)
exten => 1220,1,Dial(SIP/1220)
exten => 1221,1,Dial(SIP/1221)
exten => 1222,1,Dial(SIP/1222)
exten => 1223,1,Dial(SIP/1223)
exten => 1224,1,Dial(SIP/1224)
exten => 1225,1,Dial(SIP/1225)
exten => 1226,1,Dial(SIP/1226)
exten => 1227,1,Dial(SIP/1227)
exten => 1228,1,Dial(SIP/1228)
exten => 1229,1,Dial(SIP/1229)
exten => 1230,1,Dial(SIP/1230)
exten => 1231,1,Dial(SIP/1231)
exten => 1232,1,Dial(SIP/1232)
exten => 1233,1,Dial(SIP/1233)
exten => 1234,1,Dial(SIP/1234)
exten => 1235,1,Dial(SIP/1235)
exten => 1236,1,Dial(SIP/1236)
exten => 1237,1,Dial(SIP/1237)
exten => 1238,1,Dial(SIP/1238)
exten => 1239,1,Dial(SIP/1239)
exten => 1240,1,Dial(SIP/1240)
exten => 1241,1,Dial(SIP/1241)
exten => 1242,1,Dial(SIP/1242)
exten => 1243,1,Dial(SIP/1243)
exten => 1244,1,Dial(SIP/1244)
exten => 1245,1,Dial(SIP/1245)
exten => 1246,1,Dial(SIP/1246)
exten => 1247,1,Dial(SIP/1247)
exten => 1248,1,Dial(SIP/1248)
exten => 1249,1,Dial(SIP/1249)
exten => 1250,1,Dial(SIP/1250)
exten => 1251,1,Dial(SIP/1251)
exten => 1252,1,Dial(SIP/1252)
exten => 1253,1,Dial(SIP/1253)
exten => 1254,1,Dial(SIP/1254)
exten => 1255,1,Dial(SIP/1255)
exten => 1256,1,Dial(SIP/1256)
exten => 1257,1,Dial(SIP/1257)
exten => 1258,1,Dial(SIP/1258)
exten => 1259,1,Dial(SIP/1259)
exten => 1260,1,Dial(SIP/1260)
exten => 1261,1,Dial(SIP/1261)
exten => 1262,1,Dial(SIP/1262)
exten => 1263,1,Dial(SIP/1263)
exten => 1264,1,Dial(SIP/1264)
exten => 1265,1,Dial(SIP/1265)
exten => 1266,1,Dial(SIP/1266)
exten => 1267,1,Dial(SIP/1267)
exten => 1268,1,Dial(SIP/1268)
exten => 1269,1,Dial(SIP/1269)
exten => 1270,1,Dial(SIP/1270)
exten => 1271,1,Dial(SIP/1271)
exten => 1272,1,Dial(SIP/1272)
exten => 1273,1,Dial(SIP/1273)
exten => 1274,1,Dial(SIP/1274)
exten => 1275,1,Dial(SIP/1275)
exten => 1276,1,Dial(SIP/1276)
exten => 1277,1,Dial(SIP/1277)
exten => 1278,1,Dial(SIP/1278)
exten => 1279,1,Dial(SIP/1279)
exten => 1280,1,Dial(SIP/1280)
exten => 1281,1,Dial(SIP/1281)
exten => 1282,1,Dial(SIP/1282)
exten => 1283,1,Dial(SIP/1283)
exten => 1284,1,Dial(SIP/1284)
exten => 1285,1,Dial(SIP/1285)
exten => 1286,1,Dial(SIP/1286)
exten => 1287,1,Dial(SIP/1287)
exten => 1288,1,Dial(SIP/1288)
exten => 1289,1,Dial(SIP/1289)
exten => 1290,1,Dial(SIP/1290)
exten => 1291,1,Dial(SIP/1291)
exten => 1292,1,Dial(SIP/1292)
exten => 1293,1,Dial(SIP/1293)
exten => 1294,1,Dial(SIP/1294)
exten => 1295,1,Dial(SIP/1295)
exten => 1296,1,Dial(SIP/1296)
exten => 1297,1,Dial(SIP/1297)
exten => 1298,1,Dial(SIP/1298)
exten => 1299,1,Dial(SIP/1299)
exten => 1300,1,Dial(SIP/1300)
exten => 1301,1,Dial(SIP/1301)
exten => 1302,1,Dial(SIP/1302)
exten => 1303,1,Dial(SIP/1303)
exten => 1304,1,Dial(SIP/1304)
exten => 1305,1,Dial(SIP/1305)
exten => 1306,1,Dial(SIP/1306)
exten => 1307,1,Dial(SIP/1307)
exten => 1308,1,Dial(SIP/1308)
exten => 1309,1,Dial(SIP/1309)
exten => 1310,1,Dial(SIP/1310)
exten => 1311,1,Dial(SIP/1311)
exten => 1312,1,Dial(SIP/1312)
exten => 1313,1,Dial(SIP/1313)
exten => 1314,1,Dial(SIP/1314)
exten => 1315,1,Dial(SIP/1315)
exten => 1316,1,Dial(SIP/1316)
exten => 1317,1,Dial(SIP/1317)
exten => 1318,1,Dial(SIP/1318)
exten => 1319,1,Dial(SIP/1319)
exten => 1320,1,Dial(SIP/1320)
exten => 1321,1,Dial(SIP/1321)
exten => 1322,1,Dial(SIP/1322)
exten => 1323,1,Dial(SIP/1323)
exten => 1324,1,Dial(SIP/1324)
exten => 1325,1,Dial(SIP/1325)
exten => 1326,1,Dial(SIP/1326)
exten => 1327,1,Dial(SIP/1327)
exten => 1328,1,Dial(SIP/1328)
exten => 1329,1,Dial(SIP/1329)
exten => 1330,1,Dial(SIP/1330)
exten => 1331,1,Dial(SIP/1331)
exten => 1332,1,Dial(SIP/1332)
exten => 1333,1,Dial(SIP/1333)
exten => 1334,1,Dial(SIP/1334)
exten => 1335,1,Dial(SIP/1335)
exten => 1336,1,Dial(SIP/1336)
exten => 1337,1,Dial(SIP/1337)
exten => 1338,1,Dial(SIP/1338)
exten => 1339,1,Dial(SIP/1339)
exten => 1340,1,Dial(SIP/1340)
exten => 1341,1,Dial(SIP/1341)
exten => 1342,1,Dial(SIP/1342)
exten => 1343,1,Dial(SIP/1343)
exten => 1344,1,Dial(SIP/1344)
exten => 1345,1,Dial(SIP/1345)
exten => 1346,1,Dial(SIP/1346)
exten => 1347,1,Dial(SIP/1347)
exten => 1348,1,Dial(SIP/1348)
exten => 1349,1,Dial(SIP/1349)
exten => 1350,1,Dial(SIP/1350)
exten => 1351,1,Dial(SIP/1351)
exten => 1352,1,Dial(SIP/1352)
exten => 1353,1,Dial(SIP/1353)
exten => 1354,1,Dial(SIP/1354)
exten => 1355,1,Dial(SIP/1355)
exten => 1356,1,Dial(SIP/1356)
exten => 1357,1,Dial(SIP/1357)
exten => 1358,1,Dial(SIP/1358)
exten => 1359,1,Dial(SIP/1359)
exten => 1360,1,Dial(SIP/1360)
exten => 1361,1,Dial(SIP/1361)
exten => 1362,1,Dial(SIP/1362)
exten => 1363,1,Dial(SIP/1363)
exten => 1364,1,Dial(SIP/1364)
exten => 1365,1,Dial(SIP/1365)
exten => 1366,1,Dial(SIP/1366)
exten => 1367,1,Dial(SIP/1367)
exten => 1368,1,Dial(SIP/1368)
exten => 1369,1,Dial(SIP/1369)
exten => 1370,1,Dial(SIP/1370)
exten => 1371,1,Dial(SIP/1371)
exten => 1372,1,Dial(SIP/1372)
exten => 1373,1,Dial(SIP/1373)
exten => 1374,1,Dial(SIP/1374)
exten => 1375,1,Dial(SIP/1375)
exten => 1376,1,Dial(SIP/1376)
exten => 1377,1,Dial(SIP/1377)
exten => 1378,1,Dial(SIP/1378)
exten => 1379,1,Dial(SIP/1379)
exten => 1380,1,Dial(SIP/1380)
exten => 1381,1,Dial(SIP/1381)
exten => 1382,1,Dial(SIP/1382)
exten => 1383,1,Dial(SIP/1383)
exten => 1384,1,Dial(SIP/1384)
exten => 1385,1,Dial(SIP/1385)
exten => 1386,1,Dial(SIP/1386)
exten => 1387,1,Dial(SIP/1387)
exten => 1388,1,Dial(SIP/1388)
exten => 1389,1,Dial(SIP/1389)
exten => 1390,1,Dial(SIP/1390)
exten => 1391,1,Dial(SIP/1391)
exten => 1392,1,Dial(SIP/1392)
exten => 1393,1,Dial(SIP/1393)
exten => 1394,1,Dial(SIP/1394)
exten => 1395,1,Dial(SIP/1395)
exten => 1396,1,Dial(SIP/1396)
exten => 1397,1,Dial(SIP/1397)
exten => 1398,1,Dial(SIP/1398)
exten => 1399,1,Dial(SIP/1399)
exten => 1400,1,Dial(SIP/1400)
exten => 222,1, Answer(3)
same => n, SendFax(/tmp/fax.tif)
exten => fax,1,ReceiveFAX(/var/spool/asterisk/tmp/fax-${CDR(uniqueid)}.tif);
exten => fax,n,return;
exten => *8,1,PickUP()
exten => 2029,1,Dial(Sip/2029)
exten => _XXXXXX,1,Dial(SIP/2029/${EXTEN})
exten => _XXXXXXX,1,Dial(SIP/2029/${EXTEN})
exten => _XXXXXXXXXXX,1,Dial(Sip/2029/${EXTEN})
exten => _XXXXXXXXXXXX,1,Dial(Sip/2029/${EXTEN})
exten => _XXXXXXXXXXXXX,1,Dial(Sip/2029/${EXTEN})
exten => _XXXXXXXXXXXXXX,1,Dial(Sip/2029/${EXTEN})
exten => _XXXXXXXXXXXXXXX,1,Dial(Sip/2029/${EXTEN})
exten => _XXXXXXXXXXXXXXXX,1,Dial(Sip/2029/${EXTEN})
exten => _XXXXXXXXXXXXXXXXX,1,Dial(Sip/2029/${EXTEN})