OpenSIPS / opensips

OpenSIPS is a GPL implementation of a multi-functionality SIP Server that targets to deliver a high-level technical solution (performance, security and quality) to be used in professional SIP server platforms.
https://opensips.org
Other
1.27k stars 580 forks source link

Invalid Insert Query to missed calls #703

Closed apsaras closed 8 years ago

apsaras commented 8 years ago

Hello.

The following insert query is executed for insertion of missed calls. The setuptime value is provided as date time format which should be an integer.

I am using PostgreSQL as a back end.

insert into missed_calls (method,from_tag,to_tag,callid,sip_code,sip_reason,time,src_ip,src_user,src_domain,dst_ouser,dst_user,dst_domain,user_agent,dr_id,rpid,pai,disconnect_reason,origprefix,destprefix,setuptime,created ) values ('INVITE','as371faadb','0081eace-000b-0328-0000-0000','40576feb77a8ca0530f208dd2152f883@192.168.1.15:5060','487','Request Terminated','2015-11-24 16:56:54','xx.70.xx.1','xxxxx','192.168.1.15','5538xxxx','+xxxx','xx.169.xx.161','Microbase CommServer','3','"xxxx"','','Q.850; cause=16','5538','+','1970-01-01 00:00:21',1448384193)
razvancrainea commented 8 years ago

What version of OpenSIPS are you using?

apsaras commented 8 years ago

Latest 2.1 from git

ksrigo commented 8 years ago

I'm having the same prob with: OpenSIPS 2.1.2

petekelly commented 8 years ago

I've attached a small patch which fixed this for me.

acc.txt

@razvancrainea could you take a look and see if it is sane?

bogdan-iancu commented 8 years ago

@petekelly , @ksrigo , @apsaras , could you please test my latest fix on 2.1 ? @petekelly , your fix was almost right - it did right for missed calls, but breaking CDRs. Please confirm the fix.