<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>I am using acc table
for accounting of INVITE, BYE and CANCEL. This info is then used to create CDRs
for billing.</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>It works great with
one exception.</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>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. </FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>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. </FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>At first, I though
this could be because I set asteriskt to canreinvite=yes, but same thing
happened with canreinvite=no.</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>When is a record
actually saved in acc?</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>Anyone with an idea
why this inconsistancy occurs? </FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>Some
code:</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>extract from
sip.conf</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2>==========</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>register =>
1000:1234@sip.serverhallen.com/552000; incomming</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>[ser-out] ;outgoing
calls<BR>type=peer<BR>host=sip.serverhallen.com<BR>language=se<BR>username=1000</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2>secret=1234<BR>fromuser=1000</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2>insecure=very<BR>context=vbx</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>extract from
extensions.conf</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2>========================</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>exten =>
_X.,1,DIAL(<A
href="mailto:SIP/${EXTEN}@ser-out,60">SIP/${EXTEN}@ser-out,60</A>)<BR></FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>from ser.cfg main
route block</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2>=====================</FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial size=2>if (method=="INVITE"
|| method=="BYE" || method=="CANCEL") {<BR> # enable
accounting for INVITE and BYE and CANCEL
messages.<BR> setflag(2);<BR>};<BR>
<BR></FONT></SPAN></DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=319491422-20092006><FONT face=Arial
size=2></FONT></SPAN> </DIV></BODY></HTML>