The domain is already in the billing_customers table with the corresponding timezone. <br><br>The problem, as far as I could see, was that in the SQL query retrieving the customer the domain was not set and only billing_party and gateway, as states the following line of the log I sent:<br>
<br>billing party=<a href="mailto:mas@testintern.domain.com" target="_blank">mas@testintern.domain.com</a>, domain=, gateway=X.Y.Z.W<br><br>Since only the domain is stored in the customers table is set, the previous query did not return any value and the callcontrol->cdrtool connection returned error (which should be changed from the timezone to the customer not found.)<br>
<br>Thanks a lot for taking a look at it, case you need more infromation, I can surely provide it.<br><br>Best regards,<br>Samuel<br><br><div class="gmail_quote">On 14 February 2012 10:00, Tijmen de Mes <span dir="ltr"><<a href="mailto:tijmen@ag-projects.com">tijmen@ag-projects.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Hi Samuel,<br>
<br>
A domain can be defined in the billing_customers table. In your case
<a href="mailto:0034123456789@testintern.domain.com" target="_blank">testintern.domain.com</a>.
You should also add the timezone to this domain in the same table.<br>
<br>
If this still does not work, and like you said, the domain is not
properly split/retrieved from the uri, I've to look deeper in the
code why this can happen.<br>
<br>
So can you please add the domain and let me know the outcome?<br>
<br>
Best regards,<br>
<br>
-- <br>
Tijmen de Mes
<br>
AG Projects<div><div class="h5"><br>
<br>
On 02/13/2012 05:30 PM, samuel wrote:
</div></div><blockquote type="cite"><div><div class="h5">Hi all,<br>
<br>
Recently I was playing with the prepaid functionallity of CDRTool
(8.2.3) and found out that when the customer is not explicitely
defined in the field Subscriber, the domain is not looked up.<br>
I have opensips (1.7.1) with call control application from apt
sources (2.0.15) and when the following call is sent:<br>
<br>
sent from opensips to CDRTool:<br>
MaxSessionTime Duration=36000
CallId=JeJ5LJz8iCXozC1AGxhqoOIliuToIm53 From=<a href="mailto:sip%3Amas@testintern.domain.com" target="_blank">sip:mas@testintern.domain.com</a>
Gateway=X.Y.Z.W To=sip<br>
:<a href="mailto:0034123456789@testintern.domain.com" target="_blank">0034123456789@testintern.domain.com</a>..
<br>
##<br>
reply from CDRTool<br>
error: cannot figure out the billing
timezone.type=prepaid.type=prepaid<br>
<br>
Looking in the syslog we find the right answer:<br>
Feb 13 17:18:30 cdrtool cdrtool[30106]: Error: no customer found
in billing_customers table for billing party=<a href="mailto:mas@testintern.domain.com" target="_blank">mas@testintern.domain.com</a>,
domain=, gateway=X.Y.Z.W<br>
Feb 13 17:18:30 cdrtool cdrtool[30106]: error: cannot figure out
the billing timezone#012type=prepaid<br>
<br>
so it looks like the domain is not extracted from the user part
and it is not checked in the billing_customers table. The query in
the function lookupProfiles (file rating.php) uses
$this->dictionary['domain'] as the source for the domain but in
the prepaid scenario, this parameter hasn't got a value. Am I
right?<br>
<br>
I've tried to dig further in the code but unfortunately got lost
in the exportation of the CDR's dictionary to the function that is
used in prepaid scenarios.<br>
<br>
Is there any option I'm missing? Is it possible to setup just the
domain in the billing_customers table and not a line foreach
prepaid customer?<br>
<br>
Congratulations for the project and thanks in advance,<br>
Samuel<br>
<br>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>
</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br>