Guest User

Untitled

a guest
Feb 20th, 2018
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.61 KB | None | 0 0
  1. ;
  2. ; To disallow requests for domains not serviced by this server:
  3. ; allowexternaldomains=no
  4.  
  5. ;domain=mydomain.tld,mydomain-incoming
  6. ; Add domain and configure incoming context
  7. ; for external calls to this domain
  8. ;domain=1.2.3.4 ; Add IP address as local domain
  9. ; You can have several "domain" settings
  10. ;allowexternaldomains=no ; Disable INVITE and REFER to non-local domains
  11. ; Default is yes
  12. ;autodomain=yes ; Turn this on to have Asterisk add local host
  13. ; name and local IP to domain list.
  14.  
  15. ; fromdomain=mydomain.tld ; When making outbound SIP INVITEs to
  16. ; non-peers, use your primary domain "identity"
  17. ; for From: headers instead of just your IP
  18. ; address. This is to be polite and
  19. ; it may be a mandatory requirement for some
  20. ; destinations which do not have a prior
  21. ; account relationship with your server.
  22.  
  23. ;------------------------------ Advice of Charge CONFIGURATION --------------------------
  24. ; snom_aoc_enabled = yes; ; This options turns on and off support for sending AOC-D and
  25. ; AOC-E to snom endpoints. This option can be used both in the
  26. ; peer and global scope. The default for this option is off.
  27.  
  28.  
  29. ;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
  30. ; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a
  31. ; SIP channel. Defaults to "no". An enabled jitterbuffer will
  32. ; be used only if the sending side can create and the receiving
  33. ; side can not accept jitter. The SIP channel can accept jitter,
  34. ; thus a jitterbuffer on the receive SIP side will be used only
  35. ; if it is forced and enabled.
  36.  
  37. ; jbforce = no ; Forces the use of a jitterbuffer on the receive side of a SIP
  38. ; channel. Defaults to "no".
  39.  
  40. ; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds.
  41.  
  42. ; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
  43. ; resynchronized. Useful to improve the quality of the voice, with
  44. ; big jumps in/broken timestamps, usually sent from exotic devices
  45. ; and programs. Defaults to 1000.
  46.  
  47. ; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a SIP
  48. ; channel. Two implementations are currently available - "fixed"
  49. ; (with size always equals to jbmaxsize) and "adaptive" (with
  50. ; variable size, actually the new jb of IAX2). Defaults to fixed.
  51.  
  52. ; jbtargetextra = 40 ; This option only affects the jb when 'jbimpl = adaptive' is set.
  53. ; The option represents the number of milliseconds by which the new jitter buffer
  54. ; will pad its size. the default is 40, so without modification, the new
  55. ; jitter buffer will set its size to the jitter value plus 40 milliseconds.
  56. ; increasing this value may help if your network normally has low jitter,
  57. ; but occasionally has spikes.
  58.  
  59. ; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
  60. ;-----------------------------------------------------------------------------------
  61.  
  62. [authentication]
  63. ; Global credentials for outbound calls, i.e. when a proxy challenges your
  64. ; Asterisk server for authentication. These credentials override
  65. ; any credentials in peer/register definition if realm is matched.
  66. ;
  67. ; This way, Asterisk can authenticate for outbound calls to other
  68. ; realms. We match realm on the proxy challenge and pick an set of
  69. ; credentials from this list
  70. ; Syntax:
  71. ; auth = <user>:<secret>@<realm>
  72. ; auth = <user>#<md5secret>@<realm>
  73. ; Example:
  74. ;auth=mark:topsecret@digium.com
  75. ;
  76. ; You may also add auth= statements to [peer] definitions
  77. ; Peer auth= override all other authentication settings if we match on realm
  78.  
  79. ;------------------------------------------------------------------------------
  80. ; DEVICE CONFIGURATION
  81. ;
  82. ; The SIP channel has two types of devices, the friend and the peer.
  83. ; * The type=friend is a device type that accepts both incoming and outbound calls,
  84. ; where Asterisk match on the From: username on incoming calls.
  85. ; (A synonym for friend is "user"). This is a type you use for your local
  86. ; SIP phones.
  87. ; * The type=peer also handles both incoming and outbound calls. On inbound calls,
  88. ; Asterisk only matches on IP/port, not on names. This is mostly used for SIP
  89. ; trunks.
  90. ;
  91. ; Use remotesecret for outbound authentication, and secret for authenticating
  92. ; inbound requests. For historical reasons, if no remotesecret is supplied for an
  93. ; outbound registration or call, the secret will be used.
  94. ;
  95. ; For device names, we recommend using only a-z, numerics (0-9) and underscore
  96. ;
  97. ; For local phones, type=friend works most of the time
  98. ;
  99. ; If you have one-way audio, you probably have NAT problems.
  100. ; If Asterisk is on a public IP, and the phone is inside of a NAT device
  101. ; you will need to configure nat option for those phones.
  102. ; Also, turn on qualify=yes to keep the nat session open
  103. ;
  104. ; Configuration options available
  105. ; --------------------
  106. ; context
  107. ; callingpres
  108. ; permit
  109. ; deny
  110. ; secret
  111. ; md5secret
  112. ; remotesecret
  113. ; transport
  114. ; dtmfmode
  115. ; directmedia
  116. ; nat
  117. ; callgroup
  118. ; pickupgroup
  119. ; language
  120. ; allow
  121. ; disallow
  122. ; insecure
  123. ; trustrpid
  124. ; progressinband
  125. ; promiscredir
  126. ; useclientcode
  127. ; accountcode
  128. ; setvar
  129. ; callerid
  130. ; amaflags
  131. ; callcounter
  132. ; busylevel
  133. ; allowoverlap
  134. ; allowsubscribe
  135. ; allowtransfer
  136. ; ignoresdpversion
  137. ; subscribecontext
  138. ; template
  139. ; videosupport
  140. ; maxcallbitrate
  141. ; rfc2833compensate
  142. ; mailbox
  143. ; session-timers
  144. ; session-expires
  145. ; session-minse
  146. ; session-refresher
  147. ; t38pt_usertpsource
  148. ; regexten
  149. ; fromdomain
  150. ; fromuser
  151. ; host
  152. ; port
  153. ; qualify
  154. ; defaultip
  155. ; defaultuser
  156. ; rtptimeout
  157. ; rtpholdtimeout
  158. ; sendrpid
  159. ; outboundproxy
  160. ; rfc2833compensate
  161. ; callbackextension
  162. ; registertrying
  163. ; timert1
  164. ; timerb
  165. ; qualifyfreq
  166. ; t38pt_usertpsource
  167. ; contactpermit ; Limit what a host may register as (a neat trick
  168. ; contactdeny ; is to register at the same IP as a SIP provider,
  169. ; ; then call oneself, and get redirected to that
  170. ; ; same location).
  171. ; directmediapermit
  172. ; directmediadeny
  173. ; unsolicited_mailbox
  174. ; use_q850_reason
  175. ; maxforwards
  176. ; encryption
  177.  
  178. ;[sip_proxy]
  179. ; For incoming calls only. Example: FWD (Free World Dialup)
  180. ; We match on IP address of the proxy for incoming calls
  181. ; since we can not match on username (caller id)
  182. ;type=peer
  183. ;context=from-fwd
  184. ;host=fwd.pulver.com
  185.  
  186. ;[sip_proxy-out]
  187. ;type=peer ; we only want to call out, not be called
  188. ;remotesecret=guessit ; Our password to their service
  189. ;defaultuser=yourusername ; Authentication user for outbound proxies
  190. ;fromuser=yourusername ; Many SIP providers require this!
  191. ;fromdomain=provider.sip.domain
  192. ;host=box.provider.com
  193. ;transport=udp,tcp ; This sets the default transport type to udp for outgoing, and will
  194. ; ; accept both tcp and udp. The default transport type is only used for
  195. ; ; outbound messages until a Registration takes place. During the
  196. ; ; peer Registration the transport type may change to another supported
  197. ; ; type if the peer requests so.
  198.  
  199. ;usereqphone=yes ; This provider requires ";user=phone" on URI
  200. ;callcounter=yes ; Enable call counter
  201. ;busylevel=2 ; Signal busy at 2 or more calls
  202. ;outboundproxy=proxy.provider.domain ; send outbound signaling to this proxy, not directly to the peer
  203. ;port=80 ; The port number we want to connect to on the remote side
  204. ; Also used as "defaultport" in combination with "defaultip" settings
  205.  
  206. ;--- sample definition for a provider
  207. ;[provider1]
  208. ;type=peer
  209. ;host=sip.provider1.com
  210. ;fromuser=4015552299 ; how your provider knows you
  211. ;remotesecret=youwillneverguessit ; The password we use to authenticate to them
  212. ;secret=gissadetdu ; The password they use to contact us
  213. ;callbackextension=123 ; Register with this server and require calls coming back to this extension
  214. ;transport=udp,tcp ; This sets the transport type to udp for outgoing, and will
  215. ; ; accept both tcp and udp. Default is udp. The first transport
  216. ; ; listed will always be used for outgoing connections.
  217. ;unsolicited_mailbox=4015552299 ; If the remote SIP server sends an unsolicited MWI NOTIFY message the new/old
  218. ; ; message count will be stored in the configured virtual mailbox. It can be used
  219. ; ; by any device supporting MWI by specifying <configured value>@SIP_Remote as the
  220. ; ; mailbox.
  221.  
  222. ;
  223. ; Because you might have a large number of similar sections, it is generally
  224. ; convenient to use templates for the common parameters, and add them
  225. ; the the various sections. Examples are below, and we can even leave
  226. ; the templates uncommented as they will not harm:
  227.  
  228. [basic-options](!) ; a template
  229. dtmfmode=rfc2833
  230. context=from-office
  231. type=friend
  232.  
  233. [natted-phone](!,basic-options) ; another template inheriting basic-options
  234. nat=yes
  235. directmedia=no
  236. host=dynamic
  237.  
  238. [public-phone](!,basic-options) ; another template inheriting basic-options
  239. nat=no
  240. directmedia=yes
  241.  
  242. [my-codecs](!) ; a template for my preferred codecs
  243. disallow=all
  244. allow=ilbc
  245. allow=g729
  246. allow=gsm
  247. allow=g723
  248. allow=ulaw
  249.  
  250. [ulaw-phone](!) ; and another one for ulaw-only
  251. disallow=all
  252. allow=ulaw
  253.  
  254. ; and finally instantiate a few phones
  255. ;
  256. ; [2133](natted-phone,my-codecs)
  257. ; secret = peekaboo
  258. ; [2134](natted-phone,ulaw-phone)
  259. ; secret = not_very_secret
  260. ; [2136](public-phone,ulaw-phone)
  261. ; secret = not_very_secret_either
  262. ; ...
  263. ;
  264.  
  265. ; Standard configurations not using templates look like this:
  266. ;
  267. ;[grandstream1]
  268. ;type=friend
  269. ;context=from-sip ; Where to start in the dialplan when this phone calls
  270. ;callerid=John Doe <1234> ; Full caller ID, to override the phones config
  271. ; on incoming calls to Asterisk
  272. ;host=192.168.0.23 ; we have a static but private IP address
  273. ; No registration allowed
  274. ;nat=no ; there is not NAT between phone and Asterisk
  275. ;directmedia=yes ; allow RTP voice traffic to bypass Asterisk
  276. ;dtmfmode=info ; either RFC2833 or INFO for the BudgeTone
  277. ;call-limit=1 ; permit only 1 outgoing call and 1 incoming call at a time
  278. ; from the phone to asterisk (deprecated)
  279. ; 1 for the explicit peer, 1 for the explicit user,
  280. ; remember that a friend equals 1 peer and 1 user in
  281. ; memory
  282. ; There is no combined call counter for a "friend"
  283. ; so there's currently no way in sip.conf to limit
  284. ; to one inbound or outbound call per phone. Use
  285. ; the group counters in the dial plan for that.
  286. ;
  287. ;mailbox=1234@default ; mailbox 1234 in voicemail context "default"
  288. ;disallow=all ; need to disallow=all before we can use allow=
  289. ;allow=ulaw ; Note: In user sections the order of codecs
  290. ; listed with allow= does NOT matter!
  291. ;allow=alaw
  292. ;allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
  293. ;allow=g729 ; Pass-thru only unless g729 license obtained
  294. ;callingpres=allowed_passed_screen ; Set caller ID presentation
  295. ; See README.callingpres for more information
  296.  
  297. ;[xlite1]
  298. ; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)!
  299. ; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed
  300. ;type=friend
  301. ;regexten=1234 ; When they register, create extension 1234
  302. ;callerid="Jane Smith" <5678>
  303. ;host=dynamic ; This device needs to register
  304. ;nat=yes ; X-Lite is behind a NAT router
  305. ;directmedia=no ; Typically set to NO if behind NAT
  306. ;disallow=all
  307. ;allow=gsm ; GSM consumes far less bandwidth than ulaw
  308. ;allow=ulaw
  309. ;allow=alaw
  310. ;mailbox=1234@default,1233@default ; Subscribe to status of multiple mailboxes
  311. ;registertrying=yes ; Send a 100 Trying when the device registers.
  312.  
  313. ;[snom]
  314. ;type=friend ; Friends place calls and receive calls
  315. ;context=from-sip ; Context for incoming calls from this user
  316. ;secret=blah
  317. ;subscribecontext=localextensions ; Only allow SUBSCRIBE for local extensions
  318. ;language=de ; Use German prompts for this user
  319. ;host=dynamic ; This peer register with us
  320. ;dtmfmode=inband ; Choices are inband, rfc2833, or info
  321. ;defaultip=192.168.0.59 ; IP used until peer registers
  322. ;mailbox=1234@context,2345 ; Mailbox(-es) for message waiting indicator
  323. ;subscribemwi=yes ; Only send notifications if this phone
  324. ; subscribes for mailbox notification
  325. ;vmexten=voicemail ; dialplan extension to reach mailbox
  326. ; sets the Message-Account in the MWI notify message
  327. ; defaults to global vmexten which defaults to "asterisk"
  328. ;disallow=all
  329. ;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw!
  330.  
  331.  
  332. ;[polycom]
  333. ;type=friend ; Friends place calls and receive calls
  334. ;context=from-sip ; Context for incoming calls from this user
  335. ;secret=blahpoly
  336. ;host=dynamic ; This peer register with us
  337. ;dtmfmode=rfc2833 ; Choices are inband, rfc2833, or info
  338. ;defaultuser=polly ; Username to use in INVITE until peer registers
  339. ;defaultip=192.168.40.123
  340. ; Normally you do NOT need to set this parameter
  341. ;disallow=all
  342. ;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw!
  343. ;progressinband=no ; Polycom phones don't work properly with "never"
  344.  
  345.  
  346. ;[pingtel]
  347. ;type=friend
  348. ;secret=blah
  349. ;host=dynamic
  350. ;insecure=port ; Allow matching of peer by IP address without
  351. ; matching port number
  352. ;insecure=invite ; Do not require authentication of incoming INVITEs
  353. ;insecure=port,invite ; (both)
  354. ;qualify=1000 ; Consider it down if it's 1 second to reply
  355. ; Helps with NAT session
  356. ; qualify=yes uses default value
  357. ;qualifyfreq=60 ; Qualification: How often to check for the
  358. ; host to be up in seconds
  359. ; Set to low value if you use low timeout for
  360. ; NAT of UDP sessions
  361. ;
  362. ; Call group and Pickup group should be in the range from 0 to 63
  363. ;
  364. ;callgroup=1,3-4 ; We are in caller groups 1,3,4
  365. ;pickupgroup=1,3-5 ; We can do call pick-p for call group 1,3,4,5
  366. ;defaultip=192.168.0.60 ; IP address to use if peer has not registered
  367. ;deny=0.0.0.0/0.0.0.0 ; ACL: Control access to this account based on IP address
  368. ;permit=192.168.0.60/255.255.255.0
  369. ;permit=192.168.0.60/24 ; we can also use CIDR notation for subnet masks
  370. ;permit=2001:db8::/32 ; IPv6 ACLs can be specified if desired. IPv6 ACLs
  371. ; apply only to IPv6 addresses, and IPv4 ACLs apply
  372. ; only to IPv4 addresses.
  373.  
  374. ;[cisco1]
  375. ;type=friend
  376. ;secret=blah
  377. ;qualify=200 ; Qualify peer is no more than 200ms away
  378. ;nat=yes ; This phone may be natted
  379. ; Send SIP and RTP to the IP address that packet is
  380. ; received from instead of trusting SIP headers
  381. ;host=dynamic ; This device registers with us
  382. ;directmedia=no ; Asterisk by default tries to redirect the
  383. ; RTP media stream (audio) to go directly from
  384. ; the caller to the callee. Some devices do not
  385. ; support this (especially if one of them is
  386. ; behind a NAT).
  387. ;defaultip=192.168.0.4 ; IP address to use until registration
  388. ;defaultuser=goran ; Username to use when calling this device before registration
  389. ; Normally you do NOT need to set this parameter
  390. ;setvar=CUSTID=5678 ; Channel variable to be set for all calls from or to this device
  391. ;setvar=ATTENDED_TRANSFER_COMPLETE_SOUND=beep ; This channel variable will
  392. ; cause the given audio file to
  393. ; be played upon completion of
  394. ; an attended transfer.
  395.  
  396. ;[pre14-asterisk]
  397. ;type=friend
  398. ;secret=digium
  399. ;host=dynamic
  400. ;rfc2833compensate=yes ; Compensate for pre-1.4 DTMF transmission from another Asterisk machine.
  401. ; You must have this turned on or DTMF reception will work improperly.
  402. ;t38pt_usertpsource=yes ; Use the source IP address of RTP as the destination IP address for UDPTL packets
  403. ; if the nat option is enabled. If a single RTP packet is received Asterisk will know the
  404. ; external IP address of the remote device. If port forwarding is done at the client side
  405. ; then UDPTL will flow to the remote device.
  406.  
  407.  
  408.  
  409. [voipon]
  410. type=peer
  411. defaultuser=105696_92
  412. secret=fryRitIafhaj9
  413. host=78.129.153.20
  414. context=inbound-calls
  415. ;insecure=port,invite ; only use this if necessary
  416. nat=no
  417. trustrpid=yes
  418. sendrpid=yes
  419. dtmfmode=rfc2833
  420. deny=0.0.0.0/0.0.0.0
  421. permit=78.129.153.20/255.255.255.255
  422. directmedia=no
  423. disallow=all
  424. allow=ulaw
  425.  
  426.  
  427. [bipul]
  428. type=friend
  429. host=dynamic
  430. secret=8109894836asdert
  431. context=phones
  432. callerid=Bipul <123>
  433. host=dynamic
  434. accountcode=123
  435. directmedia=no
  436. ;nat=yes
  437. qualify=no
  438. disallow=all
  439. allow=ulaw
  440. allow=alaw
  441. ;mailbox=123@default
Add Comment
Please, Sign In to add comment