From: Michael Geddes Date: Sat, 17 Jan 2009 12:22:46 +0000 (+0000) Subject: Generate context for adding callerid name with proper sequences. X-Git-Tag: 0.9.0~781 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=77e992e78cc2dc03dfa891d67d4fe55db184250b;p=oweals%2Fluci.git Generate context for adding callerid name with proper sequences. --- diff --git a/contrib/package/asterisk-xip/files/uci/sipiaxconf b/contrib/package/asterisk-xip/files/uci/sipiaxconf index 6074086d1..ab2e8fc47 100755 --- a/contrib/package/asterisk-xip/files/uci/sipiaxconf +++ b/contrib/package/asterisk-xip/files/uci/sipiaxconf @@ -44,12 +44,16 @@ append_dialplan_locals(){ # add_dialplan_include ${newcontext} ${x_last_context} append_dialplan_context ${newcontext} "exten => ${match_all},1,Set(CALLERID(num)=${extension})" - [ -z "${x_displayname}" ] || append_dialplan_context ${newcontext} "exten => ${match_all},1,Set(CALLERID(name)=${x_displayname})" + local next=2 + if [ ! -z "${x_displayname}" ] ; then + append_dialplan_context ${newcontext} "exten => ${match_all},2,Set(CALLERID(name)=${x_displayname})" + local next=3 + fi if [ ! -z "${x_mailbox}" ] ; then - [ "${x_selfmailbox}" = "yes" ] && append_dialplan_context ${newcontext} "exten => ${extension},2,VoiceMailMain(${x_mailbox})" - [ ! -z "${dialplan_voiceboxext}" ] && append_dialplan_context ${newcontext} "exten => ${dialplan_voiceboxext},2,VoiceMailMain(${x_mailbox})" + [ "${x_selfmailbox}" = "yes" ] && append_dialplan_context ${newcontext} "exten => ${extension},${next},VoiceMailMain(${x_mailbox})" + [ ! -z "${dialplan_voiceboxext}" ] && append_dialplan_context ${newcontext} "exten => ${dialplan_voiceboxext},${next},VoiceMailMain(${x_mailbox})" fi - append_dialplan_context ${newcontext} "exten => ${match_all},2,Goto(${x_context},\${EXTEN},1)" + append_dialplan_context ${newcontext} "exten => ${match_all},${next},Goto(${x_context},\${EXTEN},1)" fi done }