http.conf
[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8080
prefix=asterisk
phoneprov.conf
......
[grandstream]
mime_type => text/xml
cfg${TOLOWER(${MAC})}.xml => grandstream.xml
......
Example grandstream.xml
<?xml version="1.0" encoding="UTF-8" ?><gs_provision version="1"><config version="1"><P47>${SERVER}:${SERVER_PORT}</P47><P102>2</P102><P122>1</P122><P132>1</P132><P191>0</P191><P1377>RSXX0091</P1377><P1378>60</P1378><P1379>c</P1379><P1405>0</P1405><P188>1</P188><P192>firmware.grandstream.com</P192><P194>3</P194><P2313>15</P2313><P270>${USERNAME}</P270><P291>1</P291><P298>1</P298><P30>ru.pool.ntp.org</P30><P35>${USERNAME}</P35><P36>${USERNAME}</P36><P3>${DISPLAY_NAME}</P3><P64>TZR-4</P64><P72>0</P72><P34>${SECRET}</P34><P237>${SERVER}:8080/asterisk/phoneprov</P237><P1362>ru</P1362><P2301>0</P2301><P2302>0</P2302><P2303>1</P2303><P1349>0</P1349><P87>0</P87><P290>{ [x*#]+ }</P290></config></gs_provision>
users.conf
.....
[55]
macaddress = {phone mac address}
autoprov = yes
secret = {password}
fullname = New User
profile = grandstream
.....
For reboot phone from asterisk cli with command "sip notify gsreboot 55"
sip_notify.conf
.....
[gsreboot]
Event=>check-sync
.....