Hi Marc,<br><br>had the same issue. The problem is that CDRTool supports only one type of international prefix (in your case any of '00' or '+', so no way of specifying two).<br>The reason you cannot replace + with 00 before authentication is that the full digest-nonce is calculated based on a series of factors (which includes original from and to uris and replacing to_uri before sending the request to radius to be authenticated would mean that radius will never recognize the nonce to be valid anymore).<br>
<br>There are two ways of fixing your problem, as I see them (and mines too):<br>1. CDRTool folks should support some sort of list of international prefixes recognized and stripped.<br>2. A bit dirty patch on the freeradius-cdrtool connector to replace "+" with "00" in case of calls starting with +, before querying cdrtool in auth phase. In this case you must replace also in openser + with 00 so when the call will go out, should go with 00 (to be properly reflected later in cdrs). - this is what I did and looks like running smooth.<br>
<br><br>Cheers,<br>DanB<br><br><div class="gmail_quote">On Mon, Mar 3, 2008 at 12:46 PM, Marc LEURENT <<a href="mailto:lftsy@leurent.eu">lftsy@leurent.eu</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Hello<br>
I have trouble with number dialed starting with +<br>
CDRTool doesn' understand it.<br>
So I have to strip it from the request and replace it by 00!<br>
The problem is that even using this at the begenning of OpenSER script, it's not working (see CDRTool log below)<br>
<br>
Any idea how to solve it?<br>
Thanks<br>
<br>
# normalization to e164<br>
if($ruri.user =~ "^\+[1-9][0-9]+") {<br>
xlog("STRIPING + For e164 NORMALIZATION \r\n");<br>
strip(1);<br>
prefix("00");<br>
subst('/^To:(.*)sip:\+(.*)$/To:\1sip:00\2/ig');<br>
};<br>
<br>
<br>
<br>
Mar 3 12:24:49 krusty CDRTool[15025]: MaxSessionTime From=<a href="mailto:mleurent@sip.wifirst.net">mleurent@sip.wifirst.net</a> To=<a href="mailto:sip:+33677832975@sip.wifirst.net">sip:+33677832975@sip.wifirst.net</a> Dura<br>
tion=10800 Lock=1<br>
Mar 3 12:24:49 krusty CDRTool[15025]: Load last minute: 1 calls @ 0.00 cps, memory: 16.77 MB, uptime: 0.6 hours<br>
Mar 3 12:24:49 krusty CDRTool[15025]: Call to +33677832975@<a href="http://sip.wifirst.net" target="_blank">sip.wifirst.net</a>, no limit imposed<br>
Mar 3 12:24:49 krusty CDRTool[15025]: GetBalance From=<a href="mailto:mleurent@sip.wifirst.net">mleurent@sip.wifirst.net</a><br>
Mar 3 12:24:51 krusty /usr/sbin/openser[18637]: ACC: call missed: timestamp=1204543491;method=INVITE;from_tag=xirvq;to_tag=<br>
;call_id=<a href="mailto:cpvrqboancqnuii@192.168.95.139">cpvrqboancqnuii@192.168.95.139</a>;code=487;reason=Request Terminated<br>
Mar 3 12:24:51 krusty CDRTool[15025]: DebitBalance From=<a href="mailto:mleurent@sip.wifirst.net">mleurent@sip.wifirst.net</a> To=<a href="mailto:sip:0033677832975@sip.wifirst.net">sip:0033677832975@sip.wifirst.net</a> Durat<br>
ion=0<br>
<br>
<br>
OpenSER config extract:<br>
<br>
# ATTENTION: DO NOT PUT ; at the end of the radius_extra attribute<br>
modparam("acc", "radius_extra", "<br>
Called-Station-Id=$tu;<br>
Calling-Station-Id=$fu;<br>
Canonical-URI=$avp(to_destination);<br>
User-Name=$avp(user_name);<br>
Billing-Party=$avp(billing_party);<br>
Sip-User-Realm=$ar;<br>
SIP-Proxy-IP=$Ri;<br>
Source-IP=$si;<br>
Source-Port=$sp;<br>
Acct-Authentic=$avp(s:authentic);<br>
From-Header=$hdr(from);<br>
User-Agent=$hdr(user-agent);<br>
Contact=$hdr(contact);<br>
Event=$hdr(event)")<br>
<br>
<br>
<br>
# Set the acc flags<br>
xlog("JUSTE BEFORE SETTING FLAGS FOR RADIUS\r\n");<br>
if(is_method("INVITE") && !has_totag()) {<br>
xlog("L_INFO", "I AM SETTING THE FLAGS FOR RADIUS \r\n");<br>
# $avp(s:authentic) = 1;<br>
# $avp(can_uri) = $ru; # SIP Request's URI<br>
$avp(user_name) = $au + "@" + $ar;<br>
$avp(billing_party) = $au + "@" + $ar;<br>
$avp(to_destination) = $tu;<br>
xlog("SETTING FLAGS 1 FOR RADIUS \r\n");<br>
setflag(1); # radius_flag<br>
xlog("SETTING FLAGS 2 FOR RADIUS \r\n");<br>
setflag(2); # radius_missed_flag<br>
};<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.6 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org" target="_blank">http://enigmail.mozdev.org</a><br>
<br>
iD8DBQFHy+T8rxOjjFYWQtoRAjUzAJ9kUYZpNUEEcKO7aqRuD9Uob0myuQCdEUyU<br>
67e6YOc9jVgzTPQk+A6ccec=<br>
=ZGdn<br>
-----END PGP SIGNATURE-----<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.openser.org">Users@lists.openser.org</a><br>
<a href="http://lists.openser.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br>