<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p><br>
    </p>
    <p>dispatcher module executes some event routes -- it has a wrapper
      function:</p>
    <p><br>
    </p>
    <p><a class="moz-txt-link-freetext" href="https://github.com/kamailio/kamailio/blob/master/src/modules/dispatcher/dispatch.c#L2261">https://github.com/kamailio/kamailio/blob/master/src/modules/dispatcher/dispatch.c#L2261</a></p>
    <p><br>
    </p>
    <p>For acc should be simpler, because the sip request should be
      there, used by acc to get the attributes, so no need to make a
      fake one. Should be a pice of code like next one plugged in
      acc_onreply() function from acc module:<br>
    </p>
    <br>
        rt = route_lookup(&event_rt, "acc:record-stored");<br>
        if(rt < 0 || event_rt.rlist[rt] == NULL) {<br>
            LM_DBG("event route does not exist");<br>
            return;<br>
        }<br>
        backup_rt = get_route_type();<br>
        set_route_type(REQUEST_ROUTE);<br>
        init_run_actions_ctx(&ctx);<br>
        run_top_route(event_rt.rlist[rt], preq, 0);<br>
        set_route_type(backup_rt);<br>
    <br>
    That's based on a very quick look in the code, you may need to tune
    a bit (and define some vars, add includes, etc.).<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 25/01/2017 15:45, Tobias wrote:<br>
    </div>
    <blockquote
cite="mid:AM5P195MB01470A712EA73FD519EA11B0F7740@AM5P195MB0147.EURP195.PROD.OUTLOOK.COM"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;"
        dir="ltr">
        <p>Hi Daniel,</p>
        <p><br>
        </p>
        <p>Thanks. Can you point me to a good example of how this is
          implemented in another module, perhaps I could then add it
          myself to acc?</p>
        <p><br>
        </p>
        <p>/Tobias</p>
        <br>
        <div style="color: rgb(0, 0, 0);">
          <hr tabindex="-1" style="display:inline-block; width:98%">
          <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
              color="#000000" face="Calibri, sans-serif"><b>From:</b>
              Daniel-Constantin Mierla <a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
              <b>Sent:</b> Wednesday, January 25, 2017 3:20 PM<br>
              <b>To:</b> Tobias; Kamailio (SER) - Users Mailing List<br>
              <b>Subject:</b> Re: [SR-Users] Event when acc is written?</font>
            <div> </div>
          </div>
          <div>
            <p>Hello,<br>
            </p>
            <br>
            <div class="moz-cite-prefix">On 25/01/2017 09:44, Tobias
              wrote:<br>
            </div>
            <blockquote type="cite">
              <div id="divtagdefaultwrapper" dir="ltr"
                style="font-size:12pt; color:#000000;
                font-family:Calibri,Arial,Helvetica,sans-serif">
                <p>Hi Daniel,</p>
                <p><br>
                </p>
                <p>Thanks for your reply.</p>
                <p><br>
                </p>
                <p>Disregarding the MySQL ID, would it be possible to
                  get the callid of the call back from the acc module
                  once a write has been made?</p>
              </div>
            </blockquote>
            to my knowledge, there is no cfg event_route executed at
            that moment. It should not be something complex to add, but
            requires c coding in acc module.<br>
            <br>
            Cheers,<br>
            Daniel<br>
            <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" id="LPlnk101087" previewremoved="true">www.twitter.com/miconda</a> -- <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" id="LPlnk338214" previewremoved="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.asipto.com" id="LPlnk691950" previewremoved="true">www.asipto.com</a>
Kamailio World Conference - May 8-10, 2017 - <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com" id="LPlnk346393" previewremoved="true">www.kamailioworld.com</a></pre>
            <div id="LPBorder_GT_14853554921250.4552366621577426"
              style="margin-bottom: 20px; overflow: auto; width: 100%;
              text-indent: 0px;">
              <table id="LPContainer_14853554921230.6035947752446784"
                style="width: 90%; background-color: rgb(255, 255, 255);
                position: relative; overflow: auto; padding-top: 20px;
                padding-bottom: 20px; margin-top: 20px; border-top: 1px
                dotted rgb(200, 200, 200); border-bottom: 1px dotted
                rgb(200, 200, 200);" cellspacing="0">
                <tbody>
                  <tr style="border-spacing: 0px;" valign="top">
                    <td id="TextCell_14853554921240.34571959228976823"
                      colspan="2" style="vertical-align: top; position:
                      relative; padding: 0px; display: table-cell;">
                      <div id="LPTitle_14853554921240.8543236848469022"
                        style="top: 0px; color: rgb(0, 114, 57);
                        font-weight: normal; font-size: 21px;
                        font-family: wf_segoe-ui_light, "Segoe UI
                        Light", "Segoe WP Light",
                        "Segoe UI", "Segoe WP",
                        Tahoma, Arial, sans-serif; line-height: 21px;">
                        <a moz-do-not-send="true"
                          id="LPUrlAnchor_14853554921240.32417181559706854"
                          href="http://www.kamailioworld.com/"
                          target="_blank" style="text-decoration: none;">Kamailio
                          World - Our site will be launched soon</a></div>
                      <div
                        id="LPMetadata_14853554921240.8298935145862252"
                        style="margin: 10px 0px 16px; color: rgb(102,
                        102, 102); font-weight: normal; font-family:
                        wf_segoe-ui_normal, "Segoe UI",
                        "Segoe WP", Tahoma, Arial, sans-serif;
                        font-size: 14px; line-height: 14px;">
                        <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></div>
                      <div
                        id="LPDescription_14853554921240.3157386548343506"
                        style="display: block; color: rgb(102, 102,
                        102); font-weight: normal; font-family:
                        wf_segoe-ui_normal, "Segoe UI",
                        "Segoe WP", Tahoma, Arial, sans-serif;
                        font-size: 14px; line-height: 20px; max-height:
                        100px; overflow: hidden;">
                        the 5th edition May 8-10, 2017 - Berlin,
                        Germany. Website of the event and more details
                        will be available very soon!</div>
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>
            <br>
            <div id="LPBorder_GT_14853554333410.13258416922191674"
              style="margin-bottom: 20px; overflow: auto; width: 100%;
              text-indent: 0px;">
              <table id="LPContainer_14853554333400.5280215471942529"
                style="width: 90%; background-color: rgb(255, 255, 255);
                position: relative; overflow: auto; padding-top: 20px;
                padding-bottom: 20px; margin-top: 20px; border-top: 1px
                dotted rgb(200, 200, 200); border-bottom: 1px dotted
                rgb(200, 200, 200);" cellspacing="0">
                <tbody>
                  <tr style="border-spacing: 0px;" valign="top">
                    <td id="TextCell_14853554333410.5820446246217965"
                      colspan="2" style="vertical-align: top; position:
                      relative; padding: 0px; display: table-cell;">
                      <div id="LPTitle_14853554333410.8660225648564428"
                        style="top: 0px; color: rgb(0, 114, 57);
                        font-weight: normal; font-size: 21px;
                        font-family: wf_segoe-ui_light, "Segoe UI
                        Light", "Segoe WP Light",
                        "Segoe UI", "Segoe WP",
                        Tahoma, Arial, sans-serif; line-height: 21px;">
                        <a moz-do-not-send="true"
                          id="LPUrlAnchor_14853554333410.46181686909325403"
                          href="http://www.linkedin.com/in/miconda"
                          target="_blank" style="text-decoration: none;">Daniel-Constantin
                          Mierla | LinkedIn</a></div>
                      <div
                        id="LPMetadata_14853554333410.29158409755100156"
                        style="margin: 10px 0px 16px; color: rgb(102,
                        102, 102); font-weight: normal; font-family:
                        wf_segoe-ui_normal, "Segoe UI",
                        "Segoe WP", Tahoma, Arial, sans-serif;
                        font-size: 14px; line-height: 14px;">
                        <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com">www.linkedin.com</a></div>
                      <div
                        id="LPDescription_14853554333410.04241893497860727"
                        style="display: block; color: rgb(102, 102,
                        102); font-weight: normal; font-family:
                        wf_segoe-ui_normal, "Segoe UI",
                        "Segoe WP", Tahoma, Arial, sans-serif;
                        font-size: 14px; line-height: 20px; max-height:
                        100px; overflow: hidden;">
                        View Daniel-Constantin Mierla’s professional
                        profile on LinkedIn. LinkedIn is the world's
                        largest business network, helping professionals
                        like Daniel-Constantin Mierla discover inside
                        connections to recommended job candidates,
                        industry experts, and business partners.</div>
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>
            <br>
            <div id="LPBorder_GT_14853554331980.7784561708396665"
              style="margin-bottom: 20px; overflow: auto; width: 100%;
              text-indent: 0px;">
              <table id="LPContainer_14853554331960.7914358738774918"
                style="width: 90%; background-color: rgb(255, 255, 255);
                position: relative; overflow: auto; padding-top: 20px;
                padding-bottom: 20px; margin-top: 20px; border-top: 1px
                dotted rgb(200, 200, 200); border-bottom: 1px dotted
                rgb(200, 200, 200);" cellspacing="0">
                <tbody>
                  <tr style="border-spacing: 0px;" valign="top">
                    <td id="TextCell_14853554331970.46663212765930706"
                      colspan="2" style="vertical-align: top; position:
                      relative; padding: 0px; display: table-cell;">
                      <div id="LPTitle_14853554331970.4353073004320738"
                        style="top: 0px; color: rgb(0, 114, 57);
                        font-weight: normal; font-size: 21px;
                        font-family: wf_segoe-ui_light, "Segoe UI
                        Light", "Segoe WP Light",
                        "Segoe UI", "Segoe WP",
                        Tahoma, Arial, sans-serif; line-height: 21px;">
                        <a moz-do-not-send="true"
                          id="LPUrlAnchor_14853554331970.9651000244824297"
                          href="http://www.twitter.com/miconda"
                          target="_blank" style="text-decoration: none;">miconda
                          (@miconda) | Twitter</a></div>
                      <div
                        id="LPMetadata_14853554331970.5852513066848315"
                        style="margin: 10px 0px 16px; color: rgb(102,
                        102, 102); font-weight: normal; font-family:
                        wf_segoe-ui_normal, "Segoe UI",
                        "Segoe WP", Tahoma, Arial, sans-serif;
                        font-size: 14px; line-height: 14px;">
                        <a class="moz-txt-link-abbreviated" href="http://www.twitter.com">www.twitter.com</a></div>
                      <div
                        id="LPDescription_14853554331980.025999588045371613"
                        style="display: block; color: rgb(102, 102,
                        102); font-weight: normal; font-family:
                        wf_segoe-ui_normal, "Segoe UI",
                        "Segoe WP", Tahoma, Arial, sans-serif;
                        font-size: 14px; line-height: 20px; max-height:
                        100px; overflow: hidden;">
                        The latest Tweets from miconda (@miconda).
                        Co-founder and leader of Kamailio SIP Server
                        project (former OpenSER). C Dev. Open Source RTC
                        advocate. SIP, VoIP, VoLTE and WebRTC
                        consultancy at Asipto. Berlin, Germany</div>
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>
            <br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>