Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.38 KB | None | 0 0
  1. /*
  2.  * Inbound calls from bootc@bootc.net
  3.  */
  4. context user-bootc {
  5.  
  6.     includes {
  7.         out-pstn;
  8.     };
  9.  
  10.     // speed-dial
  11.     mob     => goto out-pstn|07818605535|1;
  12.     home    => goto out-pstn|01271830058|1;
  13.  
  14.     // withold number
  15.     _141X. => {
  16.         // Sanity checking
  17.         if ("${EXTEN}" =~ "[&,/|@]") {
  18.             Playback(invalid, noanswer);
  19.             Wait(0.5);
  20.             Congestion();
  21.         }
  22.  
  23.         CALLERPRES() = "prohib";
  24.         goto out-pstn|${EXTEN:3}|1;
  25.     };
  26.  
  27.     // txrx test numbers
  28.     _12X => {
  29.         Dial(SIP/txrx/${EXTEN});
  30.         Hangup(${HANGUPCAUSE});
  31.     };
  32.  
  33. };
  34.  
  35. /*
  36.  * Main entry point to dial out to PSTN
  37.  */
  38. context out-pstn {
  39.  
  40.     includes {
  41.         // Ofcomverter's exceptions list
  42.         pstn-ofcomverter;
  43.     };
  44.  
  45.     // 10-digit national numbers
  46.     _0[1-3]XXXXXXXXX => goto pstn-dial|${EXTEN}|1;
  47.  
  48.     // 10-digit corporate numbers
  49.     _05XXXXXXXXX => goto pstn-dial|${EXTEN}|1;
  50.  
  51.     // 10-digit mobile + personal numbers
  52.     _07XXXXXXXXX => goto pstn-dial|${EXTEN}|1;
  53.  
  54.     // 10-digit special services (non-premium)
  55.     _08XXXXXXXXX => goto pstn-dial|${EXTEN}|1;
  56.  
  57.     // 10-digit special services (premium)
  58.     _09XXXXXXXXX => goto pstn-dial|${EXTEN}|1;
  59.  
  60.     // 6-digit local numbers
  61.     _[2-8][0-9]XXXX => goto pstn-dial|01271${EXTEN}|1;
  62.     _[9][0-8]XXXX => goto pstn-dial|01271${EXTEN}|1;
  63.  
  64. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement