Matthew Boehm
2004-Oct-15 11:17 UTC
[Asterisk-Users] CHANUNAVAIL = CHANUNAVAIL doesn't eval properly
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@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
Eric Wieling
2004-Oct-15 11:28 UTC
[Asterisk-Users] CHANUNAVAIL = CHANUNAVAIL doesn't eval properly
exten => _3XXX,102,GotoIf($[${DIALSTATUS} = CHANUNAVAIL]?i,1:103)
Matthew Boehm wrote:> 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@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
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eric.vcf
Type: text/x-vcard
Size: 146 bytes
Desc: not available
Url :
http://lists.digium.com/pipermail/asterisk-users/attachments/20041015/b6ac4ad6/eric.vcf
Tobias Jönsson
2004-Oct-18 08:57 UTC
[Asterisk-Users] CHANUNAVAIL = CHANUNAVAIL doesn't eval properly
On Fri, 15 Oct 2004, Matthew Boehm wrote:> 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.Why don't you just use the bristuff package? There is a Dial application which goes to n+201 if channel is unavailable. -- Regards, Tobias J?nsson, Lund SE