There are all kinds of things you can do, depends on what you want to do. If you want to keep it alive you need to not return from that function. You should be doing something to service the audio on the channel or put it in park.

Mike

On Oct 4, 2009, at 5:43 PM, Francisco Scaramanga wrote:


okay, I added an application <action application="playback" .../> to the dialplan and the call is not dropped anymore.

But what if I just want the call kept alive by my application mod_skel?

Do I have to change the channel status for that?
From: [email protected]
Date: Sun, 4 Oct 2009 17:13:55 -0400
To: [email protected]
Subject: Re: [Freeswitch-dev] call is dropped after answer

It is hanging up because it has nothing left to do in the dialplan. Add more applications after it or do more in your function.


Mike

On Oct 4, 2009, at 3:18 PM, Francisco Scaramanga wrote:

I wrote my own new FreeSwitch module "mod_skel" and successfully created an application interface with:

SWITCH_ADD_APP(app_interface, "my_mod_skel", "Modul skel", "test", mod_skel_function, "no Syntax", SAF_NONE);

The dialplan is

 <extension name="sip_test">
  <condition field="destination_number" expression="^54322$">
      <action application="my_mod_skel" data=""/>
    </condition>
 </extension>

In the function mod_skel_function I do the following to answer the call.

SWITCH_STANDARD_APP(mod_skel_function)
{
 switch_channel_t *channel = switch_core_session_get_channel(session);
 switch_channel_clear_flag(channel, CF_PROXY_MEDIA);
 switch_channel_clear_flag(channel, CF_PROXY_MODE);
 switch_channel_answer(channel);
}

The problem is that sofia hungs up immediatley (see logfile below).

How can I keep the call alive?
How can I pick up a new incoming call and start a conference?


2009-10-04 21:13:01.827000 [NOTICE] mod_sofia.c:1503 Pre-Answer sofia/internal/1
[email protected]!
2009-10-04 21:13:06.795000 [NOTICE] mod_skel.c:121 Channel [sofia/ internal/1002@
192.168.1.33] has been answered
2009-10-04 21:13:06.803000 [NOTICE] switch_core_state_machine.c:179 Hangup sofia
/internal/[email protected] [CS_EXECUTE] [NORMAL_CLEARING]
2009-10-04 21:13:08.229000 [NOTICE] switch_core_session.c:1087 Session 1 (sofia/
internal/[email protected]) Ended
2009-10-04 21:13:08.229000 [NOTICE] switch_core_session.c:1089 Close Channel sof
ia/internal/[email protected] [CS_DESTROY]

_______________________________________________
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org

Reply via email to