3 records when calling and 2 record when receiving

Please post requests related to the sipsorcery library to the GitHub repo https://github.com/sipsorcery/sipsorcery/issues.
Locked
rubinhozzz
Posts: 3
Joined: Sun Jul 17, 2016 8:02 pm

3 records when calling and 2 record when receiving

Post by rubinhozzz » Thu Mar 02, 2017 11:07 pm

Hello

Looking at my call history records. When I call somebody, I get 3 records. 1 In and 2 OUT. Shouldn't it be just ONE record with direction "IN"??

The same for when I'm receiving a call, I get 1 IN and 1 OUT.

How does it work?

Thanks in advance.

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: 3 records when calling and 2 record when receiving

Post by Aaron » Tue Mar 07, 2017 10:06 am

Unlike a typical VoIP service the CDRs with the sipsorcery service correspond directly to the SIP transactions.

For an outgoing call (where a sipsorcery user connects to an external SIP Provider):

First CDR: user -> sipsorcery server
Second CDR: sipsorcery server -> SIP Provider

If you happen to attempt two SIP Providers in your sys.Dial command, e.g. sys.Dial("provider1&provider2") then you will get a third CDR:

First CDR: user -> sipsorcery server
Second CDR: sipsorcery server -> provider1
Third CDR: sipsorcery server -> provider2

Incoming calls are the same but reversed.

Locked