[Asterisk-Users] Asterisk 1.0.9-BRIstuffed-0.2.0-RC8o memory leak when using call files ?

Bruno.Voigt at ic3s.de Bruno.Voigt at ic3s.de
Wed Oct 5 08:10:54 MST 2005


Hi all,

I'm using Asterisk 1.0.9-BRIstuffed-0.2.0-RC8o on box A with a TE410P 
(EuroISDN cpe)
connected to another similar asterisk box B acting as EuroISDN master.

I'm performing some load tests by contiously feeding up to concurrent 30 
call files to /var/spool/asterisk/outgoing/ on box A
which inititate via a dialplan context/extension a outbound call 
(redirected via chan_local) to box b
playing some preexisting wavfiles followed by hangup.

I see a memory growth for the asterisk process from 39M VIRT / 11M RES to 
179M VIRT / 22M RES after 1000 completed calls.

The box B acepting/recording the calls doesnt show such a memory growth 
over time.

Are there known issues about call files / memory growth in asterisk 1.0.9?

The dial construct via chan_local is there to have some additional 
information about the callfile
to be tunneld thru asterisk and to provide direct feedback about the call 
success/failure to the callfile generator process.

TIA for any hints,
Bruno

callfile: TESTT05100514541601721

Channel: Local/TESTT05100514541601721:041234567890 at test-dial
Context: test
Extension: s
Priority: 1
CallerId: 01722270201
MaxRetries: 0
WaitTime: 35
RetryTime: 10
Account: TEST
SetVar: SMID1=TESTT05100514541601
SetVar: SMID2=721
SetVar: SMID3=
SetVar: SMINFO=TESTINFO
SetVar: SMOADC=+491722270201
SetVar: SMADC=+491234567890
SetVar: SMRETRYCNT=3

extensions.conf:
[general]
TRUNKTEST=Zap/r1

[test-dial]
;exten => _TEST.,1,SetCallerPres(prohib)
exten => _TEST.,1,SetCallerPres(allowed)
exten => _TEST.,2,Cut(SMID=EXTEN,:,1)
exten => _TEST.,3,Cut(REALEXTEN=EXTEN,:,2)
exten => _TEST.,4,Dial(${TRUNKTEST}/${REALEXTEN},30,ng)
exten => _TEST.,5,DBPut(DIALTEST/${SMID}/HANGUPCAUSE=${HANGUPCAUSE})
exten => _TEST.,6,DBPut(DIALTESTVOICE/${SMID}/DIALSTATUS=${DIALSTATUS})
exten => _TEST.,105,goto(5)
exten => _TEST.,205,goto(5)

[test]
exten => s,1,SetCDRUserField(ID=${SMID1}${SMID2}${SMID3}\;)
exten => s,2,AppendCDRUserField(ADC=${SMADC}\;)
exten => s,3,AppendCDRUserField(OADC=${SMOADC}\;)
exten => s,4,AppendCDRUserField(INFO=${SMINFO}\;)
exten => s,5,Playback(/opt/gucky/test/intro)
exten => 
s,6,Playback(/opt/gucky/test/pending/${SMID1}${SMID2}${SMID3}-filea)
exten => s,7,Playback(/opt/gucky/test/gap1)
exten => 
s,8,Playback(/opt/gucky/test/pending/${SMID1}${SMID2}${SMID3}-fileb)
exten => s,9,Playback(/opt/gucky/test/gap2)
exten => s,10,Playback(/opt/gucky/test/${SMID1}${SMID2}${SMID3}-filec)
exten => s,11,Hangup


; Hangup during play
exten => h,1,GotoIf($["${CHANNEL}" = "OutgoingSpoolFailed"]?4)
; notify callgenerator about successful accepted call
exten => h,2,TrySystem(rm -f 
/opt/gucky/test/pending/${SMID1}${SMID2}${SMID3}*)
exten => h,3,TrySystem(/bin/echo > 
${CALLGEN_PATH}/done/${SMID1}${SMID2}${SMID3}.SMT)
; do nothing
exten => h,4,NoOp(CHANNEL=${CHANNEL})

; dial attempt failed, have attempt logged as CDR with SM ID, ADC, OADC
exten => failed,1,SetCDRUserField(ID=${SMID1}${SMID2}${SMID3}\;)
exten => failed,2,AppendCDRUserField(ADC=${SMADC}\;)
exten => failed,3,AppendCDRUserField(OADC=${SMOADC}\;)
exten => failed,4,AppendCDRUserField(INFO=${SMINFO}\;)
exten => failed,5,AppendCDRUserField(RETRYCNT=${SMRETRYCNT}\;)
exten => failed,6,AppendCDRUserField(DIALSTATUS=${DIALSTATUS}\;)
; retrieve HANGUPCAUSE,DIALSTATUS stored by -dial context
exten => 
failed,7,DBGet(THANGUPCAUSE=DIALTEST/${SMID1}${SMID2}${SMID3}/HANGUPCAUSE)
exten => failed,8,AppendCDRUserField(HANGUPCAUSE=${THANGUPCAUSE}\;)
exten => failed,108,Goto(9)
exten => 
failed,9,DBGet(TDIALSTATUS=DIALTEST/${SMID1}${SMID2}${SMID3}/DIALSTATUS)
exten => failed,10,AppendCDRUserField(DIALSTATUS=${TDIALSTATUS}\;)
exten => failed,110,Goto(11)
exten => failed,11,DBDeltree(DIALTEST/${SMID1}${SMID2}${SMID3})
; notify callgenerator about failed call
exten => failed,12,SetVar(UPDASTCALL=/bin/echo \"\<DIALSTATUS\>\")
exten => failed,13,SetVar(UPDASTCALL=${UPDASTCALL}${TDIALSTATUS})
exten => 
failed,14,SetVar(UPDASTCALL=${UPDASTCALL}\"\</DIALSTATUS\>\<HANGUPCAUSE\>\")
exten => failed,15,SetVar(UPDASTCALL=${UPDASTCALL}${THANGUPCAUSE})
exten => failed,16,SetVar(UPDASTCALL=${UPDASTCALL}\"\</HANGUPCAUSE\>\")
exten => failed,17,TrySystem(${UPDASTCALL} > 
${CALLGEN_PATH}/fail/${SMID1}${SMID2}${SMID3}.SMT.tmp && /bin/mv 
${CALLGEN_PATH}/fail/${SMID1}${SMID2}${SMID3}.SMT.tmp 
${CALLGEN_PATH}/fail/${SMID1}${SMID2}${SMID3}.SMT)
;





More information about the asterisk-users mailing list