<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    <div class="moz-cite-prefix">On 6/6/12 9:57 PM, Stoyan Mihaylov
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAPScudavP_Vgm+GTY+qk=an2O4kfoLgwFqtCeoRA7jG6b9VVVA@mail.gmail.com"
      type="cite">We use Jitsi as SIP client, and openxcap along with
      camailio to handle presence. Then jitsi know if account is online
      or offline.
      <div>Our Asterisk dont know nothing about accounts (it accepts all
        calls from kamailio). There I run AGI scripts, which can check
        kamailio tables - and I can know if account is online or
        offline. Of course this do not work if account is "forced" to
        offline.</div>
      <div>But may be there is better solution.<br>
        <br>
        <div class="gmail_quote">On Wed, Jun 6, 2012 at 10:04 PM,
          Dominik Mauritz <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:dominik.mauritz@web.de" target="_blank">dominik.mauritz@web.de</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0px 0px 0px
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">I have already tried that. I defined
            SIP-Accounts in Asterisk with host=&lt;Kamailio-IP&gt;
            (instead of host=dynamic). This solves the described problem
            but it also has side effects:<br>
            <br>
            - You don't have the correct presence status on your phone
            (e. g. xlite) indicating wether the account is online or
            offline<br>
            - Asterisk always sends invites to Kamailio on incoming
            calls even if there is no phone registered to the account<br>
            <br>
            These are not the worst things in the world, but it is maybe
            not the best solution possible.<br>
            <br>
            <br>
            <br>
            Am 06.06.12 20:41, schrieb Stoyan Mihaylov:<br>
            <blockquote class="gmail_quote" style="margin: 0px 0px 0px
              0.8ex; border-left: 1px solid rgb(204, 204, 204);
              padding-left: 1ex;">
              <div class="im">
                We use also Kamailio in front of Asterisk - but I
                forward only calls to Asterisk - register/unregister
                stay in Kamailio. Asterisk dont know which device is
                registered, and which is not.<br>
                <br>
                <br>
              </div>
              <div class="im">
                On Wed, Jun 6, 2012 at 8:20 PM, Dominik Mauritz &lt;<a
                  moz-do-not-send="true"
                  href="mailto:dominik.mauritz@web.de" target="_blank">dominik.mauritz@web.de</a>
                &lt;mailto:<a moz-do-not-send="true"
                  href="mailto:dominik.mauritz@web.de" target="_blank">dominik.mauritz@web.de</a>&gt;&gt;
                wrote:<br>
                <br>
                &nbsp; &nbsp;Hi All,<br>
                <br>
                &nbsp; &nbsp;some days ago I installed Kamailio as a front end for
                Asterisk following this tutorial:<br>
                <br>
              </div>
              &nbsp; &nbsp;<a moz-do-not-send="true"
href="http://kb.asipto.com/asterisk:__realtime:kamailio-3.1.x-__asterisk-1.6.2-astdb"
                target="_blank">http://kb.asipto.com/asterisk:__realtime:kamailio-3.1.x-__asterisk-1.6.2-astdb</a>
              &lt;<a moz-do-not-send="true"
href="http://kb.asipto.com/asterisk:realtime:kamailio-3.1.x-asterisk-1.6.2-astdb"
                target="_blank">http://kb.asipto.com/asterisk:realtime:kamailio-3.1.x-asterisk-1.6.2-astdb</a>&gt;
              <div class="im">
                <br>
                <br>
                &nbsp; &nbsp;I added Multi Domain support and adjusted some other
                things to fit my environment. Almost everything is
                working perfectly now. One small issue is left:<br>
                <br>
                &nbsp; &nbsp;With Kamailio in front of Asterisk I have one feature
                (next to other cool things) I was missing for years. I
                am now able to register more than one device on the same
                SIP account. This is nothing new for Kamailio users but
                Asterisk doesn&#8217;t support this.<br>
                <br>
                &nbsp; &nbsp;If I register two phones on one SIP account with
                Kamailio everything is fine. They are able to make
                outgoing calls and both ring on incoming calls. But if
                one phone unregisters Kamailio forwards the unregister
                request to Asterisk and Asterisk sets this account to
                offline. Now a call comes in but Asterisk is not sending
                out an invite because for Asterisk the phone is offline.<br>
                <br>
                &nbsp; &nbsp;I wonder if it is possible to forward an unregister
                request from Kamailio to Asterisk only if the last
                endpoint registered with one SIP account unregisters. If
                there is more than one endpoint using the same Account
                Kamailio should not forward the unregister request to
                Asterisk.<br>
                <br>
                &nbsp; &nbsp;Any idea?<br>
                <br>
              </div>
            </blockquote>
          </blockquote>
        </div>
      </div>
    </blockquote>
    you can use reg_fetch_contacts(...) in your config to find out how
    many contacts are for an user and based on that do not send the
    un-register to asterisk, see:<br>
    <br>
<a class="moz-txt-link-freetext" href="http://kamailio.org/docs/modules/stable/modules_k/registrar.html#id2498205">http://kamailio.org/docs/modules/stable/modules_k/registrar.html#id2498205</a><br>
<a class="moz-txt-link-freetext" href="http://kamailio.org/docs/modules/stable/modules_k/registrar.html#id2498441">http://kamailio.org/docs/modules/stable/modules_k/registrar.html#id2498441</a><br>
    <br>
    Cheers,<br>
    Daniel<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>
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/katu">http://asipto.com/u/katu</a>
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/kpw">http://asipto.com/u/kpw</a></pre>
    <br>
    <br>
  </body>
</html>