Advertisement
Guest User

Asterisk_Intercom_Conf

a guest
Aug 6th, 2014
3,369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.15 KB | None | 0 0
  1. /etc/asterisk/Alsa.conf
  2. [general]
  3. autoanswer=yes ; this option answers the incoming call so I can dial the Intercom and start talking
  4. extension=s
  5. input_device=plughw:1,0 ; USB soundcard
  6. output_device=hw:0,0 ; Onboard soundcard
  7. --------------------------------------------------
  8. /etc/asterisk/extensions.conf
  9. [general]
  10. static=yes
  11. writeprotect=no
  12. clearglobalvars=no
  13.  
  14. [globals]
  15. CONSOLE=Console/dsp
  16.  
  17. IAXINFO=guest
  18. TRUNK=DAHDI/G2
  19. TRUNKMSD=1
  20.  
  21. exten => s,1,Goto(${ARG1},1)
  22.  
  23. [default]
  24.  
  25. exten => 699,1,Answer
  26. exten => 699,2,Dial(console/dsp)
  27. exten => 699,3,Hangup
  28.  
  29. exten => 698,1,Wait(1)
  30. exten => 698,n,Set(__DYNAMIC_FEATURES=toggle)
  31. exten => 698,n,Dial(SIP/Intercom/698,20,tr)
  32. exten => 698,n,Hangup()
  33. -------------------------------------------------------
  34. /etc/asterisk/sip.conf
  35.  
  36.  
  37. [general]
  38. context=default ; Default context for incoming calls
  39. allowoverlap=no ; Disable overlap dialing support. (Default is yes)
  40.  
  41. udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
  42. tcpenable=no ; Enable server for incoming TCP connections (default is no)
  43. tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
  44. transport=udp ; Set the default transports. The order determines the primary default transport.
  45. srvlookup=yes ; Enable DNS SRV lookups on outbound calls
  46. register => 699:XXXXSIPXPASSWORDXXXX@VOIPGATEWAY_IP/699
  47. [authentication]
  48.  
  49. [basic-options](!) ; a template
  50. dtmfmode=rfc2833
  51. context=from-office
  52. type=friend
  53.  
  54. [natted-phone](!,basic-options) ; another template inheriting basic-options
  55. directmedia=no
  56. host=dynamic
  57.  
  58. [public-phone](!,basic-options) ; another template inheriting basic-options
  59. directmedia=yes
  60.  
  61. [my-codecs](!) ; a template for my preferred codecs
  62. disallow=all
  63. allow=ilbc
  64. allow=g729
  65. allow=gsm
  66. allow=g723
  67. allow=ulaw
  68.  
  69. [ulaw-phone](!) ; and another one for ulaw-only
  70. disallow=all
  71. allow=ulaw
  72.  
  73. [Intercom]
  74. context=default
  75. type=peer
  76. defaultuser=699
  77. fromuser=699
  78. fromdomain=VOIP_GATEWAYIP
  79. canreinvite=no
  80. secret=XXXXXSIPXPASSWORDXXXX
  81. insecure=invite
  82. host=VOIP_GATEWAYIP
  83. disallow=all
  84. allow=ulaw
  85. allow=alaw
  86. allow=gsm
  87. qualify=yes
  88. nat=no
  89. -----------------------------------------------------
  90. /etc/asterisk/features.conf
  91. ;
  92. ; Sample Call Features (parking, transfer, etc) configuration
  93. ;
  94.  
  95. [general]
  96. parkext => 700 ; What extension to dial to park. Set per parking lot.
  97. ;parkext_exclusive=yes ; Specify that the parkext created for this parking lot
  98. ; will only access this parking lot. (default is no)
  99. parkpos => 701-720 ; What extensions to park calls on. (defafult parking lot)
  100. ; These need to be numeric, as Asterisk starts from the start position
  101. ; and increments with one for the next parked call.
  102. ; Set per parking lot.
  103. context => parkedcalls ; Which context parked calls are in (default parking lot)
  104. ; Set per parking lot.
  105. ;parkinghints = no ; Add hints priorities automatically for parking slots (default is no).
  106. ; Set per parking lot.
  107. ;parkingtime => 45 ; Number of seconds a call can be parked before returning.
  108. ; Set per parking lot. (default is 45 seconds)
  109.  
  110. ;comebacktoorigin = yes ; Setting this option configures the behavior of call parking when the
  111. ; parked call times out (See the parkingtime option). The default value is 'yes'.
  112. ; Operates on all parking lots.
  113. ;
  114. ; 'yes' - When the parked call times out, attempt to send the call back to the peer
  115. ; that parked this call. This is done by saving off the name of the channel
  116. ; that parked the call.
  117. ;
  118. ; 'no' - This option is useful for performing custom dialplan functionality prior to
  119. ; sending the call back to the extension that initially parked the call, or to
  120. ; an entirely different destination.
  121. ;
  122. ; When the parked call times out, send it back to the dialplan. The location
  123. ; will be the 'parkedcallstimeout' context. The extension will be built from
  124. ; the saved channel name that parked the call. For example, if a SIP peer named
  125. ; '0004F2040001' parked this call, the extension will be 'SIP_0004F2040001'.
  126. ; (Note that an underscore is used here because the '/' character has a special
  127. ; meaning in extension names for CallerID matching.) If this extension does not
  128. ; exist, the call will be sent to the 's' extension, instead. Finally, if the 's'
  129. ; extension of 'parkedcallstimeout' does not exist, the call will fall back to the
  130. ; 's' extension of the 'default' context.
  131. ;
  132. ; Additionally, in this example an extension of 'SIP_0004F2040001' will be
  133. ; created in the 'park-dial' context. This extension will be set up to do a
  134. ; Dial() to 'SIP/0004F2040001'.
  135. ;
  136. ; During the timeout procedure, the following variable is set
  137. ; PARKINGSLOT - extension that the call was parked in prior to timing out
  138.  
  139. ;courtesytone = beep ; Sound file to play to when someone picks up a parked call
  140. ; and also when the Touch Monitor is activated/deactivated.
  141. ; Default is no tone.
  142. ;parkedplay = caller ; Who to play courtesytone to when picking up a parked call.
  143. ; One of: parked, caller, both (default is caller)
  144. ; Operates on all parking lots.
  145. ;parkedcalltransfers = caller ; Enables or disables DTMF based transfers when picking up a parked call.
  146. ; one of: callee, caller, both, no (default is no)
  147. ; Set per parking lot.
  148. ;parkedcallreparking = caller ; Enables or disables DTMF based parking when picking up a parked call.
  149. ; one of: callee, caller, both, no (default is no)
  150. ; Set per parking lot.
  151. ;parkedcallhangup = caller ; Enables or disables DTMF based hangups when picking up a parked call.
  152. ; one of: callee, caller, both, no (default is no)
  153. ; Set per parking lot.
  154. ;parkedcallrecording = caller ; Enables or disables DTMF based one-touch recording when picking up a parked call.
  155. ; one of: callee, caller, both, no (default is no)
  156. ; Set per parking lot.
  157. ;parkeddynamic = yes ; Enables dynamically created parkinglots. (default is no)
  158. ; Operates on all parking lots.
  159. ;adsipark = yes ; if you want ADSI parking announcements
  160. ; Operates on all parking lots.
  161. ;findslot => next ; Continue to the 'next' free parking space.
  162. ; Defaults to 'first' available
  163. ; Set per parking lot.
  164. ;parkedmusicclass=default ; This is the MOH class to use for the parked channel
  165. ; as long as the class is not set on the channel directly
  166. ; using Set(CHANNEL(musicclass)=whatever) in the dialplan
  167. ; Set per parking lot.
  168.  
  169. ;transferdigittimeout => 3 ; Number of seconds to wait between digits when transferring a call
  170. ; (default is 3 seconds)
  171. ;xfersound = beep ; to indicate an attended transfer is complete
  172. ;xferfailsound = beeperr ; to indicate a failed transfer
  173. ;pickupexten = *8 ; Configure the pickup extension. (default is *8)
  174. ;pickupsound = beep ; to indicate a successful pickup (default: no sound)
  175. ;pickupfailsound = beeperr ; to indicate that the pickup failed (default: no sound)
  176. ;featuredigittimeout = 1000 ; Max time (ms) between digits for
  177. ; feature activation (default is 1000 ms)
  178. ;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds.
  179. ;atxferdropcall = no ; If someone does an attended transfer, then hangs up before the transferred
  180. ; caller is connected, then by default, the system will try to call back the
  181. ; person that did the transfer. If this is set to "yes", the callback will
  182. ; not be attempted and the transfer will just fail.
  183. ; For atxferdropcall=no to work properly, you also need to
  184. ; define ATXFER_NULL_TECH in main/features.c. The reason the
  185. ; code is not enabled by default is spelled out in the comment
  186. ; block near the top of main/features.c describing ATXFER_NULL_TECH.
  187. ;atxferloopdelay = 10 ; Number of seconds to sleep between retries (if atxferdropcall = no)
  188. ;atxfercallbackretries = 2 ; Number of times to attempt to send the call back to the transferer.
  189. ; By default, this is 2.
  190.  
  191. ;
  192. ;*** Define another parking lot
  193. ;
  194. ; You can set parkinglot with the CHANNEL dialplan function
  195. ; or by setting 'parkinglot' directly in the channel configuration file.
  196. ;
  197. ; (Note: Leading '0's and any non-numerical characters on parkpos extensions
  198. ; will be ignored. Parkext on the other hand can be any string.)
  199. ;
  200. ;[parkinglot_edvina]
  201. ;context => edvinapark
  202. ;parkext => 799
  203. ;parkpos => 800-850
  204. ;findslot => next
  205.  
  206. ; Note that the DTMF features listed below only work when two channels have answered and are bridged together.
  207. ; They can not be used while the remote party is ringing or in progress. If you require this feature you can use
  208. ; chan_local in combination with Answer to accomplish it.
  209.  
  210.  
  211. [featuremap]
  212. ;blindxfer => #1 ; Blind transfer (default is #) -- Make sure to set the T and/or t option in the Dial() or Queue() app call!
  213. ;disconnect => *0 ; Disconnect (default is *) -- Make sure to set the H and/or h option in the Dial() or Queue() app call!
  214. ;automon => *1 ; One Touch Record a.k.a. Touch Monitor -- Make sure to set the W and/or w option in the Dial() or Queue() app call!
  215. ;atxfer => *2 ; Attended transfer -- Make sure to set the T and/or t option in the Dial() or Queue() app call!
  216. ;parkcall => #72 ; Park call (one step parking) -- Make sure to set the K and/or k option in the Dial() app call!
  217. ;automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor -- Make sure to set the X and/or x option in the Dial() or Queue() app call!
  218.  
  219. [applicationmap]
  220.  
  221. toggle => 5,self/callee,AGI,unlock_door
  222. ;toggle => 5,self/callee,System,sh /root/toggle.sh
  223.  
  224. ; Note that the DYNAMIC_FEATURES channel variable must be set to use the features
  225. ; defined here. The value of DYNAMIC_FEATURES should be the names of the features
  226. ; to allow the channel to use separated by '#'. For example:
  227. ;
  228. ; Set(__DYNAMIC_FEATURES=myfeature1#myfeature2#myfeature3)
  229. ;
  230. ; (Note: The two leading underscores allow these feature settings to be set on
  231. ; on the outbound channels, as well. Otherwise, only the original channel
  232. ; will have access to these features.)
  233. ;
  234. ; The syntax for declaring a dynamic feature is any of the following:
  235. ;
  236. ;<FeatureName> => <DTMF_sequence>,<ActivateOn>[/<ActivatedBy>],<Application>[,<AppArguments>[,MOH_Class]]
  237. ;<FeatureName> => <DTMF_sequence>,<ActivateOn>[/<ActivatedBy>],<Application>[,"<AppArguments>"[,MOH_Class]]
  238. ;<FeatureName> => <DTMF_sequence>,<ActivateOn>[/<ActivatedBy>],<Application>([<AppArguments>])[,MOH_Class]
  239.  
  240. ;
  241. ; FeatureName -> This is the name of the feature used when setting the
  242. ; DYNAMIC_FEATURES variable to enable usage of this feature.
  243. ; DTMF_sequence -> This is the key sequence used to activate this feature.
  244. ; ActivateOn -> This is the channel of the call that the application will be executed
  245. ; on. Valid values are "self" and "peer". "self" means run the
  246. ; application on the same channel that activated the feature. "peer"
  247. ; means run the application on the opposite channel from the one that
  248. ; has activated the feature.
  249. ; ActivatedBy -> This is which channel is allowed to activate this feature. Valid
  250. ; values are "caller", "callee", and "both". "both" is the default.
  251. ; The "caller" is the channel that executed the Dial application, while
  252. ; the "callee" is the channel called by the Dial application.
  253. ; Application -> This is the application to execute.
  254. ; AppArguments -> These are the arguments to be passed into the application. If you need
  255. ; commas in your arguments, you should use either the second or third
  256. ; syntax, above.
  257. ; MOH_Class -> This is the music on hold class to play while the idle
  258. ; channel waits for the feature to complete. If left blank,
  259. ; no music will be played.
  260. ;
  261.  
  262. ;
  263. ; IMPORTANT NOTE: The applicationmap is not intended to be used for all Asterisk
  264. ; applications. When applications are used in extensions.conf, they are executed
  265. ; by the PBX core. In this case, these applications are executed outside of the
  266. ; PBX core, so it does *not* make sense to use any application which has any
  267. ; concept of dialplan flow. Examples of this would be things like Macro, Goto,
  268. ; Background, WaitExten, and many more.
  269. ;
  270. ; Enabling these features means that the PBX needs to stay in the media flow and
  271. ; media will not be re-directed if DTMF is sent in the media stream.
  272. ;
  273. ; Example Usage:
  274. ;
  275. ;testfeature => #9,peer,Playback,tt-monkeys ;Allow both the caller and callee to play
  276. ; ;tt-monkeys to the opposite channel
  277. ;
  278. ; Set arbitrary channel variables, based upon CALLERID number (Note that the application
  279. ; argument contains commas)
  280. ;retrieveinfo => #8,peer,Set(ARRAY(CDR(mark),CDR(name))=${ODBC_FOO(${CALLERID(num)})})
  281. ;
  282. ;pauseMonitor => #1,self/callee,Pausemonitor ;Allow the callee to pause monitoring
  283. ; ;on their channel
  284. ;unpauseMonitor => #3,self/callee,UnPauseMonitor ;Allow the callee to unpause monitoring
  285. ; ;on their channel
  286.  
  287. ; Dynamic Feature Groups:
  288. ; Dynamic feature groups are groupings of features defined in [applicationmap]
  289. ; that can have their own custom key mappings. To give a channel access to a dynamic
  290. ; feature group, add the group name to the value of the DYNAMIC_FEATURES variable.
  291. ;
  292. ; example:
  293. ; [myGroupName] ; defines the group named myGroupName
  294. ; testfeature => #9 ; associates testfeature with the group and the keycode '#9'.
  295. ; pauseMonitor => ; associates pauseMonitor with the group and uses the keycode specified
  296. ; ; in the [applicationmap].
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement