[Freeswitch-dev] call is dropped after answer

Francisco Scaramanga scaram at hotmail.de
Sun Oct 4 12:18:45 PDT 2009


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
002 at 192.168.1.33!
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/1002 at 192.168.1.33 [CS_EXECUTE] [NORMAL_CLEARING]
2009-10-04 21:13:08.229000 [NOTICE] switch_core_session.c:1087 Session 1 (sofia/
internal/1002 at 192.168.1.33) Ended
2009-10-04 21:13:08.229000 [NOTICE] switch_core_session.c:1089 Close Channel sof
ia/internal/1002 at 192.168.1.33 [CS_DESTROY]

 


 
 		 	   		  
_________________________________________________________________
http://redirect.gimas.net/?n=M0910xHotmail2
Neu, Besser, Hotmail - Die neuen Features sind da!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20091004/17aff6bc/attachment.html 


More information about the FreeSWITCH-dev mailing list