<br><br><div class="gmail_quote">On Thu, Jan 27, 2011 at 11:34 AM, Brett Nemeroff <span dir="ltr"><<a href="mailto:brett@nemeroff.com">brett@nemeroff.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="gmail_quote"><div class="im">On Thu, Jan 27, 2011 at 11:26 AM, Jock McKechnie <span dir="ltr"><<a href="mailto:jock.mckechnie@gmail.com" target="_blank">jock.mckechnie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Greetings all;<br><br>I'm having a devil of a time getting CDR logging functioning. I've gone over the ACC documentation six ways from Sunday, and I've googled like crazy trying to find a sample configuration that might've been logged somewhere, but I'm not finding anything. Either that, or I'm as daft as a brush.<br>
<br>I've got OpenSIPS logging console details to log_local7, which I'm redirecting using rsyslog to /var/log/opensips.log. I'm now trying to get CDRs generated and recorded _to disk_ to /var/log/opensips.cdr via log_local6. I've got rsyslog correctly configured for pushing local6 to the aforementioned file, and rsylogd has created the file, but call after call, no details get filtered into it.<br>
<br>I've got the following (obviously I'm omitting huge chunks of config, but this should be the "relevant" stuff):<br><br>loadmodule("dialog.so")<br>loadmodule("acc.so")<br><br>modparam("acc", "log_facility", "log_local6")<br>
modparam("acc", "cdr_flag", 1)<br><br>if (method=="INVITE") {<br> setflag(1);<br> route(1);<br> }<br><br></blockquote><div><br></div></div><div>So two things I notice:</div><div><br></div>
<div>
First you don't have a log flag defined:</div><div><a href="http://www.opensips.org/html/docs/modules/1.6.x/acc.html#id293011" target="_blank">http://www.opensips.org/html/docs/modules/1.6.x/acc.html#id293011</a></div>
<div><br></div>
<div>Second, you don't have anything creating a dialog.</div><div><a href="http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id293813" target="_blank">http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id293813</a></div>
<div><br></div><div>Without that the cdr_flag won't do anything I don't think. <br><br></div><div>Try:</div><div><div class="im">loadmodule("dialog.so")<br>loadmodule("acc.so")<br><br>modparam("acc", "log_facility", "log_local6")<br>
modparam("acc", "cdr_flag", 1)<br></div>modparam("acc", "log_flag", 2)</div><div><br>if (method=="INVITE") {<br> create_dialog()</div><div> setflag(1);</div>
<div> setflag(2);<br> route(1);<br> }<br></div><div></div></div></blockquote><div><br>I hang my head in shame - I didn't even look at the dialog module documentation, it never occurred to me that I'd need to "start" something, I figured acc was just pulling functions in. I should have caught this. The log_flag I was sure had to be unneeded because I was setting cdr_flag. Clearly not!<br>
<br>This works perfectly. Hopefully in the future anyone with similar issues will find the thread and find help.<br><br>Thanks, again, Brett.<br><br> - JP <br></div></div><br>