Well, some devices add a header in the BYE with the disconnect cause,
but you have to check with those you use. The it will be possible to
take that header and write it in the accounting.

Cheers,
Daniel


On 14/10/16 09:32, Ivan Dudko wrote:
> Daniel,
>
> Of course you are rigth. ))
> Nothing to write to DB.
>
> SIP does not have code for this state, i confuse with q.931
> disconnection causes.
>
> Thank you!
>
> чт, 13 окт. 2016 г. в 11:05, Daniel-Constantin Mierla
> <mico...@gmail.com <mailto:mico...@gmail.com>>:
>
>     Hello,
>
>     where is this in sip signaling? The header in BYE request?
>
>     Cheers,
>     Daniel
>
>
>     On 12/10/16 17:32, Ivan Dudko wrote:
>>
>>     I want to write final SIP disconnect cause.
>>
>>
>>     ср, 12 Окт 2016, 18:01 Daniel-Constantin Mierla
>>     <mico...@gmail.com <mailto:mico...@gmail.com>>:
>>
>>         Which reply code do you want, from initial INVITE of the call?
>>
>>         Cheers,
>>         Daniel
>>
>>
>>         On 12/10/16 15:55, Ivan Dudko wrote:
>>>         Thank you, Daniel!
>>>
>>>         It's works via dlg_vars.
>>>         But i can't write in acc_crds SIP reply code in same way.
>>>
>>>         $dlg_var(sip_cause)=$rs;
>>>
>>>         ср, 12 окт. 2016 г. в 17:33, Daniel-Constantin Mierla
>>>         <mico...@gmail.com <mailto:mico...@gmail.com>>:
>>>
>>>             Hello,
>>>
>>>             for acc_cdr you have to load the dialog module and track
>>>             the active calls with it. It may require that you store
>>>             in dlg vars the values you want inside acc_cdr.
>>>
>>>             Cheers,
>>>             Daniel
>>>
>>>
>>>             On 11/10/16 13:08, Ivan Dudko wrote:
>>>>             Hello!
>>>>
>>>>             I am setting this in kamailio.cfg
>>>>
>>>>             #!ifdef WITH_ACCDB
>>>>             modparam("acc", "db_flag", FLT_ACC)
>>>>             modparam("acc", "db_missed_flag", FLT_ACCMISSED)
>>>>             modparam("acc", "db_url", DBURL)
>>>>             modparam("acc", "db_extra",
>>>>             
>>>> "src_user=$fU;src_domain=$fd;src_ip=$si;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
>>>>             modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
>>>>
>>>>             modparam("acc", "cdr_enable", 1)
>>>>             modparam("acc", "cdr_start_on_confirmed", 1)
>>>>             modparam("acc", "cdrs_table", "acc_cdrs")
>>>>             modparam("acc",
>>>>             
>>>> "cdr_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_user=$rU;dst_ouser=$tU;dst_domain=$rd;sip_code=$rs;sip_reason=$rr;callid=$dlg(callid);dst_ip=$Ri")
>>>>             modparam("acc", "cdr_start_id", "start_time")
>>>>             modparam("acc", "cdr_end_id", "end_time")
>>>>             modparam("acc", "cdr_duration_id", "duration")
>>>>             #!endif
>>>>
>>>>             But in CDRs table ('acc_cdrs') field dst_user=$rU is
>>>>             always empty if call is not completed with remote side
>>>>             answer.
>>>>             But in accounting table ('acc') this field isn't empty.
>>>>
>>>>             Is this behavior is correct?
>>>>             I think it is not correct.
>>>>
>>>>
>>>>
>>>>             _______________________________________________
>>>>             SIP Express Router (SER) and Kamailio (OpenSER) - sr-users 
>>>> mailing list
>>>>             sr-users@lists.sip-router.org
>>>>             <mailto:sr-users@lists.sip-router.org>
>>>>             http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>             -- 
>>>             Daniel-Constantin Mierla
>>>             http://twitter.com/#!/miconda
>>>             <http://twitter.com/#%21/miconda> - 
>>> http://www.linkedin.com/in/miconda
>>>             Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - 
>>> http://www.asipto.com
>>>
>>>             _______________________________________________
>>>             SIP Express Router (SER) and Kamailio (OpenSER) -
>>>             sr-users mailing list
>>>             sr-users@lists.sip-router.org
>>>             <mailto:sr-users@lists.sip-router.org>
>>>             http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>
>>         -- 
>>         Daniel-Constantin Mierla
>>         http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> - 
>> http://www.linkedin.com/in/miconda
>>         Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - 
>> http://www.asipto.com
>>
>
>     -- 
>     Daniel-Constantin Mierla
>     http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> - 
> http://www.linkedin.com/in/miconda
>     Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - 
> http://www.asipto.com
>

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.com

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to