question

Pyrogre avatar image
Pyrogre asked

TeXML Conditional Statements Not Being Evaluated

The TeXML code block below (SIP addresses and phone numbers altered for privacy) will not evaluate the if/else statements and the application just sequentially dials the sip addresses/numbers. I have confirmed in debugging that my From field is as expected. Please let me know if the TeXML is incorrect or if I am misunderstanding something about the use of conditional statements. Thanks

Note: The code sample markdown is destroying the mustache templates in the TeXML, let me know if there's a better way to post the TeXML.

 <?xml version="1.0" encoding="UTF-8"?>
 <Response>
 {
                 {#if From == +12345678900}}
     <Dial>
         <Sip>
             sip:8675309@xyz.sip.telnyx.com
         </Sip>
     </Dial>
 {
                 {#elseif From == +12345678901}}
     <Dial>
         <Sip>
             sip:8675309@xyz.sip.telnyx.com
         </Sip>
     </Dial>
 {
                 {#else}}
     <Dial>
         <Number>
             +12345678902
         </Number>
     </Dial>
 {
                 {#/if}}
 </Response>
texml
10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Manage Your Content