[OpenSIPS-Users] OpenSIPS and Prepaid accounts
Davide Dal Frà
lab at dalfra.com
Mon Jan 7 21:27:54 CET 2013
Hi all,
I'm playing with OpenSIPS and prepaid accounts, and for each single sips
users it's working fine.
Now i'm thinking about having another sip proxy (with our domain) that
forwards all calls to my proxy with prepaid service.
Reading some post on mailing list i saw that Cdrtool can work only with
single sips users.
There are some way to have a prepaid service based on Source ip of
signaling or domain?
Looking the CDRtool source, i think that i can place a fake account on
prepaid table, and match/replace the request coming from a domain with a
preg_replace php function:
Is this a good idea or not?
Here's an example about my idea:
Insert into mysql "prepaid" table something like this:
FAKE_PREPAID at external-domain.tld
before the sql query into rating engine that select the right account i
can do something like this (writen in pseudocode):
if ( preg_match("/external-domain.tld/") ){
$TEMP_DOMAIN_RPLC = explode("@" , $account);
$account = "FAKE_PREPAID@". $TEMP_DOMAIN_RPLC[1];
}
..
so in this way every call coming from any users at external-domain.tld is
billed in prepayed mode as FAKE_PREPAID at external-domain.tld user.
It's good or bad?
Thanks in advance
Regards
Davide
More information about the Users
mailing list