-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello
I have trouble with number dialed starting with +
CDRTool doesn' understand it.
So I have to strip it from the request and replace it by 00!
The problem is that even using this at the begenning of OpenSER script, it's not
working (see CDRTool log below)
Any idea how to solve it?
Thanks
# normalization to e164
if($ruri.user =~ "^\+[1-9][0-9]+") {
xlog("STRIPING + For e164 NORMALIZATION \r\n");
strip(1);
prefix("00");
subst('/^To:(.*)sip:\+(.*)$/To:\1sip:00\2/ig');
};
Mar 3 12:24:49 krusty CDRTool[15025]: MaxSessionTime From=mleurent(a)sip.wifirst.net
To=sip:+33677832975@sip.wifirst.net Dura
tion=10800 Lock=1
Mar 3 12:24:49 krusty CDRTool[15025]: Load last minute: 1 calls @ 0.00 cps, memory: 16.77
MB, uptime: 0.6 hours
Mar 3 12:24:49 krusty CDRTool[15025]: Call to +33677832975(a)sip.wifirst.net, no limit
imposed
Mar 3 12:24:49 krusty CDRTool[15025]: GetBalance From=mleurent(a)sip.wifirst.net
Mar 3 12:24:51 krusty /usr/sbin/openser[18637]: ACC: call missed:
timestamp=1204543491;method=INVITE;from_tag=xirvq;to_tag=
;call_id=cpvrqboancqnuii(a)192.168.95.139;code=487;reason=Request Terminated
Mar 3 12:24:51 krusty CDRTool[15025]: DebitBalance From=mleurent(a)sip.wifirst.net
To=sip:0033677832975@sip.wifirst.net Durat
ion=0
OpenSER config extract:
# ATTENTION: DO NOT PUT ; at the end of the radius_extra attribute
modparam("acc", "radius_extra", "
Called-Station-Id=$tu;
Calling-Station-Id=$fu;
Canonical-URI=$avp(to_destination);
User-Name=$avp(user_name);
Billing-Party=$avp(billing_party);
Sip-User-Realm=$ar;
SIP-Proxy-IP=$Ri;
Source-IP=$si;
Source-Port=$sp;
Acct-Authentic=$avp(s:authentic);
From-Header=$hdr(from);
User-Agent=$hdr(user-agent);
Contact=$hdr(contact);
Event=$hdr(event)")
# Set the acc flags
xlog("JUSTE BEFORE SETTING FLAGS FOR RADIUS\r\n");
if(is_method("INVITE") && !has_totag()) {
xlog("L_INFO", "I AM SETTING THE FLAGS FOR RADIUS
\r\n");
# $avp(s:authentic) = 1;
# $avp(can_uri) = $ru; # SIP Request's URI
$avp(user_name) = $au + "@" + $ar;
$avp(billing_party) = $au + "@" + $ar;
$avp(to_destination) = $tu;
xlog("SETTING FLAGS 1 FOR RADIUS \r\n");
setflag(1); # radius_flag
xlog("SETTING FLAGS 2 FOR RADIUS \r\n");
setflag(2); # radius_missed_flag
};
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iD8DBQFHy+T8rxOjjFYWQtoRAjUzAJ9kUYZpNUEEcKO7aqRuD9Uob0myuQCdEUyU
67e6YOc9jVgzTPQk+A6ccec=
=ZGdn
-----END PGP SIGNATURE-----