app_template is one approved message body. A template is fixed text with placeholders, so
Your code is {#var#} approves the message rather than one specific code.
The failure is a template that saves cleanly and matches nothing
Content is fail-closed. “Matches nothing” does not mean the template is ignored — it means the customer stops sending, and it looks like nothing is wrong from every angle except theirs. The near-misses behave differently on the two sides, deliberately:The gateway used to refuse a malformed placeholder outright, which sounds safer and was not: the
loader drops a template it cannot compile, so an operator saw an approved template in the panel while
every message it covered was refused. Strict at authoring, forgiving but loud at load is the rule
— the panel’s job is to stop the row being written, the gateway’s job on a row already in the database
is to keep the account sending and say what it did.
The three placeholders, written exactly
Write the token lower case with no spaces inside it. That is its spelling and says nothing about
what it accepts.
{#alp#} takes spaces, apostrophes, hyphens and full stops, so your login, Priya Sharma,
O'Brien, Anne-Marie and St. John all match. Both the ASCII and the typographic apostrophe and
hyphen are accepted, because the typographic ones are what survive a paste out of a PDF. What it still
refuses is digits, and that is the whole reason to choose it over {#var#}.
A typed placeholder is strictly tighter than {#var#} — the same length limit, fewer characters
allowed — so choosing one can only ever narrow what a template accepts.
How much one placeholder may stand for
A variable matches 1 to 30 characters by default.max_variable on the health output is also the answer to “the setting has been changed and nothing
happened” — it reports the ceiling actually in force, so a configuration poll that has not landed yet
is visible rather than guessed at.
Whitespace is compared folded
Any run of spaces, tabs, newlines, CRLF or non-breaking spaces counts as a single space on both sides, and both ends are trimmed. So a template registered with a line break before its signature matches traffic that sends a space there. Folding never joins two words: a template approvingfoo bar still cannot be satisfied by foobar.
This is comparison only. The message sent to the carrier is byte-for-byte what arrived, and the stored
template is byte-for-byte what was pasted — which is what the DLT registration is auditable against.
The panel’s preview shows the folded text, deliberately, so an operator who pasted a body full of
non-breaking spaces sees what will actually be compared.
What the panel refuses to save
One thing is warned rather than refused: a template whose literal text between two placeholders
repeats later in the body. Greedy matching can reject a message a backtracking engine would accept.
Such a template is usually still correct, and this is the matcher’s one invisible failure mode, so the
point is to make it visible rather than to block it.
Templates and multi-segment messages
At the SMPP ingress asubmit_sm carrying a segment header is not content-checked — a segment
carries a fragment of the body, so content cannot be judged yet. A template match is therefore also
not what stamps that PDU.
The panel’s TLV coverage report says, per approved row, which mandatory tags nothing will supply. See
Sender IDs.
Approval, and what an edit costs
Everything a customer submits from the portal landsPENDING. The gateway serves a row only when it
is enabled and APPROVED. From gateway 0.9.8 a customer reading the registration API is told
when a row is approved but switched off — see
Sender IDs, where the same two columns
are explained.
There is no natural key on app_template, so a duplicate body is caught in code rather than by a
constraint: asking again for wording already requested or approved is refused with a message saying
which, rather than becoming a second row nobody can tell apart from the first.
Sender IDs
The other half of the same approval, and the TLV coverage report.
Whitelisting reference
Every property, the three stamping modes, and the per-vendor mandatory check.