[Serusers] alias/rpid instead of subscriber in acc

Roger Lewau roger.lewau at serverhallen.com
Thu Sep 21 00:41:56 CEST 2006


I am using acc table for accounting of INVITE, BYE and CANCEL. This info is
then used to create CDRs for billing.
It works great with one exception.
 
My setup is that every subsbriber account is tied to a public PSTN number.
The PSTN number is set in the rpid field of subscriber table as well as
stored as an alias for the subscriber account. On every call bound for pstn,
I add the rpid header to provide CID for the B end of the call. 
 
Now to the strange part. I have some asterisk servers registered as ua in
SER, when these servers make calls some calls get registered with a from uri
that are equal to the SER account used, some calls are registered with the
PSTN number as the from uri. Two consecutive calls from the same asterisk
box and user to the same pstn number, can produce one of each from uri. The
way I like it to be is that all calls should be registered with the SER
account used.  This only happens with asterisk as ua. 
 
At first, I though this could be because I set asteriskt to canreinvite=yes,
but same thing happened with canreinvite=no.
 
When is a record actually saved in acc?
Anyone with an idea why this inconsistancy occurs?  
 
Some code:
 
extract from sip.conf
==========
 
register => 1000:1234 at sip.serverhallen.com/552000; incomming
 
 
[ser-out] ;outgoing calls
type=peer
host=sip.serverhallen.com
language=se
username=1000
secret=1234
fromuser=1000
insecure=very
context=vbx
 
extract from extensions.conf
========================
exten => _X.,1,DIAL(SIP/${EXTEN}@ser-out,60)

 
from ser.cfg main route block
=====================
if (method=="INVITE" || method=="BYE" || method=="CANCEL") {
    # enable accounting for INVITE and BYE and CANCEL messages.
    setflag(2);
};
        

 
 
 
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20060921/0ff77c3e/attachment.htm>


More information about the sr-users mailing list