Voicemail email body semicolons

When I changed to @joshpatten’s excellent script FreePBX Voicemail Transcription - UPDATED to use Google Cloud I decided I didn’t like his example with tables so I rewrote it to use bold styled spans saved it and hit apply config since the tab changed I didn’t pay attention to flip back and look at the email body box then we got an email last night that was a little short and very broken.

What I had set

<html>
<body>
	<p>${VM_NAME},
		<br><br>
		There is a new voicemail in mailbox ${VM_MAILBOX}:
	</p>
	<p>
		<span style="font-weight: bold;">From:</span> ${VM_CIDNAME} <a href="tel://${VM_CIDNUM}">${VM_CIDNUM}</a>
		<br><br>
		<span style="font-weight: bold;">Length:</span> ${VM_DUR} seconds
		<br><br>
		<span style="font-weight: bold;">Date:</span> ${VM_DATE}
		<br><br>
		<span style="font-weight: bold;">Transcription:</span><br>
		{{{{TRANSCRIPTION}}}}
	</p>
</body>
</html>

What I got:

<html>
<body>
	<p>${VM_NAME},
		<br><br>
		There is a new voicemail in mailbox ${VM_MAILBOX}:
	</p>
	<p>
		<span style="font-weight: bold

after testing it without the semicolons after bold this morning it worked just fine and saved the whole thing I’m assuming this is a bug but am just wondering if this is intentional and / or happening to anyone else before filing a bug report.

1 Like

The VM body is written to the file /etc/asterisk/voicemail.conf, and as the semi-colon character is reserved for comments in Asterisk conf files, that probably explains what you’re seeing. You can try escaping the ; with a \ character, i.e. wherever a semicolon appears, use the chars \; and retest.

That did it of course when I came back to it they were no longer commented potentially leading to problems down the line. In my case I will just leave them off since I only have one style to apply.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.