Copyright (C) 2008-2021 Oliver Bohlen.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU Free Documentation License".
This documentation comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
This will show how you can setup an Voice over IP (VoIP) phonebox
If you want to use this solution you need the following howto(s) finished:
emerge net-misc/asterisk
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/asterisk/ari.conf
Changed on 07.09.17SIP Phone and Provider settings
enabled = yes ; When set to no, ARI support is disabled.After change
enabled = no
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/asterisk/extensions.conf.ok
Changed on 07.09.17Call routing / Action plans
; General settings [general] static=yes writeprotect=no [local] ; Internal calls ^3[0-9]$ exten => _3X,1,NoOp(${CALLERID}) exten => _3X,n,Dial(SIP/${EXTEN},120) exten => _3X,n,Hangup [1und1_out] ; local area code calls exten => _ZX.,1,NoOp(${CALLERID}) ; Optional: look up in the Horde addressbook for the caller name exten => _ZX.,n,Set(CALLNAME=${SHELL(/etc/asterisk/hordelookup.sh ${CALLERID(dnid)})}) ; Optional: Notify outgoing call per eMail exten => _ZX.,n,System(echo "`date`: ${CALLERID(all)} ruft ${CALLNAME} <${CALLERID(dnid)}> an!" | mail -s "Telefonat nach draußen ${CALLERID(all)} -> ${CALLERID(dnid)}" mail@example.com ) ; Optional: Record call exten => _ZX.,n,System(mkdir -p "/home/asterisk/calls") exten => _ZX.,n,Set(FILENAME=${STRFTIME(${EPOCH},,%Y-%m-%d-%H_%M_%S)}-${EXTEN}) exten => _ZX.,n,Set(MONITOR_EXEC_ARGS=&& mv "/var/spool/asterisk/monitor/${FILENAME}.wav" "/home/asterisk/calls/") exten => _ZX.,n,Monitor(wav,${FILENAME},mb) ; Remove Name exten => _ZX.,n,Set(CALLERID(all)="PHONENUMBER" <PHONENUMBER>) ; Route to SIP-Provider exten => _ZX.,n,Set(VOLUME(RX,p)=4) exten => _ZX.,n,Set(VOLUME(TX,p)=4) exten => _ZX.,n,Dial(SIP/PHONENUMBER/0DIALPREFIX${EXTEN},120) exten => _ZX,n,Hangup ; Other Outgoing calls exten => _[+0]XX.,1,NoOp(${CALLERID}) ; Optional: Look up in the Horde addressbook for the caller name exten => _[+0]XX.,n,Set(CALLNAME=${SHELL(/etc/asterisk/hordelookup.sh ${CALLERID(dnid)})}) ; Optional: Notify outgoing call per eMail exten => _[+0]XX.,n,System(echo "`date`: ${CALLERID(all)} ruft ${CALLNAME} <${CALLERID(dnid)}> an!" | mail -s "Telefonat nach draußen ${CALLERID(all)} -> ${CALLERID(dnid)}" mail@example.com ) ; Optional: Record call exten => _[+0]XX.,n,System(mkdir -p "/home/asterisk/calls") exten => _[+0]XX.,n,Set(FILENAME=${STRFTIME(${EPOCH},,%Y-%m-%d-%H_%M_%S)}-${EXTEN}) exten => _[+0]XX.,n,Set(MONITOR_EXEC_ARGS=&& mv "/var/spool/asterisk/monitor/${FILENAME}.wav" "/home/asterisk/calls/") exten => _[+0]XX.,n,Monitor(wav,${FILENAME},mb) ; Remove Name exten => _[+0]XX.,n,Set(CALLERID(all)="PHONENUMBER" <PHONENUMBER>) ; Route to SIP-Provider exten => _[+0]XX.,n,Set(VOLUME(RX,p)=4) exten => _[+0]XX.,n,Set(VOLUME(TX,p)=4) exten => _[+0]XX.,n,Dial(SIP/PHONENUMBER/${EXTEN},120) exten => _[+0]XX.,n,Hangup [incoming] ; Incoming calls to PHONENUMBER exten => PHONENUMBER,1,NoOp(${CALLERID}) ; Optional: Look up in the Horde addressbook for the caller name exten => PHONENUMBER,n,Set(CALLERID(name)=${SHELL(/etc/asterisk/hordelookup.sh ${CALLERID(num)})}) ; Optional: Notify incoming call per eMail exten => PHONENUMBER,n,System(echo "`date`: ${CALLERID(all)} ruft an." | mail -s 'Anrufbenachrichtigung ${CALLERID(all)}' mail@example.com) ; Optional: Block blackisted ; blacklist administrated ober CLI ("asterisk -r") ; Adding a number to be blocked ; *CLI> database put blacklist 1234 "TEST" ; Removing a number from being blocked ; *CLI> database del blacklist 1234 ; Listing current blocks ; pbx*CLI> databse show blacklist exten => PHONENUMBER,n,GotoIf(${BLACKLIST()}?blacklisted) ; Optional: Don't ring in night time excluding numbers in phonebook exten => PHONENUMBER,n,GotoIf($["${CALLERID(name)}" != ""]?ring) exten => PHONENUMBER,n,GotoIfTime(23:00-23:59,sun-sat,*,*?noring) exten => PHONENUMBER,n,GotoIfTime(00:00-05:00,sun-sat,*,*?noring) ; Optional: Record call exten => PHONENUMBER,n(ring),System(mkdir -p "/home/asterisk/calls") exten => PHONENUMBER,n,Set(FILENAME=${STRFTIME(${EPOCH},,%Y-%m-%d-%H_%M_%S)}-${EXTEN}) exten => PHONENUMBER,n,Set(MONITOR_EXEC_ARGS=&& mv "/var/spool/asterisk/monitor/${FILENAME}.wav" "/home/asterisk/calls/") exten => PHONENUMBER,n,Monitor(wav,${FILENAME},mb) ; Route the call to local SIP-Phones - ringing (try for 60 seconds) ;exten => PHONENUMBER,n,Set(VOLUME(RX,p)=4) exten => PHONENUMBER,n,Set(VOLUME(TX,p)=4) exten => PHONENUMBER,n,Dial(SIP/30&SIP/31&SIP/32&SIP/33,60) ; Set Language for Voicemail-Answer exten => PHONENUMBER,n(noring),Set(CHANNEL(language)=de) ; Start Voicemail exten => PHONENUMBER,n,Voicemail(30&31) exten => PHONENUMBER,n,Playback(vm-goodbye) exten => PHONENUMBER,n(blacklisted),Hangup() exten => PHONENUMBER,n,Hangup ; Default rules Be careful: You have to block all IPs expect these of your SIP-Provider to use this option in a most secure way [default] include => incoming ; Only for internal phones [phones] include => local include => 1und1_out
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/asterisk/extensions.conf.old-sip
Changed on 07.09.17Call routing / Action plans
; General settings [general] static=yes writeprotect=no [local] ; Internal calls ^3[0-9]$ exten => _3X,1,NoOp(${CALLERID}) exten => _3X,n,Dial(SIP/${EXTEN},120) exten => _3X,n,Hangup ; Internal calls ^4[0-9]$ exten => _4X,1,NoOp(${CALLERID}) exten => _4X,n,Dial(SIP/${EXTEN},120) exten => _4X,n,Hangup [1und1_out] ; local area code calls exten => _ZX.,1,NoOp(${CALLERID}) ; Optional: look up in the Horde addressbook for the caller name ;exten => _ZX.,n,Set(CALLNAME=${SHELL(/etc/asterisk/hordelookup.sh ${CALLERID(dnid)})}) ; Optional: Notify outgoing call per eMail exten => _ZX.,n,System(echo "`date`: ${CALLERID(all)} ruft ${CALLNAME} <${CALLERID(dnid)}> an!" | mail -s "Telefonat nach draußen ${CALLERID(all)} -> ${CALLERID(dnid)}" mail@example.com ) ; Optional: Record call exten => _ZX.,n,System(mkdir -p "/home/asterisk/calls") exten => _ZX.,n,Set(FILENAME=${STRFTIME(${EPOCH},,%Y-%m-%d-%H_%M_%S)}-${EXTEN}) exten => _ZX.,n,Set(MONITOR_EXEC_ARGS=&& mv "/var/spool/asterisk/monitor/${FILENAME}.wav" "/home/asterisk/calls/") exten => _ZX.,n,Monitor(wav,${FILENAME},mb) ; Remove Name exten => _ZX.,n,Set(CALLERID(all)="PHONENUMBER" <PHONENUMBER>) ; Route to SIP-Provider exten => _ZX.,n,Set(VOLUME(RX,p)=4) exten => _ZX.,n,Dial(SIP/PHONENUMBER/0DIALPREFIX${EXTEN},120) exten => _ZX,n,Hangup ; Other Outgoing calls exten => _[+0]XX.,1,NoOp(${CALLERID}) ; Optional: Look up in the Horde addressbook for the caller name ;exten => _[+0]XX.,n,Set(CALLNAME=${SHELL(/etc/asterisk/hordelookup.sh ${CALLERID(dnid)})}) ; Optional: Notify outgoing call per eMail exten => _[+0]XX.,n,System(echo "`date`: ${CALLERID(all)} ruft ${CALLNAME} <${CALLERID(dnid)}> an!" | mail -s "Telefonat nach draußen ${CALLERID(all)} -> ${CALLERID(dnid)}" mail@example.com ) ; Optional: Record call exten => _[+0]XX.,n,System(mkdir -p "/home/asterisk/calls") exten => _[+0]XX.,n,Set(FILENAME=${STRFTIME(${EPOCH},,%Y-%m-%d-%H_%M_%S)}-${EXTEN}) exten => _[+0]XX.,n,Set(MONITOR_EXEC_ARGS=&& mv "/var/spool/asterisk/monitor/${FILENAME}.wav" "/home/asterisk/calls/") exten => _[+0]XX.,n,Monitor(wav,${FILENAME},mb) ; Remove Name exten => _[+0]XX.,n,Set(CALLERID(all)="PHONENUMBER" <PHONENUMBER>) ; Route to SIP-Provider exten => _[+0]XX.,n,Set(VOLUME(RX,p)=4) exten => _[+0]XX.,n,Dial(SIP/PHONENUMBER/${EXTEN},120) exten => _[+0]XX.,n,Hangup [1und1_olb_out] ; local area code calls exten => _ZX.,1,NoOp(${CALLERID}) ; Optional: look up in the Horde addressbook for the caller name ;exten => _ZX.,n,Set(CALLNAME=${SHELL(/etc/asterisk/hordelookup.sh ${CALLERID(dnid)})}) ; Optional: Notify outgoing call per eMail exten => _ZX.,n,System(echo "`date`: ${CALLERID(all)} ruft ${CALLNAME} <${CALLERID(dnid)}> an!" | mail -s "OLB Telefonat nach draußen ${CALLERID(all)} -> ${CALLERID(dnid)}" mail@example.com ) ; Optional: Record call exten => _ZX.,n,System(mkdir -p "/home/asterisk/calls") exten => _ZX.,n,Set(FILENAME=${STRFTIME(${EPOCH},,%Y-%m-%d-%H_%M_%S)}-${EXTEN}) exten => _ZX.,n,Set(MONITOR_EXEC_ARGS=&& mv "/var/spool/asterisk/monitor/${FILENAME}.wav" "/home/asterisk/calls/") exten => _ZX.,n,Monitor(wav,${FILENAME},mb) ; Remove Name exten => _ZX.,n,Set(CALLERID(all)="PHONENUMBER2" <PHONENUMBER2>) ; Route to SIP-Provider exten => _ZX.,n,Set(VOLUME(RX,p)=4) exten => _ZX.,n,Dial(SIP/PHONENUMBER2/0DIALPREFIX${EXTEN},120) exten => _ZX,n,Hangup ; Other Outgoing calls exten => _[+0]XX.,1,NoOp(${CALLERID}) ; Optional: Look up in the Horde addressbook for the caller name ;exten => _[+0]XX.,n,Set(CALLNAME=${SHELL(/etc/asterisk/hordelookup.sh ${CALLERID(dnid)})}) ; Optional: Notify outgoing call per eMail exten => _[+0]XX.,n,System(echo "`date`: ${CALLERID(all)} ruft ${CALLNAME} <${CALLERID(dnid)}> an!" | mail -s "OLB Telefonat nach draußen ${CALLERID(all)} -> ${CALLERID(dnid)}" mail@example.com ) ; Optional: Record call exten => _[+0]XX.,n,System(mkdir -p "/home/asterisk/calls") exten => _[+0]XX.,n,Set(FILENAME=${STRFTIME(${EPOCH},,%Y-%m-%d-%H_%M_%S)}-${EXTEN}) exten => _[+0]XX.,n,Set(MONITOR_EXEC_ARGS=&& mv "/var/spool/asterisk/monitor/${FILENAME}.wav" "/home/asterisk/calls/") exten => _[+0]XX.,n,Monitor(wav,${FILENAME},mb) ; Remove Name exten => _[+0]XX.,n,Set(CALLERID(all)="PHONENUMBER2" <PHONENUMBER2>) ; Route to SIP-Provider exten => _[+0]XX.,n,Set(VOLUME(RX,p)=4) exten => _[+0]XX.,n,Dial(SIP/PHONENUMBER2/${EXTEN},120) exten => _[+0]XX.,n,Hangup [incoming] ; Incoming calls to PHONENUMBER exten => PHONENUMBER,1,NoOp(${CALLERID}) ; Optional: Look up in the Horde addressbook for the caller name ;exten => PHONENUMBER,n,Set(CALLERID(name)=${SHELL(/etc/asterisk/hordelookup.sh ${CALLERID(num)})}) ; Optional: Notify incoming call per eMail exten => PHONENUMBER,n,System(echo "`date`: ${CALLERID(all)} ruft an." | mail -s 'Anrufbenachrichtigung ${CALLERID(all)}' mail@example.com) ; Optional: Block blackisted ; blacklist administrated ober CLI ("asterisk -r") ; Adding a number to be blocked ; *CLI> database put blacklist 1234 "TEST" ; Removing a number from being blocked ; *CLI> database del blacklist 1234 ; Listing current blocks ; pbx*CLI> databse show blacklist exten => PHONENUMBER,n,GotoIf(${BLACKLIST()}?blacklisted) ; Optional: Don't ring in night time excluding numbers in phonebook exten => PHONENUMBER,n,GotoIf($["${CALLERID(name)}" != ""]?ring) exten => PHONENUMBER,n,GotoIfTime(23:00-23:59,sun-sat,*,*?noring) exten => PHONENUMBER,n,GotoIfTime(00:00-05:00,sun-sat,*,*?noring) ; Optional: Record call exten => PHONENUMBER,n(ring),System(mkdir -p "/home/asterisk/calls") exten => PHONENUMBER,n,Set(FILENAME=${STRFTIME(${EPOCH},,%Y-%m-%d-%H_%M_%S)}-${EXTEN}) exten => PHONENUMBER,n,Set(MONITOR_EXEC_ARGS=&& mv "/var/spool/asterisk/monitor/${FILENAME}.wav" "/home/asterisk/calls/") exten => PHONENUMBER,n,Monitor(wav,${FILENAME},mb) ; Route the call to local SIP-Phones - ringing (try for 60 seconds) exten => PHONENUMBER,n,Set(VOLUME(TX,p)=4) exten => PHONENUMBER,n,Dial(SIP/30&SIP/31&SIP/32&SIP/33&SIP/34&SIP/40,60) ; Set Language for Voicemail-Answer exten => PHONENUMBER,n(noring),Set(CHANNEL(language)=de) ; Start Voicemail exten => PHONENUMBER,n,Voicemail(30&31) exten => PHONENUMBER,n,Playback(vm-goodbye) exten => PHONENUMBER,n(blacklisted),Hangup() ; hangup exten => PHONENUMBER,n,Hangup ; Incoming calls to PHONENUMBER2 exten => PHONENUMBER2,1,NoOp(${CALLERID}) ; Optional: Look up in the Horde addressbook for the caller name ;exten => PHONENUMBER2,n,Set(CALLERID(name)=${SHELL(/etc/asterisk/hordelookup.sh ${CALLERID(num)})}) ; Optional: Notify incoming call per eMail exten => PHONENUMBER2,n,System(echo "`date`: ${CALLERID(all)} ruft an." | mail -s 'Anrufbenachrichtigung ${CALLERID(all)}' mail@example.com) ; Optional: Block blackisted ; blacklist administrated ober CLI ("asterisk -r") ; Adding a number to be blocked ; *CLI> database put blacklist 1234 "TEST" ; Removing a number from being blocked ; *CLI> database del blacklist 1234 ; Listing current blocks ; pbx*CLI> databse show blacklist exten => PHONENUMBER2,n,GotoIf(${BLACKLIST()}?blacklisted) ; Optional: Don't ring in night time excluding numbers in phonebook exten => PHONENUMBER2,n,GotoIf($["${CALLERID(name)}" != ""]?ring) exten => PHONENUMBER2,n,GotoIfTime(23:00-23:59,sun-sat,*,*?noring) exten => PHONENUMBER2,n,GotoIfTime(00:00-05:00,sun-sat,*,*?noring) ; Optional: Record call exten => PHONENUMBER2,n(ring),System(mkdir -p "/home/asterisk/calls") exten => PHONENUMBER2,n,Set(FILENAME=${STRFTIME(${EPOCH},,%Y-%m-%d-%H_%M_%S)}-${EXTEN}) exten => PHONENUMBER2,n,Set(MONITOR_EXEC_ARGS=&& mv "/var/spool/asterisk/monitor/${FILENAME}.wav" "/home/asterisk/calls/") exten => PHONENUMBER2,n,Monitor(wav,${FILENAME},mb) ; Route the call to local SIP-Phones - ringing (try for 60 seconds) exten => PHONENUMBER2,n,Set(VOLUME(TX,p)=4) exten => PHONENUMBER2,n,Dial(SIP/40,60) ; hangup exten => PHONENUMBER2,n,Hangup ; Default rules Be careful: You have to block all IPs expect these of your SIP-Provider to use this option in a most secure way [default] include => incoming ; Only for internal phones [phones] include => local include => 1und1_out [olbworkphones] include => local include => 1und1_olb_out
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/asterisk/rtp.conf
Changed on 04.03.17Only few rtp-Ports (Firewall has to be opened/forwarded for 5060/udp and these Ports/udp)
;rtpstart=10000 ;rtpend=20000After change
rtpstart=5000 rtpend=5040
File permissions:
Owner: asterisk
Group: root
Permissions: -rw-------
Click here for a download of the complete file: /etc/asterisk/sip.conf.old
Changed on 07.09.17SIP Phone and Provider settings
; general settings [general] context=default ; listen generally to all on Port 5060 bindaddr=0.0.0.0 bindport=5060 ; seems to halp in some cases srvlookup=yes ; Lang ; cd /var/lib/asterisk/sounds/de ; wget -O core.zip https://www.asterisksounds.org/de/download/asterisk-sounds-core-de-sln16.zip ; wget -O extra.zip https://www.asterisksounds.org/de/download/asterisk-sounds-extra-de-sln16.zip ; unzip core.zip ; unzip extra.zip ; chown -R asterisk:asterisk /var/lib/asterisk/sounds/de ; find /var/lib/asterisk/sounds/de -type d -exec chmod 0775 {} \; ; rm core.zip extra.zip language=de ; NAT nat=force_rport,comedia ; No NAT for localnet localnet=my.lan.network.ip/XXX.XXX.XXX.XXX localnet=XXX.XXX.XXX.XXX/XXX.XXX.XXX.XXX ; General Video Support videosupport=yes ; Be careful: You have to block all IPs expect these of your SIP-Provider to use this option in a most secure way allowguest=yes rtpkeepalive=5 rtptimeout=15 rtpholdtimeout=20 ; Codecs disallow=all allow=alaw allow=ulaw ; Provider SIP Account registerattempts=60 registerattempts=0 trustrpid=yes sendrpid=yes register_retry_403=yes registertimeout=200 register => PHONENUMBER:PASSWORDC+zq@SIP-PROVIDER-HOSTNAME/PHONENUMBER register => PHONENUMBER2:PASSWORD2TIXx@SIP-PROVIDER-HOSTNAME/PHONENUMBER2 ; outgoing calls [PHONENUMBER] type=peer defaultuser=PHONENUMBER fromuser=PHONENUMBER secret=PASSWORD extension=sipuid host=SIP-PROVIDER-HOSTNAME qualify=yes directmedia=no dtmfmode=rfc2833 nat=force_rport,comedia insecure=invite,port register_retry_403=yes rtpkeepalive=5 rtptimeout=15 rtpholdtimeout=20 [PHONENUMBER2] type=peer defaultuser=PHONENUMBER2 fromuser=PHONENUMBER2 secret=PASSWORD extension=sipuid host=SIP-PROVIDER-HOSTNAME qualify=yes directmedia=no dtmfmode=rfc2833 nat=force_rport,comedia insecure=invite,port register_retry_403=yes rtpkeepalive=5 rtptimeout=15 rtpholdtimeout=20 ; incoming calls [1und1_de_in] type=peer fromdomain=SIP-PROVIDER-HOSTNAME allowguest=yes qualify=yes insecure=port,invite context=incoming nat=force_rport,comedia allowguest=yes rtpkeepalive=5 ; local SIP-Phones [30] callerid=user1Phone <30> host=dynamic domain=my.lan.ip.addr user=30 secret=PASSWORD type=friend language=de canreinvite=no context=phones qualify=yes rtpkeepalive=5 [31] callerid=BeckyPhone <31> host=dynamic domain=my.lan.ip.addr user=31 secret=PASSWORD type=friend language=de canreinvite=no context=phones qualify=yes rtpkeepalive=5 [32] callerid=HomePhone <32> host=dynamic domain=my.lan.ip.addr user=32 secret=PASSWORD type=friend language=de canreinvite=no context=phones qualify=yes rtpkeepalive=5 [33] callerid=HeidiPhone <33> host=dynamic domain=my.lan.ip.addr user=33 secret=PASSWORD type=friend language=de canreinvite=no context=phones qualify=yes rtpkeepalive=5 [40] callerid=StationGabosh <40> host=dynamic domain=my.lan.ip.addr user=40 secret=PASSWORD type=friend language=de canreinvite=no context=olbworkphones qualify=yes rtpkeepalive=5
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/asterisk/voicemail.conf
Changed on 07.09.17Voicemail setting
[general] format=wav49 serveremail=asterisk attach=yes delete=yes maxsilence=10 maxsecs=300 silencethreshold=128 maxlogins=3 emaildateformat=%A, %d %B %Y at %H:%M:%S locale=de_DE.utf8 fromstring=GaboshPBX emailsubject=Neue Sprachnachricht von ${VM_CALLERID} (Anrufbeantworter) emailbody=Hallo ${VM_NAME},\n\nEs ist eine neue Sprachnachricht (Nummer ${VM_MSGNUM}) vom Anrufbeantworter eingetroffen.\n\nDatum: ${VM_DATE}\nAnrufer: ${VM_CALLERID}\nDauer: ${VM_DUR} Minuten\n\nDie Nachricht befindet sich im Anhang dieser eMail! emaildateformat=%d.%m.%Y %H:%M:%S [zonemessages] eastern=America/New_York|'vm-received' Q 'digits/at' IMp central=America/Chicago|'vm-received' Q 'digits/at' IMp central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' military=Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM [default] 30 => 1234,user1,mail@example.com 31 => 1234,user2,mail@example.com 40 => 1234,user1,mail@example.com
File permissions:
Owner: root
Group: root
Permissions: -rwxr-xr-x
Click here for a download of the complete file: /usr/local/sbin/fire.sh
Changed on 07.09.17Allow incomming SIP Connections only from my SIP Provider (1und1 Calls)
#iptables -A gabosh-inet -p udp -s XXX.XXX.XXX.XXX/24 --dport 5060 -m conntrack --ctstate NEW -j ACCEPT #iptables -A gabosh-inet -p udp -s XXX.XXX.XXX.XXX/24 --dport $RTPRANGE -m conntrack --ctstate NEW -j ACCEPT #iptables -A gabosh-inet -p udp -s XXX.XXX.XXX.XXX/24 --dport 5060 -m conntrack --ctstate NEW -j ACCEPT #iptables -A gabosh-inet -p udp -s XXX.XXX.XXX.XXX/24 --dport $RTPRANGE -m conntrack --ctstate NEW -j ACCEPT #iptables -A gabosh-inet -p udp -s XXX.XXX.XXX.XXX/32 --dport 5060 -m conntrack --ctstate NEW -j ACCEPT #iptables -A gabosh-inet -p udp -s XXX.XXX.XXX.XXX/32 --dport $RTPRANGE -m conntrack --ctstate NEW -j ACCEPT #iptables -A gabosh-inet -p udp -s XXX.XXX.XXX.XXX/32 --dport 5060 -m conntrack --ctstate NEW -j ACCEPT #iptables -A gabosh-inet -p udp -s XXX.XXX.XXX.XXX/32 --dport $RTPRANGE -m conntrack --ctstate NEW -j ACCEPT #iptables -A gabosh-inet -p udp -s XXX.XXX.XXX.XXX/24 --dport 5060 -m conntrack --ctstate NEW -j ACCEPT #iptables -A gabosh-inet -p udp -s XXX.XXX.XXX.XXX/24 --dport $RTPRANGE -m conntrack --ctstate NEW -j ACCEPT iptables -A gabosh-lan -p udp --dport 5060 -m conntrack --ctstate NEW -j ACCEPT iptables -A gabosh-lan -p udp --dport $RTPRANGE -m conntrack --ctstate NEW -j ACCEPT
For starting the new service after system reboot you should add it to a runlevel with the following command(s):
rc-update add asterisk
Please send a feedback to: doc<at>gabosh.net
Howto listingHere you can find the official Gentoo Linux Forums where you can find a lot of answers.
Here a link to the official Gentoo Linux Homepage.