• We do not provide troubleshooting help for unsupported phones. Please try with a supported phone.
  • V20 Update 10 Alpha 2 Learn more

Solved How Does 3CX Parse Dial Plans in XML?

Status
Not open for further replies.

jmdomini

Free User
Joined
Dec 31, 2021
Messages
4
Reaction score
2
Trying to modify the default dial plan for a Grandstream phone, although I don't think the model matters and I believe I would run into this issue regardless of the phone model. The XML looks something like below. 3CX doesn't seem to recognize that everything between <P12345> and </P12345> is part of the dial plan and throws a syntax error for everything on that line and anything else that follows. How do I get it to recognize the value as a single string? I've tried double quotes, single quotes, curly braces. Regardless I end up with a syntax error.

I can manually paste the dial plan into the phone, but of course as soon as a reprovision happens it gets wiped out. What am I missing?

<P12345>{911|[3469]11|*xx.|<=1>[2-9]xxxxxxxxx|1[2-9]xxxxxxxxx|<=1779>[2-9]xxxxxx|011xxxxxxxxxxxx.|011[2-9]x.| 4xxx | ***xx}</P12345>
 
Answering my own question for anyone else that might run into this. I discovered that Grandstream had a text to XML generator for some of their templates. So I plugged in my dial plan to one of their sample templates and ran the converter. It spit out the following {911|[3469]11|*xx.|&lt;=1&gt;[2-9]xxxxxxxxx|1[2-9]xxxxxxxxx|&lt;=1779&gt;[2-9]xxxxxx|011xxxxxxxxxxxx.|011[2-9]x.| 4xxx | ***xx} . In short it's the > and < symbols that break things which need to be replaced by &gt or &lt.
 
  • Like
Reactions: NickD_3CX
Status
Not open for further replies.

Forum statistics

Threads
112,147
Messages
590,959
Members
165,167
Latest member
Finatra.us