[Freeswitch-dev] trouble on how to remove the media bug from the session after the sessions are closed

Han Xin xin at ind.rwth-aachen.de
Thu Oct 13 11:19:13 MSD 2011


 yes I use a custom mod and the latest git on Oct 10 but I did not use the function "switch_core_session_locate".
 
----------------ursprüngliche Nachricht-----------------
Von: "Anthony Minessale" anthony.minessale at gmail.com 
An: freeswitch-dev at lists.freeswitch.org 
Datum: Wed, 12 Oct 2011 17:06:41 -0500
-------------------------------------------------
 
 
> looks like you have some custom mods maybe you used
> switch_core_session_locate and did not rwunlock it?
> are you using latest GIT ?
> 
> 
> On Mon, Oct 10, 2011 at 11:03 AM, Han Xin xin at ind.rwth-aachen.de wrote:
>> yes, I use the SWITCH_ABC_TYPE_CLOSE type and I've found the media bugs are 
>> automatically removed with the DEBUG log infomation. Now the problem is the 
>> session ending.
>>
>> Detailed situation description: I added two media bugs to both local session 
>> and remote session of one call. When I ended the call, the media bugs are removed 
>> first, and then the session should be ended. But only the local session is ended 
>> correctly.
>> When I press F3 and F4 to show current channels and calls, the remote channel 
>> and call info is till there. But when I try to dump uuid to get channel infomation 
>> with the cmd "uuid_dump remote_session_uuid", it says there is no such 
>> channel!
>>
>> here is some related log info:
>>
>> 2011-10-10 17:36:41.428463 [ERR] mod_bwe.c:345 
>> 28b3a542-aecd-4b9b-9f55-3c2674a25b5c: Remove local variable store!
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_ivr_bridge.c:1332 
>> sofia/internal/sip:1001 at 137.226.198.252 :5060 skip receive message 
>> [UNBRIDGE] (channel is hungup already)
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_ivr_bridge.c:1335 
>> sofia/internal/1000 at asterisk skip receive message [UNBRIDGE] (channel is 
>> hungup already)
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_media_bug.c:480 
>> Removing BUG from sofia/internal/sip:1001 at 137.226.198.252 :5060
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:602 
>> (sofia/internal/sip:1001 at 137.226.198.252 :5060) State HANGUP
>> 2011-10-10 17:36:41.428463 [DEBUG] mod_sofia.c:454 
>> sofia/internal/sip:1001 at 137.226.198.252 :5060 Overriding SIP cause 480 
>> with 200 from the other leg
>> 2011-10-10 17:36:41.428463 [DEBUG] mod_sofia.c:460 Channel 
>> sofia/internal/sip:1001 at 137.226.198.252 :5060 hanging up, cause: 
>> NORMAL_CLEARING
>> 2011-10-10 17:36:41.428463 [DEBUG] mod_sofia.c:503 Sending BYE to 
>> sofia/internal/sip:1001 at 137.226.198.252 :5060
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_session.c:2235 
>> sofia/internal/1000 at asterisk skip receive message 
>> [APPLICATION_EXEC_COMPLETE] (channel is hungup already)
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:417 
>> (sofia/internal/1000 at asterisk ) State EXECUTE going to sleep
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:362 
>> (sofia/internal/1000 at asterisk ) Running State Change CS_HANGUP
>> 2011-10-10 17:36:41.428463 [ERR] mod_bwe.c:345 
>> 713d5f0c-4341-47ec-b0bf-4b14bd6b4726: Remove local variable store!
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_media_bug.c:480 
>> Removing BUG from sofia/internal/1000 at asterisk 
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:602 
>> (sofia/internal/1000 at asterisk ) State HANGUP
>> 2011-10-10 17:36:41.428463 [DEBUG] mod_sofia.c:454 
>> sofia/internal/1000 at asterisk Overriding SIP cause 480 with 200 from the 
>> other leg
>> 2011-10-10 17:36:41.428463 [DEBUG] mod_sofia.c:460 Channel 
>> sofia/internal/1000 at asterisk hanging up, cause: NORMAL_CLEARING
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:47 
>> sofia/internal/1000 at asterisk Standard HANGUP, cause: NORMAL_CLEARING
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:47 
>> sofia/internal/sip:1001 at 137.226.198.252 :5060 Standard HANGUP, cause: 
>> NORMAL_CLEARING
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:602 
>> (sofia/internal/sip:1001 at 137.226.198.252 :5060) State HANGUP going to 
>> sleep
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:393 
>> (sofia/internal/sip:1001 at 137.226.198.252 :5060) State Change CS_HANGUP 
>> -> CS_REPORTING
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_session.c:1177 Send 
>> signal sofia/internal/sip:1001 at 137.226.198.252 :5060 [BREAK]
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:362 
>> (sofia/internal/sip:1001 at 137.226.198.252 :5060) Running State Change 
>> CS_REPORTING
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:662 
>> (sofia/internal/sip:1001 at 137.226.198.252 :5060) State REPORTING
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:79 
>> sofia/internal/sip:1001 at 137.226.198.252 :5060 Standard REPORTING, 
>> cause: NORMAL_CLEARING
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:662 
>> (sofia/internal/sip:1001 at 137.226.198.252 :5060) State REPORTING going 
>> to sleep
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:387 
>> (sofia/internal/sip:1001 at 137.226.198.252 :5060) State Change 
>> CS_REPORTING -> CS_DESTROY
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_session.c:1177 Send 
>> signal sofia/internal/sip:1001 at 137.226.198.252 :5060 [BREAK]
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_session.c:1351 Session 
>> 8 (sofia/internal/sip:1001 at 137.226.198.252 :5060) Locked, Waiting on 
>> external entities
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:602 
>> (sofia/internal/1000 at asterisk ) State HANGUP going to sleep
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:393 
>> (sofia/internal/1000 at asterisk ) State Change CS_HANGUP -> CS_REPORTING
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_session.c:1177 Send 
>> signal sofia/internal/1000 at asterisk [BREAK]
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:362 
>> (sofia/internal/1000 at asterisk ) Running State Change CS_REPORTING
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:662 
>> (sofia/internal/1000 at asterisk ) State REPORTING
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:79 
>> sofia/internal/1000 at asterisk Standard REPORTING, cause: 
>> NORMAL_CLEARING
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:662 
>> (sofia/internal/1000 at asterisk ) State REPORTING going to sleep
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:387 
>> (sofia/internal/1000 at asterisk ) State Change CS_REPORTING -> CS_DESTROY
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_session.c:1177 Send 
>> signal sofia/internal/1000 at asterisk [BREAK]
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_session.c:1351 Session 
>> 7 (sofia/internal/1000 at asterisk ) Locked, Waiting on external entities
>> 2011-10-10 17:36:41.428463 [NOTICE] switch_core_session.c:1369 
>> Session 7 (sofia/internal/1000 at asterisk ) Ended
>> 2011-10-10 17:36:41.428463 [NOTICE] switch_core_session.c:1371 Close 
>> Channel sofia/internal/1000 at asterisk [CS_DESTROY]
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:491 
>> (sofia/internal/1000 at asterisk ) Callstate Change HANGUP -> DOWN
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:494 
>> (sofia/internal/1000 at asterisk ) Running State Change CS_DESTROY
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:504 
>> (sofia/internal/1000 at asterisk ) State DESTROY
>> 2011-10-10 17:36:41.428463 [DEBUG] mod_sofia.c:365 
>> sofia/internal/1000 at asterisk SOFIA DESTROY
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:86 
>> sofia/internal/1000 at asterisk Standard DESTROY
>> 2011-10-10 17:36:41.428463 [DEBUG] switch_core_state_machine.c:504 
>> (sofia/internal/1000 at asterisk ) State DESTROY going to sleep
>>
>> Could anyone give me some hints why the remote session is not ended 
>> automatically?
>>
>>
>> ----------------ursprüngliche Nachricht-----------------
>> Von: "Anthony Minessale" anthony.minessale at gmail.com 
>> An: freeswitch-dev at lists.freeswitch.org 
>> Datum: Mon, 10 Oct 2011 10:17:36 -0500
>> -------------------------------------------------
>>
>>
>>> it calls the callback with type set to SWITCH_ABC_TYPE_CLOSE
>>>
>>> On Wed, Oct 5, 2011 at 7:37 PM, Vu Quang Hoa vutamhoan at gmail.com wrote:
>>>> As I tested - FS automatically removes bug when call ends.
>>>> I'm trying to figure out if it does the same with allocated resources 
>>>> in
>>>> add_bug routine.
>>>>
>>>> On Tue, Oct 4, 2011 at 7:03 PM, Han Xin xin at ind.rwth-aachen.de wrote:
>>>>>
>>>>> Hello everyone!
>>>>>
>>>>> I am new to Freeswitch and try to add media bugs such as digital 
>>>>> signal
>>>>> processing to the read stream and write stream. But I have some 
>>>>> trouble on
>>>>> how to remove the media bug from the session after the sessions are
>>>>> closed.
>>>>> I tried to look into other existed modules such as mod_soundtouch 
>>>>> and
>>>>> mod_dptools to find a solution, the former mod_soundtouch put 
>>>>> the
>>>>> function
>>>>> "switch_core_media_bug_remove()" in the beginning of 
>>>>> application
>>>>> run
>>>>> function. The latter mod use a single app called "remove bugs" and 
>>>>> put
>>>>> this
>>>>> app in the dial plan to remove the bugs.
>>>>>
>>>>> The question is where should I put this
>>>>> "switch_core_media_bug_remove()"
>>>>> function after the sessions are closed.
>>>>> Is there a way to automatically remove a media bug when a call is 
>>>>> ended?
>>>>> Or it is only possible to use a single app to remove the media bugs as 
>>>>> in
>>>>> the mod_dptools?
>>>>>
>>>>> Thank you all in advance!
>>>>>
>>>>> --
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>>>>> http://www.cluecon.com 877-7-4ACLUE
>>>>>
>>>>> FreeSWITCH-dev mailing list
>>>>> FreeSWITCH-dev at lists.freeswitch.org 
>>>>> 
>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>>>>>
>>>>> 
>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/free
>>>>> swit
>>>>> ch-dev
>>>>> http://www.freeswitch.org
>>>>
>>>>
>>>> _______________________________________________
>>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>>>> http://www.cluecon.com 877-7-4ACLUE
>>>>
>>>> FreeSWITCH-dev mailing list
>>>> FreeSWITCH-dev at lists.freeswitch.org 
>>>> 
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>>>>
>>>> 
>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freesw
>>>> itch
>>>> -dev
>>>> http://www.freeswitch.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Anthony Minessale II
>>>
>>> FreeSWITCH http://www.freeswitch.org/
>>> ClueCon http://www.cluecon.com/
>>> Twitter: http://twitter.com/FreeSWITCH_wire
>>>
>>> AIM: anthm
>>> MSN:anthony_minessale at hotmail.com 
>>> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com 
>>> IRC: irc.freenode.net #freeswitch
>>>
>>> FreeSWITCH Developer Conference
>>> sip:888 at conference.freeswitch.org 
>>> googletalk:conf+888 at conference.freeswitch.org 
>>> pstn:+19193869900
>>>
>>> _______________________________________________
>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>>> http://www.cluecon.com 877-7-4ACLUE
>>>
>>> FreeSWITCH-dev mailing list
>>> FreeSWITCH-dev at lists.freeswitch.org 
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>>>
>>> 
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswit
>>> ch-d
>>> ev
>>> http://www.freeswitch.org
>>>
>>
>> --
>>
>>
>>
>>
>> _______________________________________________
>> Join us at ClueCon 2011, Aug 9-11, Chicago
>> http://www.cluecon.com 877-7-4ACLUE
>>
>> FreeSWITCH-dev mailing list
>> FreeSWITCH-dev at lists.freeswitch.org 
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> 
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch
>> -dev
>> http://www.freeswitch.org
>>
> 
> 
> 
> -- 
> Anthony Minessale II
> 
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
> Twitter: http://twitter.com/FreeSWITCH_wire
> 
> AIM: anthm
> MSN:anthony_minessale at hotmail.com 
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com 
> IRC: irc.freenode.net #freeswitch
> 
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org 
> googletalk:conf+888 at conference.freeswitch.org 
> pstn:+19193869900
> 
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
> 
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org 
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> 
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-d
> ev
> http://www.freeswitch.org
> 

-- 

 




Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list