Can't record files over two minutes?

Hi All,

I’m having a problem recording files over two minutes from a phone. The system works perfectly from the X-lite soft-phone, but, when I try to record from a standard phone, the system hangs up after two minutes. I’ve attached the part of the code that actually calls the record file function in asterisk. It’s written in python.

Given that the code works with the soft-phone, there must be some setting that I must adjust in order to allow the phone to record longer than two minutes. Does this sound familiar to anyone?

Thanks for the help!

Record Function

def recordFile (fname, stopDigits, timeout, silenceTimeout):
    Records a file to the local disk.
    fname is the name of the file to record (minus .wav)
    stopDigits are keys that stop recording (not returned)
    timeout is the total time allowed for the recording in seconds
    silenceTimout is the silence time before the recording ends
    automatically in seconds
    ms_timeout = -1 #int(timeout*1000)
    seconds_silenceTimeout = -1 #int(silenceTimeout)
    cmdString = "RECORD FILE %s wav %s %s BEEP s=%d\n" % (fname, \
                                                          stopDigits, \
                                                          ms_timeout, \
    result = sys.stdin.readline().strip()
    result = checkresult(result)
    return result


exten => 1234,1,Answer()
exten => 1234,n,Wait(1)
exten => 1234,n,Verbose(INITIATING SIP CALL)
exten => 1234,n,Wait(1)
exten => 1234,n,AGI(
exten => 1234,n,Hangup()

exten => s,1,Answer()
exten => s,n,Wait(1)
exten => s,n,Verbose(Before AGI call)
exten => s,n,AGI(
exten => s,n,Verbose(After AGI call)
exten => s,n,Hangup()