<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello,<br>
</p>
<br>
<div class="moz-cite-prefix">On 24/01/2017 18:03, Tobias wrote:<br>
</div>
<blockquote
cite="mid:AM5P195MB01478B3CB3D83B45C9D02755F7750@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>I'd still like the acc record to be written, and then get
notified about that writing was completed, including the
mysql ID, callid and maybe something more, perhaps the whole
record written? I'd like a notification for all writes, i.e.
doesn't matter if it's acc.acc or acc.missed_calls, INVITEs or
BYE, etc.</p>
</div>
</blockquote>
<br>
the MySQL ID is specific to MySQL (and maybe few other database
engines), but not involving acc at all. So you can't get that in the
config right now with acc module -- for example the acc module uses
the same mechanism to write the record to syslog or send it to
radius, where no ID is involved.<br>
<br>
To some extent you may be able to do it in configuration file by
replacing the acc default behaviour with sqlops. The records are
written by mysql when 200ok is received (which can be caught via an
onreply_route) or a final negative response is handled (which can be
caught via a failure_route). There you can use acc_db_request() to
write the record to database and then sqlops to retrieve the ID.
Just an idea by now, but it seems to be doable ...<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote
cite="mid:AM5P195MB01478B3CB3D83B45C9D02755F7750@AM5P195MB0147.EURP195.PROD.OUTLOOK.COM"
type="cite">
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;"
dir="ltr">
<p><br>
</p>
<p>Kind regards,</p>
<p>/Tobias</p>
<br>
<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>
sr-users <a class="moz-txt-link-rfc2396E" href="mailto:sr-users-bounces@lists.sip-router.org"><sr-users-bounces@lists.sip-router.org></a> on
behalf of Daniel-Constantin Mierla
<a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
<b>Sent:</b> Tuesday, January 24, 2017 3:02 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List<br>
<b>Subject:</b> Re: [SR-Users] Event when acc is written?</font>
<div> </div>
</div>
<div>
<p>Hello,</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 24/01/2017 12:23, 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!</p>
<p><br>
</p>
<p>I'm wondering if there is a way for the acc-module to
notify/send an event to Kamailio (so I can pick it up
from the config, similar to event_route) once the
acc-module has performed a write?</p>
<p><br>
</p>
<p>As an example I'm using acc and db-mysql to store acc
data in MySQL, but instead of having a service polling
the MySQL for new acc's written I'd like to make
Kamailio send an event once an acc-row has been
written. I realize this could most likely be done by
using MySQL triggers "ON INSERT", but I'm wondering if
there is another (reliable) way to do this directly
from within Kamailio?</p>
<p><br>
</p>
<p>I haven't tested it, but I would guess that if I
tried to use for example event_route[dialog:end] there
could be times where the event would hit Kamailio
before the acc-module have written to missed_calls?</p>
<p><br>
</p>
<br>
</div>
</blockquote>
Do you still want the acc record to be written in the
database or catch the event before storing and directing it
somewhere else?<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="LPlnk895438" 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="LPlnk258510" 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="LPlnk60365" 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="LPlnk359295" previewremoved="true">www.kamailioworld.com</a></pre>
<div id="LPBorder_GT_14852769240960.024311057922375534"
style="margin-bottom: 20px; overflow: auto; width: 100%;
text-indent: 0px;">
<table id="LPContainer_14852769240940.7064077070069861"
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_14852769240950.17396470295796895"
colspan="2" style="vertical-align: top; position:
relative; padding: 0px; display: table-cell;">
<div id="LPTitle_14852769240950.04770398302072154"
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_14852769240950.02066751504790676"
href="http://www.kamailioworld.com/"
target="_blank" style="text-decoration: none;">Kamailio
World - Our site will be launched soon</a></div>
<div
id="LPMetadata_14852769240950.3461823044764045"
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_14852769240960.3026589128563557"
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_14852768660610.09563816526212254"
style="margin-bottom: 20px; overflow: auto; width: 100%;
text-indent: 0px;">
<table id="LPContainer_14852768660590.2671965732522976"
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_14852768660600.4092498270425917"
colspan="2" style="vertical-align: top; position:
relative; padding: 0px; display: table-cell;">
<div id="LPTitle_14852768660600.7756703825199802"
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_14852768660610.12473502378185719"
href="http://www.linkedin.com/in/miconda"
target="_blank" style="text-decoration: none;">Daniel-Constantin
Mierla | LinkedIn</a></div>
<div
id="LPMetadata_14852768660610.7488265478824228"
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_14852768660610.811826982669515"
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_14852768655260.991960815755091"
style="margin-bottom: 20px; overflow: auto; width: 100%;
text-indent: 0px;">
<table id="LPContainer_14852768655240.5073784455210826"
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_14852768655250.5349381787748897"
colspan="2" style="vertical-align: top; position:
relative; padding: 0px; display: table-cell;">
<div id="LPTitle_14852768655250.7945418652359968"
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_14852768655250.9791916303889072"
href="http://www.twitter.com/miconda"
target="_blank" style="text-decoration: none;">miconda
(@miconda) | Twitter</a></div>
<div
id="LPMetadata_14852768655260.1252551146203742"
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_14852768655260.535665316309087"
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>