diff options
author | Michael Geddes <openwrt@frog.wheelycreek.net> | 2009-01-17 12:22:46 +0000 |
---|---|---|
committer | Michael Geddes <openwrt@frog.wheelycreek.net> | 2009-01-17 12:22:46 +0000 |
commit | 77e992e78cc2dc03dfa891d67d4fe55db184250b (patch) | |
tree | 157635f0eff9f58d4a3019c63ba959f6ab6b6d2d /contrib | |
parent | 1df66e6fae7aab01564e133dc7327f9b16c21380 (diff) |
Generate context for adding callerid name with proper sequences.
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/package/asterisk-xip/files/uci/sipiaxconf | 12 |
1 files changed, 8 insertions, 4 deletions
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 } |