<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Would you mind documenting these option
      on the wiki (<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org/wiki/Mod_sms">http://wiki.freeswitch.org/wiki/Mod_sms</a>) so that
      people know about it.<br>
      Thanks<br>
      <br>
      On 11/20/2012 1:43 PM, Eli Burke wrote:<br>
    </div>
    <blockquote
      cite="mid:1388879B-963F-4127-B884-965671CD720D@edge-net.net"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      Kurtis,
      <div><br>
      </div>
      <div>We've been working with FreeSWITCH Consulting to address some
        issues with MESSAGE delivery. A couple of patches were committed
        on Nov 13 and Nov 14 to trunk and they may help with your
        problem. These patches affect the following behavior:</div>
      <div>* MESSAGEs fed through the chatplan are correctly delivered
        or ignored by sofia</div>
      <div>* when blocking=False, "Delivery-Failure" is replaced with
        "Nonblocking-Delivery: true"</div>
      <div>* when blocking=True, "Delivery-Failure" is correctly set to
        true or false</div>
      <div>*&nbsp;when blocking=True,&nbsp;"Delivery-Result-Code" is added to the
        event</div>
      <div><br>
      </div>
      <div>Some background explanation: MESSAGEs are normally delivered
        in non-blocking mode, which means&nbsp;FreeSWITCH&nbsp;makes no attempt to
        determine if they were successfully received. There is a
        variable that can be set ("blocking: true") to
        force&nbsp;FreeSWITCH&nbsp;to wait for a response. You can already see
        this in action using the chat command in fs_cli-- it will report
        success or failure.&nbsp;</div>
      <div><br>
      </div>
      <div>Unfortunately, "blocking" is not set by default. RIght now,
        the only way to get this behavior is to set it manually. For
        example, a chatplan rule to add the header to all inbound
        MESSAGEs:</div>
      <div>
        <div>&nbsp; &nbsp; &lt;extension name="add_blocking" continue="true"&gt;</div>
        <div>&nbsp; &nbsp; &nbsp; &lt;condition&gt;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="set"
          data="is_reg=${sofia_contact(${to_user}" inline="true"/&gt;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="set"
          data="blocking=true"/&gt; &nbsp;&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &lt;/condition&gt;</div>
        <div>&nbsp; &nbsp; &lt;/extension&gt;</div>
      </div>
      <div><br>
      </div>
      <div>There is a potential (and untested!) downside to forcing
        blocking to be always-on. The MESSAGE delivery queue is
        currently handled by a single thread. Even if all MESSAGE
        objects are delivered successfully to the local switch, some
        amount of latency may be introduced. In a real-world
        high-throughput scenario, it's possible that this could cause
        noticeable delays in the time it takes to delivery a MESSAGE,
        creating an ever-growing backlog.</div>
      <div><br>
      </div>
      <div>The "is_reg" variable in the rule above could be used to
        short circuit failed attempts by shunting MESSAGEs to a
        database, or dropping them on the floor, but this would not
        necessarily fix things. The good news is that if a high-volume
        user can demonstrate that there is a problem, it's fixable
        within FreeSWITCH by moving to a multi-threaded message delivery
        queue.</div>
      <div><br>
      </div>
      <div>-Eli</div>
      <div>
        <div><br>
          <div>
            <div><br>
            </div>
            <blockquote type="cite">On Nov 10, 2012, at 1:00 PM, <a
                moz-do-not-send="true" href="javascript:_e({}, 'cvml',
                'freeswitch-users-request@lists.freeswitch.org');"
                target="_blank">freeswitch-users-request@lists.freeswitch.org</a>
              wrote:<br>
              <br>
              <blockquote class="gmail_quote" style="margin: 0px 0px 0px
                0.8ex; border-left-width: 1px; border-left-color:
                rgb(204, 204, 204); border-left-style: solid;
                padding-left: 1ex; position: static; z-index: auto; ">
                <div style="word-wrap:break-word">
                  <div>
                    <span style="color: rgb(127, 127, 127); "><b>From:&nbsp;</b></span>Kurtis
                    Heimerl &lt;<a moz-do-not-send="true"
                      href="javascript:_e({}, 'cvml',
                      'kheimerl@cs.berkeley.edu');" style="color:
                      purple; " target="_blank">kheimerl@cs.berkeley.edu</a>&gt;<br>
                    <span style="color: rgb(127, 127, 127); "><b>Subject:&nbsp;</b></span><b>[Freeswitch-users]
                      Return code from ESL Message Sending</b><br>
                    <span style="color: rgb(127, 127, 127); "><b>Date:&nbsp;</b></span>November
                    9, 2012 11:42:19 PM EST<br>
                    <span style="color: rgb(127, 127, 127); "><b>To:&nbsp;</b></span>FreeSWITCH
                    Users Help &lt;<a moz-do-not-send="true"
                      href="javascript:_e({}, 'cvml',
                      'freeswitch-users@lists.freeswitch.org');"
                      style="color: purple; " target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
                    <span style="color: rgb(127, 127, 127); "><b>Reply-To:&nbsp;</b></span>FreeSWITCH
                    Users Help &lt;<a moz-do-not-send="true"
                      href="javascript:_e({}, 'cvml',
                      'freeswitch-users@lists.freeswitch.org');"
                      style="color: purple; " target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
                    <font color="#007316"><br>
                    </font>
                    <blockquote type="cite">
                    </blockquote>
                    <font color="#007316"><br>
                    </font>
                    <blockquote type="cite">
                    </blockquote>
                    Hello Freeswitch Users:<br>
                    <font color="#007316"><br>
                    </font>We're currently trying to get the return code
                    from a MESSAGE we send using ESL. The closest we've
                    found is this jira:&nbsp;<a moz-do-not-send="true"
                      href="http://jira.freeswitch.org/browse/FS-4453"
                      target="_blank" style="color: purple; ">http://jira.freeswitch.org/browse/FS-4453</a>&nbsp;which
                    seems to provide similar functionality for the chat
                    command, but nothing for ESL.<br>
                    <font color="#007316"><br>
                    </font>Here's a pastebin of our current code:&nbsp;<a
                      moz-do-not-send="true"
                      href="http://pastebin.freeswitch.org/20201"
                      target="_blank" style="color: purple; ">http://pastebin.freeswitch.org/20201</a><br>
                    <font color="#007316"><br>
                    </font>The server we are hitting is returning a "415
                    Unsupported Content Type" (which is correct) and
                    we're trying to discover that in freeswitch, instead
                    of assuming the message was received correctly.
                    Right now, we get that the recvEventTimed is
                    returning None. This is all done on the a pull of FS
                    from yesterday.&nbsp;<br>
                    <font color="#007316"><br>
                    </font>
                    <div
style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Any
                      suggestions?</div>
                  </div>
                  <br>
                </div>
              </blockquote>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>