[OpenSIPS-Devel] R: R: R: Accounting problem with the internal generated BYE

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Mar 16 18:02:27 CET 2009


Well, detect_direction is based on the Loose_Route mechanism, but this 
is not applicable for the local generated request .... So, it cannot work.

Regards,
Bogdan

Mauro Davi' wrote:
> Hi Bogdan,
>
> now it works, but I have a question.
>
> I set the acc module "detect_direction" parameter to 1.
>
> But on the DB I found two BYE (correct) with the from_tag and to_tag fields inverted...
>
> Is it correct?
>
> Regards,
> 	MD
>  
> -----Messaggio originale-----
> Da: Bogdan-Andrei Iancu [mailto:bogdan at voice-system.ro] 
> Inviato: lunedì 16 marzo 2009 16:17
> A: Mauro Davi'
> Cc: devel at lists.opensips.org
> Oggetto: Re: R: R: [OpenSIPS-Devel] Accounting problem with the internal generated BYE
>
> Hi,
>
> I made a fix on trunk/1.5 branch - could you please update and give it a 
> try?
>
> Thank and regards,
> Bogdan
>
> Mauro Davi' wrote:
>   
>> BINGO!!!
>>
>> Below the trace:
>>
>> (gdb) p db_handle
>> $1 = (db_con_t *) 0x0 
>>
>> Regards,
>> 	MD
>>
>> -----Messaggio originale-----
>> Da: Bogdan-Andrei Iancu [mailto:bogdan at voice-system.ro] 
>> Inviato: venerdì 13 marzo 2009 16:50
>> A: Mauro Davi'
>> Cc: devel at lists.opensips.org
>> Oggetto: Re: R: [OpenSIPS-Devel] Accounting problem with the internal generated BYE
>>
>> could you please print the db_handle var in gdb?
>>
>> I guess the ACC module does not open a connection to DB from the MI 
>> processes.
>>
>>
>> Thanks and regards,
>> Bogdan
>>
>> Mauro Davi' wrote:
>>   
>>     
>>> Hi Bogdan,
>>>
>>> below the back trace, in version 1.4.4 all goes fine...
>>>
>>> #0  acc_db_request (rq=0x18a2c0, rpl=0x0) at acc.c:369
>>> 369             CON_PS_REFERENCE(db_handle) = &my_ps;
>>> (gdb) bt
>>> #0  acc_db_request (rq=0x18a2c0, rpl=0x0) at acc.c:369
>>> #1  0x00e84ec9 in w_acc_db_request (rq=0x18a2c0, comment=0x82106b0 "", table=0x8211208 "acc") at acc_logic.c:184
>>> #2  0x080557f2 in do_action (a=0x82112b8, msg=0x18a2c0) at action.c:962
>>> #3  0x08057f48 in run_action_list (a=0x8210d80, msg=0x18a2c0) at action.c:139
>>> #4  0x08057964 in do_action (a=0x8211348, msg=0x18a2c0) at action.c:706
>>> #5  0x08057f48 in run_action_list (a=0x8211348, msg=0x18a2c0) at action.c:139
>>> #6  0x08058250 in run_top_route (a=0x8211348, msg=0x18a2c0) at action.c:119
>>> #7  0x0016e4ce in t_uac (method=0xbff81330, headers=0xbff81340, body=0x0, dialog=0x822b274, cb=0xd353a1 <bye_reply_cb>, cbp=0xb6131374) at uac.c:293
>>> #8  0x0016f1e5 in req_within (method=0xbff81330, headers=0xe984a0, body=0xe984a0, dialog=0x822b274, completion_cb=0xe984a0 <my_ps.1>, cbp=0xe984a0)
>>>     at uac.c:376
>>> #9  0x00d35d5d in dlg_end_dlg (dlg=0xb6131374, extra_hdrs=0x0) at dlg_req_within.c:249
>>> #10 0x00d3668f in mi_terminate_dlg (cmd_tree=0x822b110, param=0x0) at dlg_req_within.c:336
>>> #11 0x0018f32d in mi_datagram_server (rx_sock=10, tx_sock=11) at ../../mi/mi.h:104
>>> #12 0x0019354c in datagram_process (rank=0) at mi_datagram.c:310
>>> #13 0x080b5749 in start_module_procs () at sr_module.c:577
>>> #14 0x0806d711 in main (argc=4, argv=0xbff819a4) at main.c:673
>>>
>>> Regards,
>>> 	MD
>>> -----Messaggio originale-----
>>> Da: Bogdan-Andrei Iancu [mailto:bogdan at voice-system.ro] 
>>> Inviato: venerdì 13 marzo 2009 16:19
>>> A: Mauro Davi'
>>> Cc: devel at lists.opensips.org
>>> Oggetto: Re: [OpenSIPS-Devel] Accounting problem with the internal generated BYE
>>>
>>> Hi Mauro,
>>>
>>> The accounting with flags do not work in local_route (some transaction 
>>> related issue), but the acc_db_request() should work....
>>> For the crash, can you post a backtrace?
>>>
>>> Thanks and regards,
>>> Bogdan
>>>
>>> Mauro Davi' wrote:
>>>   
>>>     
>>>       
>>>> Hi All,
>>>>
>>>> I'm using sipp to the several scenarious, one of this is the missing 
>>>> ACK message at the INVITE response using media proxy.
>>>>
>>>> Sipp don't send the ACK nevertheless the audio stream, so the media 
>>>> proxy send a dlg_end_dlg to the opensips server that hangup the call.
>>>>
>>>> On the local_route route I try to account the BYE message so I'm set 
>>>> the appropriate flag, but opensips don't store anything so I'm force 
>>>> the accouting to store the BYE message using the acc_db_request 
>>>> function, but when the timeout is triggered the opensips server crash L
>>>>
>>>> Below, the source code used in the loacal_route branch:
>>>>
>>>> local_route
>>>>
>>>> {
>>>>
>>>> if (method=="BYE")
>>>>
>>>> {
>>>>
>>>> setflag(25);
>>>>
>>>> setflag(26);
>>>>
>>>> acc_db_request("Internally generated BYE", "acc");
>>>>
>>>> }
>>>>
>>>> }
>>>>
>>>> Regards,
>>>>
>>>> MD
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Devel mailing list
>>>> Devel at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>>>>   
>>>>     
>>>>       
>>>>         
>>>   
>>>     
>>>       
>>   
>>     
>
>
>   




More information about the Devel mailing list