Plug & Play Mechanism

  • Updated on January 3, 2022

This is a technical guide targeted to PBX developers that want to learn the different mechanisms that GXP21xx/17xx/16xx support to get provisioned with other systems.

Currently, GXP21xx/17xx/16xx phones can use Option 66, auto-provision with TFTP, HTTP and HTTPS, Web interface, and now with a device auto-recognition option that Grandstream called Plug and Play.

The purpose of his option is to make an easy installation of the GXP device, by zero-configuration with just having the user connect the phone to a LAN via a hub/switch/router. Once the phone is connected to the LAN, a PBX should be able to detect it and display the phone information in its console or web interface. The PBX user should be able to select the new phone detected and assign the basic configuration a phone needs to at least make a sip registration against the PBX. As well as been able to place and receive phone calls, for example, Sip User ID or extension number, sip password, and Caller name. Other configurations can be provisioned to the phone like; prefer audio codecs, Speed Dial keys or BLF (Busy Lamp Field), and most important indicating the server path of configuration and firmware server.

The plug and Play option needs to be supported in both the IP phone and the PBX. Here you will find the technical details of how the phone engages in this mechanism. PBX developers need to adapt their system to interact with Grandstream IP Phones.

HOW PLUG AND PLAY WORKS

First, make sure the following guidelines are met:

  1. GXP21xx/17xx/16xx should be reset to factory default or out of the box.
  2. GXP21xx/17xx/16xx and PBX (support Plug and Play) are in the same local area network.

Step 1: Sending SUBSCRIBE

When the phone boots up, it will start sending a sip SUBSCRIBE message to a multicast IP address 224.0.1.75. The phone will send SUBSCRIBE for 5 times and stop IF no response from the server or when receiving 200 or 500. It will ignore errors like 30x and 4xx. Below is how the SUBSCRIBE message looks like:

Request-Line: SUBSCRIBE sip:MAC%3A000B82835988@224.0.1.75 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.2:5080;branch=z9hG4bK1517285072;rport
From: <sip:MAC%3A000B82835988@224.0.1.75>;tag=1039309988
To: <sip:MAC%3A000B82835988@224.0.1.75>
Call-ID: 1456862987-5080-1@BJC.BGI.C.C
[Generated Call-ID: 1456862987-5080-1@BJC.BGI.C.C]
CSeq: 20000 SUBSCRIBE
Contact: <sip:192.168.2.2:5080>
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GXP2140 1.0.11.35
Expires: 0
Supported: replaces, path, timer
Event: ua-profile;profile-type="device";vendor="Grandstream";model="GXP2140";version="1.0.11.35"
Accept: application/url
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

Description of the SUBSCRIBE Message

  • Request URI user part: Contains device MAC address with following format: MAC%3A000B82273B89

  • Contact: IP address and port of the phone
  • User-Agent: Contains Vendor, Model and firmware version.
  • Event: Contains information about the phone like
    ua-profile, profile-type, vendor, model, and version

Step 2: Creating Configuration File in PBX

Per detection of the SUBSCRIBE message, the PBX should display the phone in its device manager tool. The administrator should be able to see the vendor’s name, model, firmware version, and MAC address then he can right-click on the device and assign the corresponding account information. Once the configuration is saved from the device manager tool, the PBX should create the configuration file and send it to the provisioning server location.

Note

Grandstream configuration file can be generated in two different ways. A) By utilizing a Grandstream encoder tool (Java API is available) or B) Creating an XML text file. For more information on how to accomplish these methods, please visit https://www.grandstream.com/support/tools.

Step 3: Sending SIP NOTIFY to the Phone

After PBX generates the configuration file, it will then need to notify the phone where to find it. This is done by sending a sip NOTIFY with the URL indicating where to download the configuration file. Below is how the NOTIFY looks like:

Request-Line: NOTIFY sip:192.168.5.199:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.1:6061;branch=z9hG4bK1258188513
From: <sip:192.168.2.1:6061>;tag=b58ca
To: <sip:192.168.5.199:5060>
Call-ID: 000b58ca@192.168.2.1
[Generated Call-ID: 000b58ca@192.168.2.1]
CSeq: 1 NOTIFY
Contact: <sip:192.168.2.1:6061>
Content-Type: application/x-gs-ucm-url
Max-Forwards: 70
Subscription-State: terminated
Event: ua-profile
User-Agent: Grandstream UCM6510V1.6A 1.0.20.38
Content-Length:    32
Message Body: http://192.168.5.151:8089/zccgi/
Note:

The last line (Message Body) contains the URL that the phone will use to download the configuration file. The phone will reply 200 ok If this header is included otherwise it will reply 4XX or 5XX

Step 5: Getting Provisioned

The phone will immediately open a TCP connection to the URL indicated in the NOTIFY, begins downloading the configuration file, and flash it.

The phone will reboot to take effect new configuration and a second attempt to download a configuration file will occur. This time the phone will do a checksum and If the file is the same as the previous one downloaded then it will discard flashing in memory again.

The phone is ready to use with the new configuration.

REMARKS

All GXP21xx/17xx/16xx will engage the Plug and Play option at boot up, if no NOTIFY is received then the phone will continue with the normal provisioning mechanism, meaning checking for an OPTION 66 message, If nothing is received then go to the indicated URL in the phone’s configuration.

The Plug and Play option was developed and verified operation originally with 3CX phone systems. Our technical support staff is trained and ready to answer all of your questions. Contact a technical support member or submit a trouble ticket online to receive in-depth support.

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment

We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept