fxo dont disconnect call

Version 1

    Subject: RE: fxo dont disconnect call
    Replied by: Yaw-Ming Chen on 06-10-2011 10:39:56 AM
    In this case we may want to run debug to see if we receive en_disconnect
    This document was generated from CDN thread

    Created by: Lisandro Quinteros on 05-10-2011 05:18:38 PM
    Hi I am again here when I am lost... I write here because I trust in your experience on tcl...
    I am running a common tcl auto attendant same tcl I have working in many places.. I check the configuration of gateway and couldn´t find any strange..
    When I make a call without service applied on dial-peer .. only the dial-peer with a connection pla opx configured.. when I could from outside through an fxo port.. and the call is disconnected from outside before someone pickups.. the port is release great...
    Then I applied the tcl to the dial-peer and erase connection plar opx I make a call from my cell phone through fxo.. let my ip phone ring. I don¿t pick up and tried to shut down the call from outside.. my cell phone shut down the call great... but the fxo port continue off hook and the Ip phone continue ringing..
    I have been trying lots of thing in the script all ls_ states seem to work.. ls_000 works great.. busy ls_ work find...etc...the only problem is when outside caller disconnect .. the t so I can´t realize what is happening...
     
    This script is working okey In many other locations...I have 3 or 4 tcl script that I usually work with.. I try modified those tcl´s but none works..
    A few years ago I got the same problem but couldn´t remember what was the solution... 
     
    I also try to just put ls_000 ... connect.. and all other ls_status just call close.. but this didn¿t work..
    I just paste you one example of tcl...
     
    Thanks again!
     
     
     
     
     
    proc act_CallSetupDone { } {
        global beep
        set status [infotag get evt_status]
     
        puts "\n Valor del Leg setup es: $status"
     
        if { $status == "ls_006"} {
                    puts "\nLa extension esta ocupada"
                            fsm setstate CALL_AGAIN
                      } elseif { $status == "ls_000" } {
                                    puts "\nConectado"
                      } elseif { $status == "ls_004" || $status == "ls_005" } {
                                    puts "\nDisco un numero invalido"
                                            media play leg_incoming flash:sp_wrong_lang_sel.au
                                            fsm setstate CALL_AGAIN
                       } elseif { $status == "ls_003" || $status == "ls_005" || $status == "ls_006" || $status == "ls_008" || $status == "ls_009"} {
                                            puts "\ Paso la llamada pero tiene problemas al conectarla"
                                            media play leg_incoming flash:sp_dest_unreachable.au
                                            fsm setstate CALLDISCONNECT
                         } elseif { $status == "ls_007"} {
                                            media play leg_incoming flash:sp_dest_busy.au
                                            fsm setstate CALLDISCONNECT
                    } else {
                                    puts "\n Leg setup status [infotag get evt_status]"
                            puts " Cierro la llamada "
                                    puts "\n Incoming leg [infotag get evt_legs]"
                                    call close
                                    }                                         
     
    }      
     
     
     
    proc act_Timer { } {
        global beep
        global incoming
        global outgoing
     
        set incoming [infotag get leg_incoming]
        set outgoing [infotag get leg_outgoing]
     
        if { $beep == 0 } {
            #insert a beep ...to the caller
            connection destroy con_all
            set beep 1
        } else {
            connection destroy con_all
            fsm setstate LASTWARN
        }
    }
     
    proc act_LastWarn { } {
        media play leg_incoming flash:out_of_time.au
    }
     
    proc act_Destroy { } {
        media play leg_incoming flash:beep.au
    }
     
    proc act_Beeped { } {
        global incoming
        global outgoing
     
        connection create $incoming $outgoing          
     
    }
     
    proc act_ConnectedAgain { } {
        timer start leg_timer 1 leg_incoming
    }
     
    proc act_Ignore { } {
        puts "Event Capture"
    }
     
    proc act_Cleanup { } {
        call close
    }
     
    init
     
    #----------------------------------
    #   State Machine
    #----------------------------------
     
      set fsm(any_state,ev_disconnected)  "act_Cleanup              same_state"
     
      set fsm(CALL_INIT,ev_setup_indication) "act_Setup            GETDEST"
     
      set fsm(GETDEST,ev_collectdigits_done)  "act_GotDest          PLACECALL"
     
      set fsm(PLACECALL,ev_setup_done)    "act_CallSetupDone    CALLACTIVE"
     
      set fsm(CALL_AGAIN,ev_media_done) "act_collect_again            GETDEST_AGAIN"
     
      set fsm(GETDEST_AGAIN,ev_collectdigits_done)  "act_GotDest_again          PLACECALL"
     
      set fsm(CALLACTIVE,ev_disconnected)   "act_Cleanup            CALLDISCONNECT"
     
      set fsm(CALLDISCONNECT,ev_disconnected)   "act_Cleanup                same_state"          
     
     
      set fsm(CALLDISCONNECT,ev_media_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"
     
      fsm define fsm CALL_INIT

    Subject: RE: fxo dont disconnect call
    Replied by: Lisandro Quinteros on 06-10-2011 12:55:00 PM
    I have used many debugs commands.. which one do you recommend me??? as I could see i don´t receive the en_disconnect until I pick up the phone that is still ringing.. when i hook off the phone I see more debug and receive the tone.. and sometimes when I close the call from the caller.. I see 1 new missed call in the ip phone but it continue ringing..
    also also see a battery reverse warning about possible changed pair of wire.. could that be the problem??

    Subject: RE: fxo dont disconnect call
    Replied by: Yaw-Ming Chen on 06-10-2011 01:44:06 PM
    If you say it's working fine in some place then I will say probably script is fine, it's more related to HW/configuration ...etc.