Advertisement
rdailey

sip.conf working example

Jun 10th, 2011
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. ;
  2. ; SIP Configuration for Asterisk
  3. ;
  4. ; Syntax for specifying a SIP device in extensions.conf is
  5. ; SIP/devicename where devicename is defined in a section below.
  6. ;
  7. ; You may also use
  8. ; SIP/username@domain to call any SIP user on the Internet
  9. ; (Don't forget to enable DNS SRV records if you want to use this)
  10. ;
  11. ; If you define a SIP proxy as a peer below, you may call
  12. ; SIP/proxyhostname/user or SIP/user@proxyhostname
  13. ; where the proxyhostname is defined in a section below
  14. ;
  15. ; Useful CLI commands to check peers/users:
  16. ; sip show peers Show all SIP peers (including friends)
  17. ; sip show users Show all SIP users (including friends)
  18. ; sip show registry Show status of hosts we register with
  19. ;
  20. ; sip debug Show all SIP messages
  21. ;
  22. ; module reload chan_sip.so Reload configuration file
  23. ; Active SIP peers will not be reconfigured
  24. ;
  25. ;------- Naming devices ------------------------------------------------------
  26. ;
  27. ; When naming devices, make sure you understand how Asterisk matches calls
  28. ; that come in.
  29. ; 1. Asterisk checks the SIP From: address username and matches against
  30. ; names of devices with type=user
  31. ; The name is the text between square brackets [name]
  32. ; 2. Asterisk checks the IP address (and port number) that the INVITE
  33. ; was sent from and matches against any devices with type=peer
  34. ;
  35. ; Don't mix extensions with the names of the devices. Devices need a unique
  36. ; name. The device name is *not* used as phone numbers. Phone numbers are
  37. ; anything you declare as an extension in the dialplan (extensions.conf).
  38. ;
  39. ; Note: The parameter "username" is not the username and in most cases is
  40. ; not needed at all. Check below. In later releases, it's renamed
  41. ; to "defaultuser" which is a better name, since it is used in
  42. ; combination with the "defaultip" setting.
  43. ;-----------------------------------------------------------------------------
  44.  
  45. [general]
  46. context=unauthenticated
  47. allowguest=no
  48. allowoverlap=no
  49. bindport=5060
  50. bindaddr=0.0.0.0
  51. srvlookup=yes
  52. tos_sip=cs3 ; Sets TOS for SIP packets.
  53. tos_audio=ef ; Sets TOS for RTP audio packets.
  54. disallow=all
  55. allow=ulaw
  56. allow=g729
  57. dtmfmode=rfc2833
  58. alwaysauthreject=yes
  59. register => 105245:2FsuonGrOuq4r@chicago.voip.ms
  60. externip=200.201.202.203
  61. ;externhost=some.hostname.com
  62. localnet=192.168.192.0/255.255.255.0
  63. localnet=169.254.0.0/255.255.0.0
  64. nat=yes
  65. directmedia=nonat
  66. directmediadeny=0.0.0.0/0 ; Use directmediapermit and directmediadeny to restrict
  67. directmediapermit=192.168.192.0/24 ; which peers should be able to pass directmedia to each other
  68.  
  69.  
  70. [ipkall] ; ITSP - static, no register statement
  71. type=peer
  72. disallow=all
  73. allow=ulaw
  74. ;allow=g729 ; Uncomment if you support G729
  75. context=ipkall-inbound
  76. dtmfmode=rfc2833
  77. host=66.54.140.46
  78.  
  79. [ipkall1](ipkall) ; ITSP - static, no register statement
  80. host=66.54.140.47
  81.  
  82.  
  83. [voipms] ; ITSP - dynamic, register statement used above
  84. type=peer
  85. defaultuser=105245
  86. remotesecret=2FsuonGrOuq4r
  87. trustrpid=yes
  88. sendrpid=yes
  89. host=chicago.voip.ms
  90. ;port=5080 ; alternate port
  91. ;port=42872 ; alternate port
  92. dtmfmode=rfc2833
  93. deny=0.0.0.0/0.0.0.0
  94. permit=64.120.22.242/255.255.255.255
  95. context=voipms-inbound
  96. directmedia=no
  97. disallow=all
  98. allow=ulaw
  99.  
  100.  
  101. [00001234FFFF-a] ; This phone will use extension 123
  102. type=peer
  103. context=phones
  104. callerid=Testing Phone <123>
  105. secret=testing123
  106. host=dynamic
  107. accountcode=123
  108. directmedia=no
  109. qualify=yes
  110. disallow=all
  111. allow=ulaw
  112. mailbox=123@default
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement