[Freeswitch-users] execute_on_answer problem

Erol Akarsu eakarsu_33 at yahoo.com
Wed Jul 23 18:07:04 PDT 2008


Hi ,

I have started using freeswitch and impressed with it, how easy to set up and run quick examples. It is awesome!

What I do here is I bridge the call between IVR and a remote phone. Then remot eparty pick up the phone and, IVR plays a prompt.  I want the remote user listen all prompt content.

 If we executed these 2 action inside my dialmap extension ,  playback action don't wait until remote end pick up the phone. Therefore, the user misses the beginning part of prompt. 
 <action application="answer"/> 
  <action application="playback" data="/home/eakarsu/kurumcell.g729"/> 
   

Now I started using LUA scripts.  When I execute " originate
sofia/gateway/voipwise/001804XXXYYYY at sip.voipwise.com 1238" from FS
command line, I am getting error and calls dropped. I have attached log
file where 'nua_r_cancel: unknown event 32: 200 Ok" debug statement is
inserted. My dialmap extension and kurumcell.lua script
is here. call is dropped.

I apprecciate if you can guide me on this.


<extension name="kurumcell_test">
      <condition field="destination_number" expression="^1238$">
          <action application="set" data="execute_on_answer=kurumcell.lua"/> 
      </condition>
    </extension>

kurumcell.lua:

-- answer the call
session:answer();

-- play a file
session:streamFile("/home/eakarsu/kurumcell.g729");

-- hangup
session:hangup();


2008-07-23 20:52:25 [DEBUG] switch_core_state_machine.c:140 switch_core_standard_on_execute() sofia/external/0018042489925 at sip.voipwise.com Execute set(execute_on_answer=kurumcell.lua)
2008-07-23 20:52:25 [DEBUG] mod_dptools.c:715 set_function() SET [execute_on_answer]=[kurumcell.lua]
2008-07-23 20:52:25 [NOTICE] switch_core_state_machine.c:157 switch_core_standard_on_execute() Hangup sofia/external/0018042489925 at sip.voipwise.com [CS_EXECUTE] [NORMAL_CLEARING]
2008-07-23 20:52:25 [DEBUG] switch_channel.c:1360 switch_channel_perform_hangup() Kill sofia/external/0018042489925 at sip.voipwise.com [KILL]
2008-07-23 20:52:25 [DEBUG] switch_core_session.c:676 switch_core_session_signal_state_change() Kill sofia/external/0018042489925 at sip.voipwise.com [BREAK]
2008-07-23 20:52:25 [DEBUG] switch_core_state_machine.c:430 switch_core_session_run() (sofia/external/0018042489925 at sip.voipwise.com) State EXECUTE going to sleep
2008-07-23 20:52:25 [DEBUG] switch_core_state_machine.c:365 switch_core_session_run() sofia/external/0018042489925 at sip.voipwise.com Running State Change CS_HANGUP
2008-07-23 20:52:25 [DEBUG] switch_core_state_machine.c:393 switch_core_session_run() (sofia/external/0018042489925 at sip.voipwise.com) State HANGUP
2008-07-23 20:52:25 [DEBUG] mod_sofia.c:264 sofia_on_hangup() Channel sofia/external/0018042489925 at sip.voipwise.com hanging up, cause: NORMAL_CLEARING
2008-07-23 20:52:25 [DEBUG] mod_sofia.c:300 sofia_on_hangup() Sending CANCEL to sofia/external/0018042489925 at sip.voipwise.com
2008-07-23 20:52:25 [DEBUG] switch_core_state_machine.c:46 switch_core_standard_on_hangup() Standard HANGUP sofia/external/0018042489925 at sip.voipwise.com, cause: NORMAL_CLEARING
2008-07-23 20:52:25 [DEBUG] switch_core_state_machine.c:393 switch_core_session_run() (sofia/external/0018042489925 at sip.voipwise.com) State HANGUP going to sleep
2008-07-23 20:52:25 [DEBUG] switch_core_session.c:735 switch_core_session_thread() Session 6 (sofia/external/0018042489925 at sip.voipwise.com) Locked, Waiting on external entities
2008-07-23 20:52:25 [NOTICE] switch_core_session.c:753 switch_core_session_thread() Session 6 (sofia/external/0018042489925 at sip.voipwise.com) Ended
2008-07-23 20:52:25 [NOTICE] switch_core_session.c:755 switch_core_session_thread() Close Channel sofia/external/0018042489925 at sip.voipwise.com [CS_HANGUP]
2008-07-23 20:52:25 [DEBUG] sofia.c:319 sofia_event_callback() nua_r_cancel: unknown event 32: 200 Ok
2008-07-23 20:52:25 [DEBUG] sofia.c:190 sofia_event_callback() event [nua_r_invite] status [487][Request terminated] session: n/a
2008-07-23 20:52:25 [DEBUG] sofia.c:190 sofia_event_callback() event [nua_i_state] status [487][Request terminated] session: n/a



      





More information about the FreeSWITCH-users mailing list