SOLVED Provisioning GXP2160

Provisioning for yealink and other phones are working fine but I am having trouble getting my grandstream phones to provision and I wanted to know if others were successful. I see the nginx rewrite rules appear to be correct:
Code:
rewrite "^.*/provision/cfg([A-Fa-f0-9]{12})(\.(xml|cfg))?$" /app/provision/?mac=$1;
rewrite "^.*/provision/pb/([A-Fa-f0-9]{12})/phonebook\.xml$" /app/provision/?mac=$1&file=phonebook.xml;
#grandstream-wave softphone by ext because Android doesn't pass MAC.
rewrite "^.*/provision/([0-9]{5})/cfg([A-Fa-f0-9]{12}).xml$" /app/provision/?ext=$1;
But the phones are looking for /app/provision/cfggxp2160.xml and /app/provision/cfg.xml files which are not present:
Code:
"GET /app/provision/cfg000b82da6f5d.xml HTTP/1.1" 401 23 "-" "Grandstream Model HW GXP2160 SW 1.0.9.69 DevId 000b82da6f5d"
"GET /app/provision/cfg000b82da6f5d.xml HTTP/1.1" 200 185684 "-" "Grandstream Model HW GXP2160 SW 1.0.9.69 DevId 000b82da6f5d"
"GET /app/provision/cfg000b82da6f5d HTTP/1.1" 401 23 "-" "Grandstream Model HW GXP2160 SW 1.0.9.69 DevId 000b82da6f5d"
"GET /app/provision/cfg000b82da6f5d HTTP/1.1" 200 185684 "-" "Grandstream Model HW GXP2160 SW 1.0.9.69 DevId 000b82da6f5d"
"GET /app/provision/cfggxp2160.xml HTTP/1.1" 404 168 "-" "Grandstream Model HW GXP2160 SW 1.0.9.69 DevId 000b82da6f5d"
"GET /app/provision/cfg.xml HTTP/1.1" 404 168 "-" "Grandstream Model HW GXP2160 SW 1.0.9.69 DevId 000b82da6f5d"
 
There are two issues that resolved this. One is the provisioning template is not generating the correct setting for temp (P1379) and the quick fix for this is to simply set the value as auto (<P1379>auto</P1379>). The other issue is that the grandstream_dial_plan (in the default settings) has an unprintable character that causes invalid xml to be generated. Edit this value with whatever you need or use the default string of:
Code:
{x+|*x+|*++|\p\a\k\+*x+|\l\o\w\+*x+}