[OpenSIPS-Users] OpenSIPS and Prepaid accounts

Adrian Georgescu ag at ag-projects.com
Tue Jan 8 22:49:23 CET 2013


What you describe should work just fine.

Adrian

On Jan 7, 2013, at 9:27 PM, Davide Dal Frà wrote:

> 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
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 




More information about the Users mailing list