<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    the documentation of the uac module has the relevant bits in the
    example of uac_auth() function:<br>
    <br>
      -
<a class="moz-txt-link-freetext" href="http://kamailio.org/docs/modules/stable/modules/uac.html#uac.f.uac_auth()">http://kamailio.org/docs/modules/stable/modules/uac.html#uac.f.uac_auth()</a><br>
    <br>
    In short, before relying to the PSTN gateway first time, set the
    failure_route handler as in the example pointed above, then in the
    failure route be sure the appropriate avps are set to the username
    and password the PSTN gateway expects.<br>
    <br>
    Note that there is a limitation with the above approach -- if the
    PSTN gateway is doing CSeq strict checking (you should notice that
    after sending the INVITE with credentials, the response is 500),
    then you have to load the dialog module and enable cseq tracking and
    update for calls. But try first with uac only, could be that the
    pstn gateway provider uses a kamailio/ser based proxy for
    authentication.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 01/09/15 09:50, Michael Nielsen
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAKLKb5=2=43n2ckPk4j9LV8ZYcApi2HVWtyEgXWf7wY7+7TeOg@mail.gmail.com"
      type="cite">
      <div dir="ltr">So sorry, but do you know of any tutorial using the
        auc module for authenticating against a PSTN gateway?
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Aug 31, 2015 at 8:57 AM,
          Michael Nielsen <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:mic.niel84@gmail.com" target="_blank">mic.niel84@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">Perfect, thanks.<br>
            </div>
            <div class="HOEnZb">
              <div class="h5">
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On Sun, Aug 30, 2015 at 9:37
                    PM, Alexandru Covalschi <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:568691@gmail.com" target="_blank">568691@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>Take a look at UAC module <a
                            moz-do-not-send="true"
href="http://kamailio.org/docs/modules/4.3.x/modules/uac.html#idp17340584"
                            target="_blank">http://kamailio.org/docs/modules/4.3.x/modules/uac.html#idp17340584</a><br>
                        </div>
                        I don't know anything about hashing outgoing
                        passwords, not sure if it's possible. However
                        here passwords are in database.<br>
                      </div>
                      <div class="gmail_extra"><br>
                        <div class="gmail_quote">
                          <div>
                            <div>2015-08-30 12:04 GMT+03:00 Michael
                              Nielsen <span dir="ltr"><<a
                                  moz-do-not-send="true"
                                  href="mailto:mic.niel84@gmail.com"
                                  target="_blank">mic.niel84@gmail.com</a>></span>:<br>
                            </div>
                          </div>
                          <blockquote class="gmail_quote"
                            style="margin:0 0 0 .8ex;border-left:1px
                            #ccc solid;padding-left:1ex">
                            <div>
                              <div>
                                <div dir="ltr">Any ideas on adding
                                  credentials to my PSTN gateway?
                                  <div><br>
                                  </div>
                                  <div>I would like to not have the
                                    password en clear text in my
                                    kamailio.cfg but if it's not
                                    possible that's OK.</div>
                                </div>
                                <div>
                                  <div>
                                    <div class="gmail_extra"><br>
                                      <div class="gmail_quote">On Fri,
                                        Aug 28, 2015 at 9:47 AM, Michael
                                        Nielsen <span dir="ltr"><<a
                                            moz-do-not-send="true"
                                            href="mailto:mic.niel84@gmail.com"
                                            target="_blank">mic.niel84@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">I'm trying to
                                            use a PSTN gateway with
                                            Kamailio for outbound - and
                                            incoming - calls.
                                            <div><br>
                                            </div>
                                            <div>Everything seems to be
                                              routed correctly, except
                                              the PSTN gateway denies
                                              the call due to missing
                                              authentication.</div>
                                            <div><br>
                                            </div>
                                            <div>How do I add
                                              credentials for my PSTN
                                              gateway in a secure way?</div>
                                            <div><br>
                                            </div>
                                            <div>Best regards,</div>
                                            <div>Michael</div>
                                          </div>
                                        </blockquote>
                                      </div>
                                      <br>
                                    </div>
                                  </div>
                                </div>
                                <br>
                              </div>
                            </div>
_______________________________________________<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"
                              rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                            <br>
                          </blockquote>
                        </div>
                        <span><font color="#888888"><br>
                            <br clear="all">
                            <br>
                            -- <br>
                            <div>
                              <div dir="ltr">Alexandru Covalschi<br>
                                ABRISS-Solutions
                                <div>VoIP engineer and system
                                  administrator<br>
                                  phone: <a moz-do-not-send="true"
                                    href="tel:%2B37367398493"
                                    value="+37367398493" target="_blank">+37367398493</a><br>
                                  web: <a moz-do-not-send="true"
                                    href="http://abs-telecom.com/"
                                    target="_blank">http://abs-telecom.com/</a></div>
                              </div>
                            </div>
                          </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"
                        rel="noreferrer" 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>
      <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>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<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>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
  </body>
</html>