asterisk : notifications d'appels + reload adéquats
[progfou.git] / voip / asterisk-update.sh
index 2913fd5..edad35a 100755 (executable)
@@ -56,6 +56,7 @@ secret=${SECRET}
 host=dynamic
 context=AUF
 call-limit=10
+;busy-level=1
 nat=no
 disallow=all
 allow=ulaw
@@ -69,11 +70,14 @@ __EOF__
   cat >> extensions.local.auto << __EOF__
 ${COMMENTCHAR} ${FULLNAME}
 exten => ${EXTEN},1,Macro(AUFDial,${USERNAME})
-exten => ${USERNAME},1,Goto(${EXTEN},1)
+exten => ${EXTEN},hint,SIP/${USERNAME}&IAX2/${USERNAME}
+exten => ${USERNAME},1,Macro(AUFDial,${USERNAME})
+exten => ${USERNAME},hint,SIP/${USERNAME}&IAX2/${USERNAME}
 __EOF__
   if [ -n "${LOCALPREFIX}" ] ; then
     cat >> extensions.local.auto << __EOF__
 exten => ${LOCALPREFIX}${EXTEN},1,Macro(AUFDial,${USERNAME})
+exten => ${LOCALPREFIX}${EXTEN},hint,SIP/${USERNAME}&IAX2/${USERNAME}
 __EOF__
   fi
 
@@ -83,4 +87,7 @@ ${LOCALPREFIX}${EXTEN} => -${VOICEMAILCODE},${CIDNAME},${USERNAME}@auf.org
 __EOF__
 done
 
-rasterisk -x reload
+rasterisk -x "iax2 reload"
+rasterisk -x "sip reload"
+rasterisk -x "dialplan reload"
+rasterisk -x "module reload app_voicemail.so"