[cisco-voip] media record media play ... no song

Schweizer Laurent laurent.schweizer at eivd.ch
Wed May 4 16:10:39 EDT 2005


 

Hello i try to record a stream (to convert g711 wav file  to g729 ) and then
to play them. The file is correctly recoded (  I think because the file is
created)  but when i play it I do not have any song

 

 

proc act_Setup { } {

 

      global tftp

      set tftp tftp://tftp.spadatel.org/coucou2

      timer start leg_timer 4 leg_incoming 

leg setupack leg_incoming

leg alert leg_incoming -s 1 

}

 

proc act_Connect { } {

      puts "\n connect"

leg connect leg_incoming

timer start leg_timer 1 leg_incoming 

}

 

proc act_Record { } { 

 

      global tftp

      puts "\n start record"

      #set audio_file tftp://tftp.spadatel.org/prompts/en/en_and.au

      #media play leg_incoming $audio_file

set recordInfo(codec) g711ulaw

#g729r8

set recordInfo(fileFormat) au

set recordInfo(beep) nobeep 

set recordInfo(finalSilence) 0

set recordInfo(dtmfTerm) enable

set recordInfo(maxDuration) 20000 

media record leg_incoming  -p recordInfo $tftp

} 

 

 

proc act_Play { } { 

      global tftp

      puts "\n start play"

      media play leg_incoming $tftp

}

 

 

proc act_ConnectionDestroy { } {

      puts "\t\t******* act_ConnectionDestroy
-------------------------------------\n"

      puts "\t\t******* act_ConnectionDestroy \n"

      global disconnect_cause

      set disconnect_cause [infotag get evt_last_disconnect_cause]

leg disconnect leg_incoming -c 016

call close

}

 

 

 

proc act_Cleanup { } {

      puts "\t\t******* Cleanup -------------------------------------\n"

      call close

 

}

 

 

 

requiredversion 2.0

 

 

 

#----------------------------------

 

#   State Machine

 

#----------------------------------

 

  

  set fsm(CALL_INIT,ev_setup_indication)       "act_Setup             RING"

  set fsm(RING,ev_leg_timer)         "act_Connect       WAIT"

  set fsm(WAIT,ev_leg_timer)         "act_Record       RECORD"

  set fsm(RECORD,ev_media_done)        "act_Play            PLAY" 

  set fsm(RECORD,ev_recorder)    "act_Play            PLAY"

  set fsm(CALLDISCONNECT,ev_disconnected)      "act_Cleanup same_state"

  set fsm(CALLDISCONNECT,ev_destroy_done)      "act_Cleanup same_state"

  set fsm(CALLDISCONNECT,ev_disconnect_done)   "act_Cleanup same_state"

  set fsm(CALLDISCONNECT,ev_leg_timer)         "act_Cleanup same_state"

  set fsm(CALLDISCONNECT,ev_authorize_done)         "act_Cleanup
same_state"

  set fsm(any_state,ev_disconnected)           "act_Cleanup
same_state" 

  fsm define fsm CALL_INIT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://puck.nether.net/pipermail/cisco-voip/attachments/20050504/7a9a44e8/attachment-0001.html


More information about the cisco-voip mailing list