<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    If you want to receive any suggestions it would be better to show
    you config file with some comments. <br>
    It will reduce a time to understand you configuration and will
    increase a chance to get any help here.<br>
    <br>
    <br>
    <blockquote
cite="mid:CAM5Na1hn3isSvVa=Rtqtk=SR2Przo_9ZZP-ruQyvk2FDTKQUXA@mail.gmail.com"
      type="cite">After further testing it was found that setting the
      alias like this somehow broke outgoing messages. I'm not certain
      exactly how Kamailio handles aliases, but it seems like it is not
      as simple as I expected. I am working on figuring out a new
      solution now if anyone has any thoughts.<br>
      <br>
      <br>
      Thanks,<br>
      Ed<br>
      <br>
      <br>
      <br>
      <br>
      <div class="gmail_quote">On Wed, Oct 24, 2012 at 12:27 AM, Ed
        Brady <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:ebrady@talkforgood.com" target="_blank">ebrady@talkforgood.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">I was able
          to resolve the issue by setting the return domain as a local
          domain alias. With the previous setting I had made to forward
          all non-local accounts to our gateway domain, this would allow
          the improper return domain to be seamlessly switched to the
          correct domain before being forwarded out of our server. Now
          users can have normal two way conversations despite a poor
          design by our vendor.<br>
          <br>
          Thanks for a giant push in the right direction!<span
            class="HOEnZb"><font color="#888888"><br>
              <br>
              <br>
              Ed</font></span>
          <div class="HOEnZb">
            <div class="h5"><br>
              <br>
              <br>
              <br>
              <br>
              <div class="gmail_quote">On Mon, Oct 22, 2012 at 4:02 PM,
                Ed Brady <span dir="ltr">&lt;<a moz-do-not-send="true"
                    href="mailto:ebrady@talkforgood.com" target="_blank">ebrady@talkforgood.com</a>&gt;</span>
                wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">I
                  have this all working now. I had previously configured
                  this as a gateway and once issues were fixed on our
                  vendor's end, it worked. Is there a disadvantage to
                  using this method rather than the permissions module?<br>
                  <br>
                  On a related note (though maybe not related enough),
                  when we get responses from their system it comes back
                  with a different domain in the URI than what they
                  require us to send to. When questioned about this they
                  said we would need to handle it on our end. Is there a
                  common method for checking the to URI for a particular
                  string (in this case the domain), changing it, and
                  then forwarding it?<br>
                  <br>
                  <br>
                  Thanks,<br>
                  Ed
                  <div>
                    <div><br>
                      <br>
                      <br>
                      <br>
                      <div class="gmail_quote">On Sat, Oct 20, 2012 at
                        7:23 PM, Vitaliy Aleksandrov <span dir="ltr">&lt;<a
                            moz-do-not-send="true"
                            href="mailto:vitalik.voip@gmail.com"
                            target="_blank">vitalik.voip@gmail.com</a>&gt;</span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000">
                            <div>"Permissions" module should help you.
                              If allowed ip addresses are kept in a
                              database you can reload them by MI command
                              without kamailio restart.<br>
                              As I remember "permissions" module allows
                              to create groups of ip addresses, so you
                              can create such a group for hosts which
                              you want to receive MESSAGE requests from.<br>
                              <br>
                            </div>
                            <div>
                              <div>
                                <blockquote type="cite">I tested this
                                  example and it worked for me. I was
                                  misunderstanding some of the values
                                  and thought they applied to users
                                  being registered or not. <br>
                                  <br>
                                  I am still uncertain what setting
                                  applies to allowing all traffic
                                  inbound from a particular address. Any
                                  tips on this would be appreciated.<br>
                                  <br>
                                  <br>
                                  Thanks,<br>
                                  Ed<br>
                                  <br>
                                  <br>
                                  <br>
                                  <div class="gmail_quote">On Fri, Oct
                                    19, 2012 at 1:41 PM, Ed Brady <span
                                      dir="ltr">&lt;<a
                                        moz-do-not-send="true"
                                        href="mailto:ebrady@talkforgood.com"
                                        target="_blank">ebrady@talkforgood.com</a>&gt;</span>
                                    wrote:<br>
                                    <blockquote class="gmail_quote"
                                      style="margin:0 0 0
                                      .8ex;border-left:1px #ccc
                                      solid;padding-left:1ex">I was
                                      looking at this logic some more
                                      and wanted to clarify my
                                      configuration. I need to base the
                                      R-URI rewrite and MESSAGE forward
                                      based on whether the account
                                      exists as a local subscriber or
                                      not rather than whether the user
                                      is registered or not. This is
                                      connecting to an SMS provider
                                      using SIP.<br>
                                      <br>
                                      I excitedly looked into the SMS
                                      module but this appears to only be
                                      if you are dealing with a GSM
                                      modem and not sending/receiving
                                      SIP MESSAGEs with an SMS gateway.<br>
                                      <br>
                                      Any resources you can point me to
                                      would be extremely helpful,
                                      thanks!<span><font color="#888888"><br>
                                          <br>
                                          <br>
                                          Ed</font></span>
                                      <div>
                                        <div><br>
                                          <br>
                                          <br>
                                          <div class="gmail_quote">On
                                            Fri, Oct 19, 2012 at 10:42
                                            AM, Ed Brady <span
                                              dir="ltr">&lt;<a
                                                moz-do-not-send="true"
                                                href="mailto:ebrady@talkforgood.com"
                                                target="_blank">ebrady@talkforgood.com</a>&gt;</span>
                                            wrote:<br>
                                            <blockquote
                                              class="gmail_quote"
                                              style="margin:0 0 0
                                              .8ex;border-left:1px #ccc
                                              solid;padding-left:1ex">
                                              Will this also permit
                                              incoming messages from
                                              this domain? Do I need to
                                              add the gateway in any
                                              other settings besides the
                                              one you outlined?<br>
                                              <br>
                                              <br>
                                              Thanks,<br>
                                              Ed
                                              <div>
                                                <div><br>
                                                  <br>
                                                  <br>
                                                  <br>
                                                  <div
                                                    class="gmail_quote">
                                                    On Fri, Oct 19, 2012
                                                    at 6:17 AM, Vitaliy
                                                    Aleksandrov <span
                                                      dir="ltr">&lt;<a
                                                        moz-do-not-send="true"
href="mailto:vitalik.voip@gmail.com" target="_blank">vitalik.voip@gmail.com</a>&gt;</span>
                                                    wrote:<br>
                                                    <blockquote
                                                      class="gmail_quote"
                                                      style="margin:0 0
                                                      0
                                                      .8ex;border-left:1px
                                                      #ccc
                                                      solid;padding-left:1ex">
                                                      <div
                                                        bgcolor="#FFFFFF"
                                                        text="#000000">
                                                        If I understood
                                                        you right you
                                                        just need to
                                                        rewrite R-URI
                                                        domain and
                                                        forward MESSAGE
                                                        if a user in not
                                                        registered.<br>
                                                        <br>
                                                        if
                                                        (!lookup("location"))
                                                        {<br>
                                                        &nbsp;&nbsp;&nbsp;
                                                        switch($retcode)
                                                        {<br>
                                                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case -1:<br>
                                                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $rd
                                                        = "<a
                                                          moz-do-not-send="true"
href="http://gatewaydomain.com" target="_blank">gatewaydomain.com</a>";<br>
                                                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
                                                        t_relay();<br>
                                                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
                                                        exit;<br>
                                                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; default:<br>
                                                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
                                                        sl_send_reply("404",
                                                        "Not Found");<br>
                                                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
                                                        exit;<br>
                                                        &nbsp;&nbsp;&nbsp; }<br>
                                                        }<br>
                                                        <br>
                                                        <blockquote
                                                          type="cite">
                                                          <div>
                                                          <div><br>
                                                          I am trying to
                                                          route SIP
                                                          messages to a
                                                          gateway. I am
                                                          using SIP
                                                          MESSAGE over
                                                          UDP as well as
                                                          the MSILO
                                                          module for
                                                          storing
                                                          messages for
                                                          users that
                                                          aren't
                                                          currently
                                                          logged in. I
                                                          have read
                                                          through the
                                                          Dynamic
                                                          Routing module
                                                          info but am
                                                          not able to
                                                          determine the
                                                          best way to
                                                          accomplish the
                                                          routing I
                                                          require. Our
                                                          scenario is
                                                          outlined
                                                          below.<br>
                                                          <br>
                                                          User A sends a
                                                          message
                                                          addressed to "<a
moz-do-not-send="true" href="mailto:sip%3A12345678900@mydomain.com"
                                                          target="_blank">sip:12345678900@mydomain.com</a>"<br>
                                                          Kamailio at <a
moz-do-not-send="true" href="http://mydomain.com" target="_blank">mydomain.com</a>
                                                          checks if <a
moz-do-not-send="true" href="tel:12345678900" value="+12345678900"
                                                          target="_blank">12345678900</a>
                                                          is a
                                                          registered
                                                          user in the
                                                          system. <br>
                                                          If not, the
                                                          message header
                                                          is translated
                                                          to <a
                                                          moz-do-not-send="true"
href="mailto:sip:12345678900@gatewaydomain..com" target="_blank">"sip:12345678900@gatewaydomain..com"</a>
                                                          and forwarded.<br>
                                                          Incoming
                                                          messages need
                                                          to be accepted
                                                          from their IP
                                                          as well.<br>
                                                          <br>
                                                          It would also
                                                          be useful if
                                                          the address
                                                          came as "<a
                                                          moz-do-not-send="true"
href="mailto:sip%3A2345678900@mydomain.com" target="_blank">sip:2345678900@mydomain.com</a>"
                                                          could be
                                                          translated to
                                                          "sip:<u>1</u><a
moz-do-not-send="true" href="mailto:2345678900@gatewaydomain.com"
                                                          target="_blank">2345678900@gatewaydomain.com</a>".<br>
                                                          <br>
                                                          <br>
                                                          Is there any
                                                          built in
                                                          functionality
                                                          I can
                                                          configure for
                                                          this, or will
                                                          this need to
                                                          be scripted?<br>
                                                          <br>
                                                          <br>
                                                          Thanks,<br>
                                                          Ed<br>
                                                          <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>
</pre>
                                                        </blockquote>
                                                        <br>
                                                      </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>
                                            </blockquote>
                                          </div>
                                          <br>
                                        </div>
                                      </div>
                                    </blockquote>
                                  </div>
                                  <br>
                                  <br>
                                  <fieldset></fieldset>
                                  <br>
                                  <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>
</pre>
                                </blockquote>
                                <br>
                              </div>
                            </div>
                          </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>
                </blockquote>
              </div>
              <br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>