feat(dialplan): add [from-trunk] and [from-pstn] inbound contexts for FXO gateways & FreePBX compatibility
This commit is contained in:
1 parent
db233f853c
commit
9518e10616
1 file changed
+19
@@ -1307,6 +1307,25 @@ class ConfigGenerator
|
||||
$lines[] = " same => n,GotoIf(\$[\"\${DID_NUM}\" != \"\"]?from-external,\${DID_NUM},1:from-external,s,1)";
|
||||
$lines[] = "";
|
||||
|
||||
// 2b-bis. Contextes standards FreePBX / Passerelles FXO : [from-trunk] et [from-pstn]
|
||||
$lines[] = "[from-trunk]";
|
||||
$lines[] = "exten => _[+*#0-9a-zA-Z].,1,NoOp(Appel entrant trunk [from-trunk] EXTEN=\${EXTEN} Appelant=\${CALLERID(num)})";
|
||||
$lines[] = " same => n,ExecIf(\$[\"\${CALLERID(num):0:3}\" = \"+33\"]?Set(CALLERID(num)=0\${CALLERID(num):3}))";
|
||||
$lines[] = " same => n,ExecIf(\$[\"\${CALLERID(num):0:4}\" = \"0033\"]?Set(CALLERID(num)=0\${CALLERID(num):4}))";
|
||||
$lines[] = " same => n,GotoIf(\$[\"\${DB(blacklist/\${CALLERID(num)})}\" != \"\"]?app-blacklisted,s,1)";
|
||||
$lines[] = " same => n,ExecIf(\$[\"\${EXTEN:0:3}\" = \"+33\"]?Goto(from-external,0\${EXTEN:3},1))";
|
||||
$lines[] = " same => n,Goto(from-external,\${EXTEN},1)";
|
||||
$lines[] = "exten => s,1,NoOp(Appel entrant trunk [from-trunk] sur s - Appelant=\${CALLERID(num)})";
|
||||
$lines[] = " same => n,ExecIf(\$[\"\${CALLERID(num):0:3}\" = \"+33\"]?Set(CALLERID(num)=0\${CALLERID(num):3}))";
|
||||
$lines[] = " same => n,ExecIf(\$[\"\${CALLERID(num):0:4}\" = \"0033\"]?Set(CALLERID(num)=0\${CALLERID(num):4}))";
|
||||
$lines[] = " same => n,GotoIf(\$[\"\${DB(blacklist/\${CALLERID(num)})}\" != \"\"]?app-blacklisted,s,1)";
|
||||
$lines[] = " same => n,Goto(from-external,s,1)";
|
||||
$lines[] = "";
|
||||
$lines[] = "[from-pstn]";
|
||||
$lines[] = "exten => _[+*#0-9a-zA-Z].,1,Goto(from-trunk,\${EXTEN},1)";
|
||||
$lines[] = "exten => s,1,Goto(from-trunk,s,1)";
|
||||
$lines[] = "";
|
||||
|
||||
// Contexte pour appels rejetés par la liste noire
|
||||
$lines[] = "[app-blacklisted]";
|
||||
$lines[] = "exten => s,1,NoOp(Appelant \${CALLERID(num)} bloque par la liste noire)";
|
||||
|
||||
Reference in new issue
Block a user