From Speedy Stork, 7 Years ago, written in FreeSWITCH.
- view diff
Embed
  1. ***OUTBOUND ROUTES***
  2. >>freetdm.10d
  3.     Tag Type    Data    Break   Inline  Group   Order    
  4.     condition   destination_number      ^\+?1?(\d{10})$                 0       5      
  5.     action      set     sip_h_X-accountcode=${accountcode}                      0       10     
  6.     action      set     call_direction=outbound                 0       20     
  7.     action      set     hangup_after_bridge=true                        0       25     
  8.     action      set     effective_caller_id_name=${outbound_caller_id_name}                     0       30     
  9.     action      set     effective_caller_id_number=${outbound_caller_id_number}                 0       35     
  10.     action      set     inherit_codec=true                      0       40     
  11.     action      record_session  /media/recording_vhdx/recordings/pbx.domain.com/outbound/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.wav                    0       41     
  12.     action      set     ignore_display_updates=true                     0       42     
  13.     action      set     callee_id_number=$1                     0       43     
  14.     action      set     continue_on_fail=true                   0       45     
  15.     action      bridge  freetdm/1/a/1$1                 0       70
  16.    
  17. >>freetdm.911
  18.     Tag Type    Data    Break   Inline  Group   Order    
  19.     condition   destination_number      ^(911)$                 0       5      
  20.     action      set     sip_h_X-accountcode=${accountcode}                      0       10     
  21.     action      set     call_direction=outbound                 0       20     
  22.     action      set     hangup_after_bridge=true                        0       25     
  23.     action      set     effective_caller_id_name=${emergency_caller_id_name}                    0       30     
  24.     action      set     effective_caller_id_number=${emergency_caller_id_number}                        0       35     
  25.     action      set     inherit_codec=true                      0       40     
  26.     action      record_session  /media/recording_vhdx/recordings/pbx.domain.com/outbound/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.wav                    0       41     
  27.     action      set     ignore_display_updates=true                     0       42     
  28.     action      set     callee_id_number=$1                     0       43     
  29.     action      set     continue_on_fail=true                   0       45     
  30.     action      bridge  freetdm/1/a/$1                  0       70
  31.  
  32.  
  33. ***INBOUND ROUTES***
  34.  
  35. >>Normal_Open_Hours
  36.     Tag Type    Data    Break   Inline  Group   Order    
  37.     condition   context public                  0       0      
  38.     condition   destination_number      ^.*$                    0       5      
  39.     action      log     SYSADMIN: Now in Normal_Open_Hours dialplan. Prepping to send to 5001 XML.                      0       6      
  40.     action      transfer        5001 XML pbx.domain.com                 0       10
  41.  
  42. >>After_Hours
  43.     Tag Type    Data    Break   Inline  Group   Order    
  44.     condition   context public                  0       0      
  45.     action      answer  answer                  0       5      
  46.     action      transfer        5003 XML                        0       10
  47.    
  48. >>catch_all_numbers
  49.     Tag Type    Data    Break   Inline  Group   Order    
  50.     condition           public                  0       0      
  51.     condition   destination_number      ^.*$                    0       5      
  52.     action      transfer        5501                    0       10
  53.    
  54.  
captcha