<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    t_on_failure("1") works fine, I just gave it a try.<br>
    <br>
    Check the curly braces to be sure the route block doesn't end before
    th t_on_failure.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 05/03/14 20:49, Peter Villeneuve
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAEiJqQN4X2fDMrUE6ebT9945668LrvRsD4AkNaPFNV+19kwQbA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Sorry to bug you, but I never got any feedback on
        this, and I can't get msilo working.
        <div><br>
          <div>Any hints/thoughts?</div>
          <div><br>
          </div>
          <div>Cheers</div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">
          On Tue, Feb 18, 2014 at 1:02 PM, Peter Villeneuve <span
            dir="ltr"><<a moz-do-not-send="true"
              href="mailto:petervnv1@gmail.com" target="_blank">petervnv1@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>
                <div>Hi Daniel,<br>
                  <br>
                </div>
                Any thoughts on why t_on_failure("1") gives me the
                syntax error?<br>
                <br>
              </div>
              Thanks<br>
            </div>
            <div class="HOEnZb">
              <div class="h5">
                <div class="gmail_extra"><br>
                  <br>
                  <div class="gmail_quote">On Mon, Feb 17, 2014 at 4:31
                    PM, Peter Villeneuve <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:petervnv1@gmail.com"
                        target="_blank">petervnv1@gmail.com</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div dir="ltr">
                        <div>
                          <div>
                            <div>Hi Daniel,<br>
                              <br>
                            </div>
                            Thanks for replying.<br>
                            <br>
                          </div>
                          This is how I added msilo to the kamailio
                          default config. It still doesn't work for me
                          (ie. offline messages are not delivered - but
                          that's likely me messing up the routing), but
                          at least Kamailio starts ok.<br>
                        </div>
                        Further below I have pasted the config with the
                        t_on_failure("1")  which gives me the error
                        message.<br>
                        <div><br>
                              $avp(oexten) = $rU;<br>
                              if (!lookup("location")) {<br>
                                  $var(rc) = $rc;<br>
                                  route(TOVOICEMAIL);<br>
                                  t_newtran();<br>
                                  switch ($var(rc)) {<br>
                                      case -1:<br>
                                      case -3:<br>
                                          send_reply("404", "Not
                          found");<br>
                                          exit;<br>
                                      case -2:<br>
                                          send_reply("405", "Method Not
                          Allowed");<br>
                                          exit;<br>
                                  }<br>
                              }<br>
                          <br>
                              # when routing via usrloc, log the missed
                          calls also<br>
                              if (is_method("INVITE"))<br>
                              {<br>
                                  setflag(FLT_ACCMISSED);<br>
                              }<br>
                          <br>
                              route(RELAY);<br>
                              exit;<br>
                          <br>
                                      # we do not care about anything
                          else but MESSAGEs<br>
                                      if (!method=="MESSAGE")<br>
                                      {<br>
                                          if (!t_reply("404", "Not
                          found")) <br>
                                          {<br>
                                              sl_reply_error();<br>
                                          };<br>
                                          exit;<br>
                                      };<br>
                                      log("MESSAGE received ->
                          storing using MSILO\n");<br>
                                      # MSILO - storing as offline
                          message<br>
                                      if (m_store("$ru"))<br>
                                      {<br>
                                          log("MSILO: offline message
                          stored\n");<br>
                                          if (!t_reply("202",
                          "Accepted")) <br>
                                          {<br>
                                              sl_reply_error();<br>
                                          };<br>
                                      }else{<br>
                                          log("MSILO: offline message
                          NOT stored\n");<br>
                                          if (!t_reply("503", "Service
                          Unavailable")) <br>
                                          {<br>
                                              sl_reply_error();<br>
                                          };<br>
                                      };<br>
                                      exit;<br>
                                  };<br>
                          <br>
                          <br>
                        </div>
                        <div>By the way, I get the 404 Not found reply
                          (result of case -3) when the user isn't
                          registered. Shouldn't an offline user return
                          case -1 instead?<br>
                          <br>
                          <br>
                        </div>
                        <div>And here's the config that prevents
                          kamailio from starting up.<br>
                          I get the following error message:  (line 754,
                          column 21 corresponds to t_on_failure("1"))<br>
                          <br>
                          0(4603) : <core> [cfg.y:3411]:
                          yyerror_at(): parse error in config file
                          /etc/kamailio/kamailio.cfg, line 754, column
                          21: syntax error<br>
                           0(4603) : <core> [cfg.y:3411]:
                          yyerror_at(): parse error in config file
                          /etc/kamailio/kamailio.cfg, line 754, column
                          21: <br>
                          ERROR: bad config file (2 errors)<br>
                          <br>
                          <br>
                              $avp(oexten) = $rU;<br>
                              if (!lookup("location")) {<br>
                                  $var(rc) = $rc;<br>
                                  route(TOVOICEMAIL);<br>
                                  t_newtran();<br>
                                  switch ($var(rc)) {<br>
                                      case -1:<br>
                                      case -3:<br>
                                          send_reply("404", "Not
                          found");<br>
                                          exit;<br>
                                      case -2:<br>
                                          send_reply("405", "Method Not
                          Allowed");<br>
                                          exit;<br>
                                  }<br>
                              }<br>
                          <br>
                              # when routing via usrloc, log the missed
                          calls also<br>
                              if (is_method("INVITE"))<br>
                              {<br>
                                  setflag(FLT_ACCMISSED);<br>
                              }<br>
                          <br>
                              route(RELAY);<br>
                              exit;<br>
                          <br>
                                      # we do not care about anything
                          else but MESSAGEs<br>
                                      if (!method=="MESSAGE")<br>
                                      {<br>
                                          if (!t_reply("404", "Not
                          found")) <br>
                                          {<br>
                                              sl_reply_error();<br>
                                          };<br>
                                          exit;<br>
                                      };<br>
                                      log("MESSAGE received ->
                          storing using MSILO\n");<br>
                                      # MSILO - storing as offline
                          message<br>
                                      if (m_store("$ru"))<br>
                                      {<br>
                                          log("MSILO: offline message
                          stored\n");<br>
                                          if (!t_reply("202",
                          "Accepted")) <br>
                                          {<br>
                                              sl_reply_error();<br>
                                          };<br>
                                      }else{<br>
                                          log("MSILO: offline message
                          NOT stored\n");<br>
                                          if (!t_reply("503", "Service
                          Unavailable")) <br>
                                          {<br>
                                              sl_reply_error();<br>
                                          };<br>
                                      };<br>
                                      exit;<br>
                                  };<br>
                          <pre> # if the downstream UA does not support MESSAGE requests
        # go to failure_route[1]
        t_on_failure("1");
        t_relay();
        exit;
    };

    # forward anything else
    t_relay();
}

failure_route[1] {
    # forwarding failed -- check if the request was a MESSAGE 
    if (!method=="MESSAGE")
    {
        exit;
    };
    
    log(1,"MSILO:the downstream UA doesn't support MESSAGEs\n");
    # we have changed the R-URI with the contact address, ignore it now
    if (m_store("$ou"))
    {
        log("MSILO: offline message stored\n");
        t_reply("202", "Accepted"); 
    }else{
        log("MSILO: offline message NOT stored\n");
        t_reply("503", "Service Unavailable");
    };
}</pre>
                          <br>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div class="gmail_extra"><br>
                            <br>
                            <div class="gmail_quote">On Sun, Feb 16,
                              2014 at 10:01 PM, Daniel-Constantin Mierla
                              <span dir="ltr"><<a
                                  moz-do-not-send="true"
                                  href="mailto:miconda@gmail.com"
                                  target="_blank">miconda@gmail.com</a>></span>
                              wrote:<br>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex">
                                <div text="#000000" bgcolor="#FFFFFF">
                                  Hello,<br>
                                  <br>
                                  t_on_failure("1") should work fine
                                  with latest version, can you give the
                                  log messages with the errors?<br>
                                  <br>
                                  Cheers,<br>
                                  Daniel
                                  <div>
                                    <div><br>
                                      <br>
                                      <div>On 16/02/14 20:41, Peter
                                        Villeneuve wrote:<br>
                                      </div>
                                    </div>
                                  </div>
                                  <blockquote type="cite">
                                    <div>
                                      <div>
                                        <div dir="ltr">
                                          <div>
                                            <div>
                                              <div>
                                                <div>
                                                  <div>Hi,<br>
                                                    <br>
                                                  </div>
                                                  Can someone share a
                                                  working msilo config
                                                  for 4.1.1?<br>
                                                  <br>
                                                </div>
                                                I've tried following
                                                older tutorials out
                                                there but they no longer
                                                seem to apply.<br>
                                                <br>
                                              </div>
                                              I just want to test out
                                              msilo with the default
                                              kamailio config in 4.1.1,
                                              but the current example in
                                              <a moz-do-not-send="true"
href="http://kamailio.org/docs/modules/4.1.x/modules/msilo.html"
                                                target="_blank">http://kamailio.org/docs/modules/4.1.x/modules/msilo.html</a>
                                              doesn't work for me.<br>
                                              <br>
                                            </div>
                                            <div>Specifically, I get an
                                              error regarding the syntax
                                              in  <br>
                                              <pre>t_on_failure("1");</pre>
                                            </div>
                                            <div><br>
                                            </div>
                                            Any help or pointers
                                            appreciated.<br>
                                            <br>
                                          </div>
                                          Thanks<br>
                                        </div>
                                        <br>
                                        <fieldset></fieldset>
                                        <br>
                                      </div>
                                    </div>
                                    <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span><font color="#888888">
</font></span></pre>
                                    <span><font color="#888888"> </font></span></blockquote>
                                  <span><font color="#888888"> <br>
                                      <pre cols="72">-- 
Daniel-Constantin Mierla - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
                                    </font></span></div>
                                <br>
_______________________________________________<br>
                                SIP Express Router (SER) and Kamailio
                                (OpenSER) - sr-users mailing list<br>
                                <a moz-do-not-send="true"
                                  href="mailto:sr-users@lists.sip-router.org"
                                  target="_blank">sr-users@lists.sip-router.org</a><br>
                                <a moz-do-not-send="true"
                                  href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
                                  target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                                <br>
                              </blockquote>
                            </div>
                            <br>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>