[asterisk-dev] Asterisk 1.6.1.13 crashes in masq_park_call()

Pavel Troller patrol at sinus.cz
Thu Jan 21 09:14:23 CST 2010


Hi!
  Since updating to 1.6.1.13, my Asterisk became to crash ocassionally.
Recompiling without optimisations and further debugging revealed, that the
problem is caused by latest changes to the call parking logic. Especially,
the following code, located around line 801 in main/features.c

        if (!play_announcement && args == &park_args) {
                args->orig_chan_name = ast_strdupa(chan->name);
        }

was changed by replacing chan->name with peer->name, but in my case, this
function is called with peer=0, thus crashing badly.

Reverting just this single change stops crashing and restores full
functionality of my dialplan, which uses parking to prevent premature answer
on FXO gateway line until the called subscriber presses "*" on his phone:

[macro-answer_with_star]
exten => s,1,SetMusicOnHold(ringtone) ; Caller will hear normal ringing tone
exten => s,n,Set(_CALLING_EXTEN=${ARG1}) ; The called number (the variable name is a bit misleading)
exten => s,n,Macro(myproceeding)
exten => s,n,Ringing()
exten => s,n,ParkAndAnnounce(beep,60,Local/aws at aws,aws,2,hang) ; This line was crashing
exten => s,n,Macro(incept,19) ;Clearing the call with CC 19 = timeout

[aws]
exten => aws,1,AGI(ast_helper.agi,"originate ${CALLING_EXTEN} extension ${PARKEDAT}@aws") ; calling the FXO line (will immediately auto-answer)
exten => aws,n,Hangup()

exten => _!,1,Read(char,vm-press&digits/star,1,,16,2)
exten => _!,n,GotoIf($["${char}" != "*"]?hang)
exten => _!,n,Goto(default,${EXTEN},1) ;Going to the parking slot retrieval, thus connecting to the caller (and his call will get answer)
exten => _!,n(hang),Macro(incept,19) ; Timeout

  I know that this usage is rather unusual, but it's working since 1.6.0 days,
so the last change is a regression for me.

With regards, Pavel Troller



More information about the asterisk-dev mailing list