[Asterisk-Users] CHANUNAVAIL = CHANUNAVAIL doesn't eval properly

Matthew Boehm mboehm at cytelcom.com
Fri Oct 15 11:17:38 MST 2004


Here is the relevant dialplan:

 exten => _3XXX,1,Dial(SIP/${EXTEN},15,tr)
 exten => _3XXX,2,Voicemail(u${EXTEN}@cytel)
 exten => _3XXX,102,GotoIf($[${DIALSTATUS}==CHANUNAVAIL]?i,1:103)
 exten => _3XXX,103,Voicemail(b${EXTEN}@cytel)
 exten => i,1,Playback(invalid)
 exten => i,2,Hangup()

What 'should' happen is that if someone dials any extension starting with 3,
Dial attempts to dial it. If there is no such channel, set DIALSTATUS and
goto priority n + 101.  Then check result of DIALSTATUS.  If DIALSTATUS is
equal to CHANUNAVAIL then goto extension 'i' else goto priority 103.

Here is an attempt to dial non-existant extension 3652:

Oct 15 13:10:06 WARNING[1116730816]: chan_sip.c:1384 create_addr: No such
host: 3652
Oct 15 13:10:06 NOTICE[1116730816]: app_dial.c:742 dial_exec: Unable to
create channel of type 'SIP'
  == Everyone is busy/congested at this time
    -- Executing GotoIf("SIP/3044-9a9c",
"CHANUNAVAIL=CHANUNAVAIL?cytel-internal|i|1:103") in new stack
    -- Goto (cytel-internal,3652,103)
    -- Executing VoiceMail("SIP/3044-9a9c", "b3652 at cytel") in new stack
Oct 15 13:10:06 WARNING[1116730816]: app_voicemail.c:1367 leave_voicemail:
No entry in voicemail config file for '3652'

It seems that CHANUNAVAIL does not equal CHANUNAVAIL in this case. This is
incorrect. Any ideas?

Thanks,
Matthew




More information about the asterisk-users mailing list