[Serusers] Forwarding to pstn, accounting problem

Pavel Siderov pi at hostmates.com
Wed Oct 20 12:00:04 CEST 2004


After I made my accounting up and working I've changed something and it's not working now would you help me please. 
The problem is that when I forward the call to pstn gateway when user closes the line the "BYE" request is not written 
in the database - it exists but it's not written - here it is

 3(17265) SIP Request:
 3(17265)  method:  <BYE>
 3(17265)  uri:     <sip:pavel at 192.168.2.111:19454>
 3(17265)  version: <SIP/2.0>
 3(17265) parse_headers: flags=1
 3(17265) get_hdr_field: cseq <CSeq>: <1> <BYE>

Here is part of my ser.cfg


modparam("acc", "log_flag", 1)
modparam("acc", "log_fmt", "cdfimorstup")
modparam("acc", "db_url", "mysql://user:pass@192.168.2.113:3306/ser")
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 1)
modparam("acc", "log_missed_flag", 1)
#modparam("acc", "report_cancels", 1)
modparam("acc", "report_ack", 1)

.......

        if (uri=~"^sip:[0-9]*@sip.mydomain.com") {
                if (is_user_in("From", "pstn")){
                        rewritehost("pstn_gw_ip");
                        append_branch("pstn_gw_ip");
                        setflag(1);
                        record_route();
                        force_rtp_proxy();
                        t_relay();
                        t_on_reply("1");
                        if (loose_route()) {
                                t_relay();
                                break;
                        };
                        break;
                }
                else {
                        sl_send_reply("399", "Your account balance is low!");
                };
                        break;
                };


What's is the problem please help me. 
Thanks in advance!

Pavel Siderov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20041020/a631b513/attachment.htm>


More information about the sr-users mailing list