Showing posts with label VOIP. Show all posts
Showing posts with label VOIP. Show all posts

Thursday, January 2, 2014

DHCP options for SIP server and SIP port

In a recent deployment of a VOIP system (NEC sv8100) I wanted to setup DHCP to hand out the SIP options.

This is pretty simple although some of the references I looked at made it look confusing.
For the system I was working on only two options are necessary, SIP Server IP address and SIP server port (if different than the default).

  1. Open up DHCP, right click IPv4 and choose "Set Predefined Options"
  2. Note that "option name" for 120 doesn't exist (unless added previously).  Click "Add"
  3. Put in a name of SIP Server IP Address, Data type should be binary, code equals 120, and a description as you see fit.
  4. Click OK
  5. Go to your server options (or scope options depending on what you want). 
  6. Click "Configure options"
  7. Check mark option 043 Vendor Specific Info
    1. This option specifies the port to use
    2. enter the HEX value under the binary section with A8 02 appended to the front. For instance for port 5080 it would look like A8 02 13 D8
      1. A8 = 168 sub option
      2. 02 = required first byte
      3. 13 D8 = 5080 in HEX
      4. if you wanted port 5060 it would be A8 02  13 C4
  8. Check mark option 120 SIP Server IP Address
    1. Here you enter the SIP server IP address in HEX format with a 01 appended to the front.
    2. Then the ip, so 192.168.1.2 would be C0 A8 01 02.
    3. Put the 01 in front and get 01 C0 A8 01 02
    4. 01 = indicates that it's the first sip server
    5. C0 = 192
    6. A8 = 168
    7. 01 = 1
    8. 02 = 2
    9. Put the hex value in the binary section.  (note, the ASCII will look like nonsense)
Your all set.  Bounce your phone so it gets DHCP from your server and ensure it finds the SIP server.  If you get an error "SIP Server not found" then you either have the IP address incorrect or the SIP Server port incorrect. 

Note: troubleshooting DHCP is very easy with wireshark, just filter for the Bootp.  This way you can see what options it's handing out.  There is also a handy tool out there called DHCPtest
http://blog.thecybershadow.net/2013/01/10/dhcp-test-client/