From a19b51ef8e3518d8abf4f274c6c3e4f8f9767663 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Mon, 25 Nov 2024 22:23:34 -0500 Subject: [PATCH] [asterisk] Remove unused sip.conf --- roles/asterisk/tasks/main.yml | 5 - roles/asterisk/templates/extensions.conf.j2 | 6 +- roles/asterisk/templates/pjsip.conf.j2 | 3 + roles/asterisk/templates/sip.conf.j2 | 120 ------------------ .../files/tftpboot/SEP00CCFC4B5DE1.cnf.xml | 2 +- 5 files changed, 8 insertions(+), 128 deletions(-) delete mode 100644 roles/asterisk/templates/sip.conf.j2 diff --git a/roles/asterisk/tasks/main.yml b/roles/asterisk/tasks/main.yml index 624d33b..9db2b24 100644 --- a/roles/asterisk/tasks/main.yml +++ b/roles/asterisk/tasks/main.yml @@ -3,11 +3,6 @@ src: extensions.conf.j2 dest: /etc/asterisk/extensions.conf notify: reload dialplan -- name: Configure SIP devices - template: - src: sip.conf.j2 - dest: /etc/asterisk/sip.conf - notify: reload sip - name: Configure SIP clients template: src: pjsip.conf.j2 diff --git a/roles/asterisk/templates/extensions.conf.j2 b/roles/asterisk/templates/extensions.conf.j2 index ac06bc5..77fe3a2 100644 --- a/roles/asterisk/templates/extensions.conf.j2 +++ b/roles/asterisk/templates/extensions.conf.j2 @@ -6,9 +6,11 @@ exten => 700,1,Answer() same = n,Playback(tt-monkeys) same = n,Hangup() -; 3-digit extensions dial their associated devices +3-digit extensions dial their associated devices exten => _XXX,1,Dial(PJSIP/${EXTEN}, 15) - same = n,Voicemail(${EXTEN}@sailmaker) + same = n,Set(MAILBOXES=${PJSIP_ENDPOINT(${EXTEN},mailboxes)}) + same = n,ExecIf($[${LEN(${MAILBOXES})} = 0]?Congestion(10)) + same = n,Voicemail(${MAILBOXES}) same = n,Playback(vm-goodbye) same = n,Hangup() diff --git a/roles/asterisk/templates/pjsip.conf.j2 b/roles/asterisk/templates/pjsip.conf.j2 index f058f2b..aba2a4c 100644 --- a/roles/asterisk/templates/pjsip.conf.j2 +++ b/roles/asterisk/templates/pjsip.conf.j2 @@ -15,6 +15,7 @@ disallow=all allow=ulaw auth=100 aors=100 +mailboxes=100@sailmaker [100] type=auth @@ -37,6 +38,7 @@ disallow=all allow=ulaw auth=101 aors=101 +mailboxes=100@sailmaker [101] type=auth @@ -55,6 +57,7 @@ disallow=all allow=ulaw auth=102 aors=102 +mailboxes=100@sailmaker [102] type=auth diff --git a/roles/asterisk/templates/sip.conf.j2 b/roles/asterisk/templates/sip.conf.j2 deleted file mode 100644 index 8431d2c..0000000 --- a/roles/asterisk/templates/sip.conf.j2 +++ /dev/null @@ -1,120 +0,0 @@ -[extension](!) -type=friend -context=extensions -host=dynamic -trustrpid=no -parkinglot=default -allowsubscribe=yes -notifyhold=no -callcounter=yes -videosupport=no -disallow=all -allow=g722,ulaw,alaw,g729 - -[cisco-usecallmanager](!,extension) -transport=tcp -nat=no -directmedia=no -sendrpid=rpid -rpid_update=yes -rpid_immediate=yes -send_diversion=yes -dndbusy=yes -cisco_usecallmanager=yes -cisco_pickupnotify_alert=from,to -cisco_pickupnotify_timer=5 -cisco_keep_conference=no -cisco_multiadmin_conference=yes -huntgroup_default=no - -[general] -; Only the following ciphers are supported, phone may fail to connect if others are specified -tlscipher=ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA -; NULL cipher is only needed if you are using Authenticated mode, otherwise is should not be enabled -;tlscipher+=:NULL - -[non-secure-mode](!) -transport=tcp - -[authenticated-mode](!) -transport=tls - -[encrypted-mode](!) -transport=tls -; The res_srtp module must be loaded. -encryption=yes -encryption_taglen=80 - -[cisco-7941](!,cisco-usecallmanager) -; These should match and in SEPMAC.cnf.xml -busylevel=3 -call-limit=4 -; Force huntgroup login so that the prompt does not show the logged out message -huntgroup_default=yes - -[cisco-8841](!,cisco-usecallmanager) -busylevel=4 -call-limit=5 - -[cisco-8865](!,cisco-usecallmanager) -busylevel=4 -call-limit=5 -; also needs to be enabled in SEPMAC.cnf.xml -videosupport=yes -; Allow the video codec -allow=h264 - -[cisco-9951](!,cisco-usecallmanager) -busylevel=5 -call-limit=6 -; also needs to be enabled in SEPMAC.cnf.xml -videosupport=yes -; Allow the video codec -allow=h264 - -[100](cisco-8841,non-secure-mode) -secret=mJzTGkXdh02OVXGOaxcH8V3To -callerid="Correl" <100> -description=Correl -callgroup=1 -pickupgroup=1 -mailbox=100@sailmaker -; Extensions that the phone is watching, they need to be configured in SEPMAC.cnf.xml as well -; subscribe=301 -; subscribe=303 -; subscribe=381 - -[101](extension) -secret=5KVzU5Ez77lIIv4SAyzDOnMWo -callerid="Correl" <101> -description=Correl -callgroup=1 -pickupgroup=1 -mailbox=100@sailmaker -; Extensions that the phone is watching, they need to be configured in SEPMAC.cnf.xml as well -; subscribe=301 -; subscribe=303 -; subscribe=381 - -[102](extension) -secret=mpHoQ29k2AiH4EN7IXL9vnE9j -callerid="Conference" <102> -description=Conference -callgroup=1 -pickupgroup=1 -mailbox=100@sailmaker -; Extensions that the phone is watching, they need to be configured in SEPMAC.cnf.xml as well -; subscribe=301 -; subscribe=303 -; subscribe=381 - -[pstn] -type=friend -host=dynamic -context=incoming -secret=wiUxqCvXIPPGexXj3y0htFRho -callerid="PSTN" -description=PSTN -callgroup=1 -pickupgroup=1 -mailbox=pstn@default diff --git a/roles/phone-provisioning/files/tftpboot/SEP00CCFC4B5DE1.cnf.xml b/roles/phone-provisioning/files/tftpboot/SEP00CCFC4B5DE1.cnf.xml index e9081d2..4379e3f 100644 --- a/roles/phone-provisioning/files/tftpboot/SEP00CCFC4B5DE1.cnf.xml +++ b/roles/phone-provisioning/files/tftpboot/SEP00CCFC4B5DE1.cnf.xml @@ -136,7 +136,7 @@ false 3 0 - + *100 4 5