Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| voip:c7:asterisk14:start [18.01.2017 18:06. ] – [Installation] django | voip:c7:asterisk14:start [18.11.2024 06:56. ] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 7: | Zeile 7: | ||
| ===== Installation ===== | ===== Installation ===== | ||
| - | Die Installation von Asterisk unetr CentOS 7 könnte man an Hand der **[[http:// | + | Die Installation von Asterisk unetr CentOS 7 könnte man an Hand der **[[https:// |
| ==== Repository ast.tucny.com ==== | ==== Repository ast.tucny.com ==== | ||
| Zeile 34: | Zeile 34: | ||
| **[centosplus]**, | **[centosplus]**, | ||
| - | Den 3rd party repositories, | + | Den 3rd party repositories, |
| === ast.tucny.com === | === ast.tucny.com === | ||
| Zeile 121: | Zeile 121: | ||
| Repo : asterisk-14/ | Repo : asterisk-14/ | ||
| Summary | Summary | ||
| - | URL : | + | URL : |
| License | License | ||
| Description : Asterisk is a complete PBX in software. It runs on Linux and provides | Description : Asterisk is a complete PBX in software. It runs on Linux and provides | ||
| Zeile 130: | Zeile 130: | ||
| ==== RPM-Grundinstallation ==== | ==== RPM-Grundinstallation ==== | ||
| + | === asterisk === | ||
| Nachdem unsere Vorbereitungen erst einmal abgeschlossen sind, können wir uns nun daran machen, das Grundpaket **Asterisk** zu installieren. | Nachdem unsere Vorbereitungen erst einmal abgeschlossen sind, können wir uns nun daran machen, das Grundpaket **Asterisk** zu installieren. | ||
| # yum install asterisk -y | # yum install asterisk -y | ||
| Zeile 148: | Zeile 149: | ||
| Build Host : olive.ph.tucny.com | Build Host : olive.ph.tucny.com | ||
| Relocations : (not relocatable) | Relocations : (not relocatable) | ||
| - | URL : | + | URL : |
| Summary | Summary | ||
| Description : | Description : | ||
| Zeile 650: | Zeile 651: | ||
| / | / | ||
| + | === asterisk-iax2 === | ||
| + | Da wir später z.B. für die Clients auf das **I**nter**A**sterisk e**X**change Protokoll oder kurz **[[https:// | ||
| + | # yum install asterisk-iax2 | ||
| + | Was genau diese RPM-Paket in unserern Server mitgebracht hat zeigt uns wie immer der Aufruf des Befehls **rpm** mit der Option **-qil**. | ||
| + | # rpm -qil asterisk-iax2 | ||
| + | |||
| + | < | ||
| + | Version | ||
| + | Release | ||
| + | Architecture: | ||
| + | Install Date: Wed 18 Jan 2017 07:08:23 PM CET | ||
| + | Group : Applications/ | ||
| + | Size : 389194 | ||
| + | License | ||
| + | Signature | ||
| + | Source RPM : asterisk-14.2.1-1.el7.centos.src.rpm | ||
| + | Build Date : Thu 08 Dec 2016 11:57:54 PM CET | ||
| + | Build Host : olive.ph.tucny.com | ||
| + | Relocations : (not relocatable) | ||
| + | URL : https:// | ||
| + | Summary | ||
| + | Description : | ||
| + | IAX2 channel driver for Asterisk | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | |||
| + | === asterisk-pjsip === | ||
| + | Für die Anbindung unseres Asterisk-Servers an den Provider nutzen wir das **S**ession **I**nitiation **P**rotocol - **[[https:// | ||
| + | |||
| + | Wie installieren also auch hier das passende **RPM**. | ||
| + | # yum install asterisk-pjsip | ||
| + | |||
| + | Was genau diese RPM-Paket in unseren Server mitgebracht hat zeigt uns wie immer der Aufruf des Befehls **rpm** mit der Option **-qil**. | ||
| + | # rpm -qil asterisk-pjsip | ||
| + | |||
| + | < | ||
| + | Version | ||
| + | Release | ||
| + | Architecture: | ||
| + | Install Date: Thu 19 Jan 2017 02:21:55 PM CET | ||
| + | Group : Applications/ | ||
| + | Size : 1554633 | ||
| + | License | ||
| + | Signature | ||
| + | Source RPM : asterisk-14.2.1-1.el7.centos.src.rpm | ||
| + | Build Date : Thu 08 Dec 2016 11:57:54 PM CET | ||
| + | Build Host : olive.ph.tucny.com | ||
| + | Relocations : (not relocatable) | ||
| + | URL : https:// | ||
| + | Summary | ||
| + | Description : | ||
| + | SIP channel based upon the PJSIP library | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | |||
| + | ===== Programmstart ===== | ||
| + | ==== erster manueller Start ==== | ||
| + | Abwohl wie noch keine individuellen Konfigurationsänderungen vorgenommen haben, können wir den Asterisk-Daemon schon starten. Hierzu nutzen wir das **systemd** Startscript. | ||
| + | # systemctl start asterisk.service | ||
| + | |||
| + | Den erfolgreichen Start des Daemon können wir nun abfragen. | ||
| + | # systemctl status asterisk.service -l | ||
| + | |||
| + | < | ||
| + | <font style=" | ||
| + | | ||
| + | | ||
| + | Main PID: 12988 (asterisk) | ||
| + | | ||
| + | | ||
| + | |||
| + | Jan 18 19:27:14 vml000177.dmz.nausch.org asterisk[12988]: | ||
| + | Jan 18 19:27:14 vml000177.dmz.nausch.org asterisk[12988]: | ||
| + | Jan 18 19:27:14 vml000177.dmz.nausch.org asterisk[12988]: | ||
| + | Jan 18 19:27:14 vml000177.dmz.nausch.org asterisk[12988]: | ||
| + | Jan 18 19:27:14 vml000177.dmz.nausch.org asterisk[12988]: | ||
| + | Jan 18 19:27:14 vml000177.dmz.nausch.org asterisk[12988]: | ||
| + | Jan 18 19:27:14 vml000177.dmz.nausch.org asterisk[12988]: | ||
| + | Jan 18 19:27:14 vml000177.dmz.nausch.org asterisk[12988]: | ||
| + | Jan 18 19:27:14 vml000177.dmz.nausch.org asterisk[12988]: | ||
| + | Jan 18 19:27:15 vml000177.dmz.nausch.org asterisk[12988]: | ||
| + | </ | ||
| + | |||
| + | Im Verzeichnis // | ||
| + | # less / | ||
| + | |||
| + | < | ||
| + | [Jan 18 19:27:14] NOTICE[12988] cdr.c: CDR simple logging enabled. | ||
| + | [Jan 18 19:27:14] NOTICE[12988] loader.c: 223 modules will be loaded. | ||
| + | [Jan 18 19:27:14] WARNING[12988] res_phoneprov.c: | ||
| + | [Jan 18 19:27:14] ERROR[12988] ari/ | ||
| + | [Jan 18 19:27:14] WARNING[12988] res_musiconhold.c: | ||
| + | [Jan 18 19:27:14] WARNING[12988] res_musiconhold.c: | ||
| + | [Jan 18 19:27:14] NOTICE[12988] confbridge/ | ||
| + | [Jan 18 19:27:14] NOTICE[12988] cel_custom.c: | ||
| + | |||
| + | ==== automatischer Start ==== | ||
| + | Damit der Daemon später beim Hochfahren des Asterisk-Servers automatisch gestartet wird, aktivieren wir den Autostart des Daemon. | ||
| + | # systemctl enable asterisk.service | ||
| + | |||
| + | Created symlink from / | ||
| + | |||
| + | Wollen wir prüfen ob der Autostart des Daemon richtig gesetzt wurde, fragen wir den Status entsprechend wie folgt ab. | ||
| + | # systemctl is-enabled asterisk.service | ||
| + | |||
| + | enabled | ||
| + | |||
| + | ===== Asterisk-Konsole ===== | ||
| + | Der laufende Asterisk-Server stellt zur Interaktion eine eigene Konsole zur Verfügung. Mit der Option '' | ||
| + | # asterisk -r | ||
| + | < | ||
| + | Created by Mark Spencer < | ||
| + | Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' | ||
| + | This is free software, with components licensed under the GNU General Public | ||
| + | License version 2 and other licenses; you are welcome to redistribute it under | ||
| + | certain conditions. Type 'core show license' | ||
| + | ========================================================================= | ||
| + | Connected to Asterisk 14.2.1 currently running on vml000177 (pid = 12988) | ||
| + | vml000177*CLI></ | ||
| + | |||
| + | Eine Übersicht über den Befehlsumfang den uns die Asterisk-Konsole zur Verfügung stellt, können wir uns mit dem Befehl **help** anzeigen lassen. | ||
| + | vml000177*CLI> | ||
| + | < | ||
| + | acl show -- Show a named ACL or list all named ACLs | ||
| + | agent logoff | ||
| + | agent show all -- Show status of all agents | ||
| + | agent show online | ||
| + | agent show -- Show information about an agent | ||
| + | agi dump html -- Dumps a list of AGI commands in HTML format | ||
| + | agi exec -- Add AGI command to a channel in Async AGI | ||
| + | agi set debug [on|off] | ||
| + | agi show commands [topic] | ||
| + | aoc set debug -- enable cli debugging of AOC messages | ||
| + | ari mkpasswd | ||
| + | ari set debug -- Enable/ | ||
| + | ari show apps -- List registered ARI applications | ||
| + | ari show app -- Display details of a registered ARI application | ||
| + | ari show status | ||
| + | ari show users -- List ARI users | ||
| + | ari show user -- List single ARI user | ||
| + | bridge kick -- Kick a channel from a bridge | ||
| + | bridge show all -- List all bridges | ||
| + | bridge show -- Show information about a bridge | ||
| + | bridge technology show -- List registered bridge technologies | ||
| + | bridge technology {suspend|unsuspend} -- Suspend/ | ||
| + | cc cancel | ||
| + | cc report status | ||
| + | cdr set debug [on|off] | ||
| + | cdr show active | ||
| + | cdr show status | ||
| + | cdr submit | ||
| + | cel show status | ||
| + | channel originate | ||
| + | channel redirect | ||
| + | channel request hangup | ||
| + | cli check permissions | ||
| + | cli reload permissions | ||
| + | cli show aliases | ||
| + | cli show permissions | ||
| + | confbridge kick -- Kick participants out of conference bridges. | ||
| + | confbridge list -- List conference bridges and participants. | ||
| + | confbridge lock -- Lock a conference. | ||
| + | confbridge mute -- Mute participants. | ||
| + | confbridge record start -- Start recording a conference | ||
| + | confbridge record stop -- Stop recording a conference. | ||
| + | confbridge show menu -- Show a conference menu | ||
| + | confbridge show menus -- Show a list of conference menus | ||
| + | confbridge show profile bridge -- Show a conference bridge profile. | ||
| + | confbridge show profile bridges -- Show a list of conference bridge profiles. | ||
| + | confbridge show profile user -- Show a conference user profile. | ||
| + | confbridge show profile users -- Show a list of conference user profiles. | ||
| + | confbridge unlock | ||
| + | confbridge unmute | ||
| + | config list -- Show all files that have loaded a configuration file | ||
| + | config reload | ||
| + | config show help -- Show configuration help for a module | ||
| + | core abort shutdown | ||
| + | core clear profile | ||
| + | core ping taskprocessor | ||
| + | core reload | ||
| + | core restart gracefully | ||
| + | core restart now -- Restart Asterisk immediately | ||
| + | core restart when convenient | ||
| + | core set debug channel | ||
| + | core set debug -- Set level of debug chattiness | ||
| + | core set verbose | ||
| + | core show applications [like|describing] -- Shows registered dialplan applications | ||
| + | core show application | ||
| + | core show calls [uptime] | ||
| + | core show channels [concise|verbose|count] -- Display information on channels | ||
| + | core show channel | ||
| + | core show channeltypes | ||
| + | core show channeltype | ||
| + | core show codecs [audio|video|image|text] -- Displays a list of registered codecs | ||
| + | core show codec -- Shows a specific codec | ||
| + | core show config mappings | ||
| + | core show file formats | ||
| + | core show functions [like] | ||
| + | core show function | ||
| + | core show hanguphandlers all -- Show hangup handlers of all channels | ||
| + | core show hanguphandlers | ||
| + | core show help -- Display help list, or specific help on a command | ||
| + | core show hints -- Show dialplan hints | ||
| + | core show hint -- Show dialplan hint | ||
| + | core show image formats | ||
| + | core show license | ||
| + | core show profile | ||
| + | core show settings | ||
| + | core show sounds | ||
| + | core show sound -- Shows details about a specific sound | ||
| + | core show switches | ||
| + | core show sysinfo | ||
| + | core show taskprocessors | ||
| + | core show threads | ||
| + | core show translation | ||
| + | core show uptime [seconds] | ||
| + | core show version | ||
| + | core show warranty | ||
| + | core stop gracefully | ||
| + | core stop now -- Shut down Asterisk immediately | ||
| + | core stop when convenient | ||
| + | core waitfullybooted | ||
| + | data get -- Data API get | ||
| + | data show providers | ||
| + | database del -- Removes database key/value | ||
| + | database deltree | ||
| + | database get -- Gets database value | ||
| + | database put -- Adds/ | ||
| + | database query -- Run a user-specified query on the astdb | ||
| + | database show -- Shows database contents | ||
| + | database showkey | ||
| + | devstate change | ||
| + | devstate list -- List currently known custom device states | ||
| + | dialplan add extension | ||
| + | dialplan add ignorepat | ||
| + | dialplan add include | ||
| + | dialplan debug -- Show fast extension pattern matching data structures | ||
| + | dialplan reload | ||
| + | dialplan remove context | ||
| + | dialplan remove extension | ||
| + | dialplan remove ignorepat | ||
| + | dialplan remove include | ||
| + | dialplan save -- Save current dialplan into a file | ||
| + | dialplan set chanvar | ||
| + | dialplan set extenpatternmatchnew false -- Use the Old extension pattern matching algorithm. | ||
| + | dialplan set extenpatternmatchnew true -- Use the New extension pattern matching algorithm. | ||
| + | dialplan set global | ||
| + | dialplan show -- Show dialplan | ||
| + | dialplan show chanvar | ||
| + | dialplan show globals | ||
| + | dnsmgr refresh | ||
| + | dnsmgr reload | ||
| + | dnsmgr status | ||
| + | dundi flush [stats] | ||
| + | dundi lookup | ||
| + | dundi precache | ||
| + | dundi query -- Query a DUNDi EID | ||
| + | dundi set debug {on|off} | ||
| + | dundi show cache -- Show DUNDi cache | ||
| + | dundi show entityid | ||
| + | dundi show hints -- Show DUNDi hints in the cache | ||
| + | dundi show mappings | ||
| + | dundi show peers [registered|include|exclude|begin] -- Show defined DUNDi peers | ||
| + | dundi show peer -- Show info on a specific DUNDi peer | ||
| + | dundi show precache | ||
| + | dundi show requests | ||
| + | dundi show trans -- Show active DUNDi transactions | ||
| + | dundi store history {on|off} | ||
| + | features show -- Lists configured features | ||
| + | file convert | ||
| + | group show channels | ||
| + | hangup request | ||
| + | help -- <no description available> | ||
| + | http show status | ||
| + | iax2 provision | ||
| + | iax2 prune realtime | ||
| + | iax2 reload | ||
| + | iax2 set debug {on|off|peer} | ||
| + | iax2 set debug jb {on|off} | ||
| + | iax2 set debug trunk {on|off} | ||
| + | iax2 set mtu -- Set the IAX systemwide trunking MTU | ||
| + | iax2 show cache -- Display IAX cached dialplan | ||
| + | iax2 show callnumber usage -- Show current entries in IP call number limit table | ||
| + | iax2 show channels | ||
| + | iax2 show firmware | ||
| + | iax2 show netstats | ||
| + | iax2 show peer -- Show details on specific IAX peer | ||
| + | iax2 show peers -- List defined IAX peers | ||
| + | iax2 show provisioning | ||
| + | iax2 show registry | ||
| + | iax2 show stats -- Display IAX statistics | ||
| + | iax2 show threads | ||
| + | iax2 show users [like] | ||
| + | iax2 test losspct | ||
| + | iax2 unregister | ||
| + | indication add -- Add the given indication to the country | ||
| + | indication remove | ||
| + | indication show -- Display a list of all countries/ | ||
| + | keys init -- Initialize RSA key passcodes | ||
| + | keys show -- Displays RSA key information | ||
| + | local show channels | ||
| + | logger add channel | ||
| + | logger mute -- Toggle logging output to a console | ||
| + | logger reload | ||
| + | logger remove channel | ||
| + | logger rotate | ||
| + | logger set level {DEBUG|NOTICE|WARNING|ERROR|VERBOSE|DTMF} {on|off} -- Enables/ | ||
| + | logger show channels | ||
| + | manager reload | ||
| + | manager set debug [on|off] | ||
| + | manager show command | ||
| + | manager show commands | ||
| + | manager show connected | ||
| + | manager show eventq | ||
| + | manager show events | ||
| + | manager show event -- Show a manager interface event | ||
| + | manager show settings | ||
| + | manager show users -- List configured manager users | ||
| + | manager show user -- Display information on a specific manager user | ||
| + | media cache create | ||
| + | media cache delete | ||
| + | media cache refresh | ||
| + | media cache show all -- Show all items in the media cache | ||
| + | media cache show -- Show a single item in the media cache | ||
| + | mixmonitor {start|stop|list} | ||
| + | module load -- Load a module by name | ||
| + | module reload | ||
| + | module show [like] | ||
| + | module unload | ||
| + | moh reload | ||
| + | moh show classes | ||
| + | moh show files -- List MusicOnHold file-based classes | ||
| + | no debug channel | ||
| + | originate | ||
| + | parking show -- Show a parking lot or a list of all parking lots. | ||
| + | phoneprov show routes | ||
| + | pjsip reload | ||
| + | presencestate change | ||
| + | presencestate list -- List currently know custom presence states | ||
| + | pri intense debug span -- <no description available> | ||
| + | queue add member | ||
| + | queue reload {parameters|members|rules|all} -- Reload queues, members, queue rules, or parameters | ||
| + | queue remove member | ||
| + | queue reset stats -- Reset statistics for a queue | ||
| + | queue set penalty | ||
| + | queue set ringinuse | ||
| + | queue show -- Show status of a specified queue | ||
| + | queue show rules -- Show the rules defined in queuerules.conf | ||
| + | queue {pause|unpause} member | ||
| + | realtime destroy | ||
| + | realtime load -- Used to print out RealTime variables. | ||
| + | realtime store -- Store a new row into a RealTime database | ||
| + | realtime update | ||
| + | realtime update2 | ||
| + | reload | ||
| + | rtcp set debug {on|off|ip} | ||
| + | rtcp set stats {on|off} | ||
| + | rtp set debug {on|off|ip} | ||
| + | say load [new|old] | ||
| + | sip notify | ||
| + | sip prune realtime [peer|all] | ||
| + | sip qualify peer -- Send an OPTIONS packet to a peer | ||
| + | sip reload | ||
| + | sip set debug {on|off|ip|peer} -- Enable/ | ||
| + | sip set history {on|off} | ||
| + | sip show {channels|subscriptions} -- List active SIP channels or subscriptions | ||
| + | sip show channelstats | ||
| + | sip show channel | ||
| + | sip show domains | ||
| + | sip show history | ||
| + | sip show inuse -- List all inuse/ | ||
| + | sip show mwi -- Show MWI subscriptions | ||
| + | sip show objects | ||
| + | sip show peers -- List defined SIP peers | ||
| + | sip show peer -- Show details on specific SIP peer | ||
| + | sip show registry | ||
| + | sip show sched -- Present a report on the status of the scheduler queue | ||
| + | sip show settings | ||
| + | sip show tcp -- List TCP Connections | ||
| + | sip show users -- List defined SIP users | ||
| + | sip show user -- Show details on specific SIP user | ||
| + | sip unregister | ||
| + | sorcery memory cache dump -- Dump all objects within a sorcery memory cache | ||
| + | sorcery memory cache expire | ||
| + | sorcery memory cache populate | ||
| + | sorcery memory cache show -- Show sorcery memory cache information | ||
| + | sorcery memory cache stale -- Mark a specific object or ALL objects as stale within a sorcery memory cache | ||
| + | stun set debug {on|off} | ||
| + | stun show status | ||
| + | timing test -- Run a timing test | ||
| + | udptl set debug {on|off|ip} | ||
| + | udptl show config | ||
| + | ulimit | ||
| + | xmldoc dump -- Dump the XML docs to the specified file</ | ||
| + | |||
| + | Eine Übersicht der wesentlichen Einstellungsoptionen können wir uns z.B. mit dem Befehl '' | ||
| + | vml000177*CLI> | ||
| + | < | ||
| + | PBX Core settings | ||
| + | ----------------- | ||
| + | Version: | ||
| + | Build Options: | ||
| + | Maximum calls: | ||
| + | Maximum open file handles: | ||
| + | Root console verbosity: | ||
| + | Current console verbosity: | ||
| + | Debug level: | ||
| + | Maximum load average: | ||
| + | Minimum free memory: | ||
| + | Startup time: 19:27:13 | ||
| + | Last reload time: 19:27:13 | ||
| + | System: | ||
| + | System name: | ||
| + | Entity ID: | ||
| + | PBX UUID: a4a776d9-2284-4ef4-a65a-19e838658ef0 | ||
| + | Default language: | ||
| + | Language prefix: | ||
| + | User name and group: | ||
| + | Executable includes: | ||
| + | Transcode via SLIN: Enabled | ||
| + | Transmit silence during rec: Disabled | ||
| + | Generic PLC: | ||
| + | Min DTMF duration:: | ||
| + | RTP dynamic payload types: | ||
| + | |||
| + | * Subsystems | ||
| + | ------------- | ||
| + | Manager (AMI): | ||
| + | Web Manager (AMI/ | ||
| + | Call data records: | ||
| + | Realtime Architecture (ARA): Disabled | ||
| + | |||
| + | * Directories | ||
| + | ------------- | ||
| + | Configuration file: / | ||
| + | Configuration directory: | ||
| + | Module directory: | ||
| + | Spool directory: | ||
| + | Log directory: | ||
| + | Run/Sockets directory: | ||
| + | PID file: / | ||
| + | VarLib directory: | ||
| + | Data directory: | ||
| + | ASTDB: | ||
| + | IAX2 Keys directory: | ||
| + | AGI Scripts directory: | ||
| + | |||
| + | </ | ||
| + | |||
| + | Mit der Tastetnkombination **STRG** und **C** verlassen wir die Asterisk Konsole wieder. | ||
| + | vml000177*CLI> | ||
| + | |||
| + | Disconnected from Asterisk server | ||
| + | Asterisk cleanly ending (0). | ||
| + | Executing last minute cleanups | ||
| + | |||
| + | |||
| + | ===== Paketfilter ===== | ||
| + | |||
| + | # firewall-cmd --get-active-zones | ||
| + | < | ||
| + | interfaces: eth0 eth2 eth1</ | ||
| + | |||
| + | # firewall-cmd --permanent --zone=internal --change-interface=eth1 | ||
| + | |||
| + | The interface is under control of NetworkManager, | ||
| + | success | ||
| + | |||
| + | # firewall-cmd --get-active-zones | ||
| + | < | ||
| + | interfaces: eth1 | ||
| + | public | ||
| + | interfaces: eth0 eth2</ | ||
| + | |||
| + | # firewall-cmd --permanent --zone=internal --add-rich-rule=" | ||
| + | |||
| + | success | ||
| + | |||
| + | |||
| + | # firewall-cmd --reload | ||
| + | |||
| + | success | ||
| + | |||
| + | # firewall-cmd --zone=internal --list-all | ||
| + | < | ||
| + | target: default | ||
| + | icmp-block-inversion: | ||
| + | interfaces: eth1 | ||
| + | sources: | ||
| + | services: dhcpv6-client ssh | ||
| + | ports: | ||
| + | protocols: | ||
| + | masquerade: no | ||
| + | forward-ports: | ||
| + | sourceports: | ||
| + | icmp-blocks: | ||
| + | rich rules: | ||
| + | rule family=" | ||
| + | </ | ||
| + | |||
| + | |||
| + | # firewall-cmd --get-active-zones | ||
| + | < | ||
| + | interfaces: eth1 | ||
| + | public | ||
| + | interfaces: eth0 eth2</ | ||
| + | |||
| + | |||
| + | # firewall-cmd --permanent --zone=public --add-rich-rule=" | ||
| + | |||
| + | success | ||
| + | |||
| + | # firewall-cmd --reload | ||
| + | |||
| + | success | ||
| + | |||
| + | |||
| + | |||
| + | # firewall-cmd --zone=public --list-all | ||
| + | < | ||
| + | target: default | ||
| + | icmp-block-inversion: | ||
| + | interfaces: | ||
| + | sources: | ||
| + | services: ssh | ||
| + | ports: | ||
| + | protocols: | ||
| + | masquerade: yes | ||
| + | forward-ports: | ||
| + | sourceports: | ||
| + | icmp-blocks: | ||
| + | rich rules: | ||
| + | rule family=" | ||
| + | |||
| + | |||
| + | ===== iax2 ===== | ||
| + | |||
| + | |||
| + | # asterisk -r | ||
| + | < | ||
| + | Created by Mark Spencer < | ||
| + | Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' | ||
| + | This is free software, with components licensed under the GNU General Public | ||
| + | License version 2 and other licenses; you are welcome to redistribute it under | ||
| + | certain conditions. Type 'core show license' | ||
| + | ========================================================================= | ||
| + | Connected to Asterisk 14.2.1 currently running on vml000177 (pid = 13261) | ||
| + | vml000177*CLI></ | ||
| + | vml000177*CLI> | ||
| + | < | ||
| + | 33/33 10.0.10.122 | ||
| + | demo/ | ||
| + | 2 iax2 peers [0 online, 0 offline, 2 unmonitored]</ | ||
| + | |||
| + | ===== dialplan ===== | ||
| + | |||
| + | # asterisk -r | ||
| + | < | ||
| + | Created by Mark Spencer < | ||
| + | Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' | ||
| + | This is free software, with components licensed under the GNU General Public | ||
| + | License version 2 and other licenses; you are welcome to redistribute it under | ||
| + | certain conditions. Type 'core show license' | ||
| + | ========================================================================= | ||
| + | Connected to Asterisk 14.2.1 currently running on vml000177 (pid = 13261) | ||
| + | vml000177*CLI></ | ||
| + | |||
| + | vml000177*CLI> | ||
| + | < | ||
| + | ' | ||
| + | 2. Playback(beep) | ||
| + | ' | ||
| + | 2. Set(GROUP_NAME=${EncodedChannel}${HOOK_ID}) [func_periodic_hook] | ||
| + | 3. Set(GROUP(periodic-hook)=${GROUP_NAME}) | ||
| + | 4. ExecIf($[${GROUP_COUNT(${GROUP_NAME}@periodic-hook)} > 1]? | ||
| + | 5. Set(ChannelToSpy=${URIDECODE(${EncodedChannel})}) [func_periodic_hook] | ||
| + | 6. ChanSpy(${ChannelToSpy}, | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | 40001. Wait(0.25) | ||
| + | 40002. Answer() | ||
| + | 40003. Playback(vm-from) | ||
| + | 40004. SayDigits(${CALLERID(ani)}) | ||
| + | 40005. Wait(1.25) | ||
| + | 40006. SayDigits(${CALLERID(ani)}) | ||
| + | 40007. Return() | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | 30001. Wait(0.25) | ||
| + | 30002. Answer() | ||
| + | 30003. Set(FUTURETIME=$[${EPOCH} + 12]) | ||
| + | 30004. SayUnixTime(${FUTURETIME}, | ||
| + | 30005. SayPhonetic(z) | ||
| + | 30006. SayUnixTime(${FUTURETIME}, | ||
| + | 30007. Playback(spy-local) | ||
| + | 30008. WaitUntil(${FUTURETIME}) | ||
| + | 30009. Playback(beep) | ||
| + | 30010. Return() | ||
| + | |||
| + | [ Context ' | ||
| + | Include => ' | ||
| + | |||
| + | [ Context ' | ||
| + | Include => ' | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | |||
| + | [ Context ' | ||
| + | '#' | ||
| + | 2. Hangup() | ||
| + | ' | ||
| + | ' | ||
| + | 2. Gosub(${EXTEN}, | ||
| + | 3. Goto(default, | ||
| + | ' | ||
| + | ' | ||
| + | 2. Voicemail(1234, | ||
| + | ' | ||
| + | 2. Goto(s, | ||
| + | ' | ||
| + | 2. Goto(s, | ||
| + | ' | ||
| + | 2. Dial(IAX2/ | ||
| + | 3. Playback(demo-nogo) | ||
| + | 4. Goto(s, | ||
| + | ' | ||
| + | 2. Echo() | ||
| + | 3. Playback(demo-echodone) | ||
| + | 4. Goto(s, | ||
| + | ' | ||
| + | ' | ||
| + | 2. Page(Local/ | ||
| + | ' | ||
| + | 2. Goto(s, | ||
| + | ' | ||
| + | ' | ||
| + | 2. Answer() | ||
| + | 3. Set(TIMEOUT(digit)=5) | ||
| + | 4. Set(TIMEOUT(response)=10) | ||
| + | | ||
| + | | ||
| + | 7. WaitExten() | ||
| + | ' | ||
| + | ' | ||
| + | Include => ' | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | 2. GoToIf($[${AVAILSTATUS} = " | ||
| + | | ||
| + | 4. SIPAddHeader(Call-Info: | ||
| + | 5. NoOp() | ||
| + | 6. Dial(${ARG1}) | ||
| + | | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | 2. Return() | ||
| + | ' | ||
| + | 2. NoOp(Finish stdPrivacyexten BUSY) [pbx_config] | ||
| + | 3. Return() | ||
| + | ' | ||
| + | ' | ||
| + | 2. NoOp(Finish stdPrivacyexten NOANSWER) | ||
| + | 3. Return() | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | 60001. Set(LOCAL(ext)=${ARG1}) | ||
| + | 60002. Set(LOCAL(dev)=${ARG2}) | ||
| + | 60003. Set(LOCAL(dontcntx)=${ARG3}) | ||
| + | 60004. Set(LOCAL(tortcntx)=${ARG4}) | ||
| + | 60005. Set(LOCAL(cntx)=${ARG5}) | ||
| + | 60006. Set(LOCAL(mbx)=" | ||
| + | 60007. Dial(${dev}, | ||
| + | 60008. Goto(stdexten-${DIALSTATUS}, | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | 2. Return() | ||
| + | ' | ||
| + | 2. Return() | ||
| + | ' | ||
| + | 2. Return() | ||
| + | ' | ||
| + | ' | ||
| + | 50001. Set(LOCAL(ext)=${EXTEN}) | ||
| + | 50002. Set(LOCAL(dev)=${ARG1}) | ||
| + | 50003. Set(LOCAL(cntx)=${ARG2}) | ||
| + | 50004. Set(LOCAL(mbx)=${ext}${IF($[!${ISNULL(${cntx})}]? | ||
| + | 50005. Dial(${dev}, | ||
| + | 50006. Goto(stdexten-${DIALSTATUS}, | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | 2. Goto(s-${DIALSTATUS}, | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | ' | ||
| + | 2. Congestion() | ||
| + | ' | ||
| + | 2. Set(SUFFIX=${CUT(EXTEN, | ||
| + | 3. GotoIf($[" | ||
| + | 4. Set(TIMEOUT(absolute)=10800) | ||
| + | 5. Set(isnresult=${ENUMLOOKUP(${EXTEN}, | ||
| + | 6. GotoIf($[" | ||
| + | 7. Set(DIALSTATUS=CONGESTION) | ||
| + | 8. Goto(fn-CONGESTION, | ||
| + | | ||
| + | 10. GotoIf($[" | ||
| + | 11. Set(__SIPFROMDOMAIN=${GLOBAL(FREENUMDOMAIN)}) [pbx_config] | ||
| + | | ||
| + | 13. Goto(fn-${DIALSTATUS}, | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | |||
| + | [ Context ' | ||
| + | Include => ' | ||
| + | Include => ' | ||
| + | Include => ' | ||
| + | Include => ' | ||
| + | Include => ' | ||
| + | Include => ' | ||
| + | Ignore pattern => ' | ||
| + | |||
| + | [ Context ' | ||
| + | Include => ' | ||
| + | Include => ' | ||
| + | Ignore pattern => ' | ||
| + | |||
| + | [ Context ' | ||
| + | Include => ' | ||
| + | Include => ' | ||
| + | Ignore pattern => ' | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | 2. Dial(${GLOBAL(TRUNK)}/ | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | 2. Dial(${GLOBAL(TRUNK)}/ | ||
| + | |||
| + | [ Context ' | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | |||
| + | [ Context ' | ||
| + | ' | ||
| + | Include => ' | ||
| + | |||
| + | [ Context ' | ||
| + | Include => ' | ||
| + | Include => ' | ||
| + | |||
| + | [ Context ' | ||
| + | Alt. Switch => ' | ||
| + | |||
| + | [ Context ' | ||
| + | Include => ' | ||
| + | Include => ' | ||
| + | Include => ' | ||
| + | |||
| + | [ Context ' | ||
| + | |||
| + | [ Context ' | ||
| + | |||
| + | [ Context ' | ||
| + | |||
| + | -= 77 extensions (164 priorities) in 30 contexts. =-</ | ||
| + | |||
| + | ==== konsole verbose output ==== | ||
| + | |||
| + | vml000177*CLI> | ||
| + | |||
| + | Console verbose was OFF and is now 5. | ||
| + | |||
| + | |||
| + | ==== echotest ==== | ||
| + | |||
| + | < | ||
| + | -- Accepting AUTHENTICATED call from 10.0.10.122: | ||
| + | -- > requested format = gsm, | ||
| + | -- > requested prefs = (), | ||
| + | -- > actual format = gsm, | ||
| + | -- > host prefs = (gsm|ilbc|speex|g729|g723), | ||
| + | -- > priority = mine | ||
| + | -- Executing [600@default: | ||
| + | -- < | ||
| + | -- Executing [600@default: | ||
| + | -- Executing [600@default: | ||
| + | -- < | ||
| + | -- Executing [600@default: | ||
| + | -- Goto (default, | ||
| + | -- Executing [s@default: | ||
| + | -- < | ||
| + | -- Executing [2@default: | ||
| + | -- < | ||
| + | == Spawn extension (default, 2, 1) exited non-zero on ' | ||
| + | -- Hungup ' | ||
| + | |||
| + | ==== demo ==== | ||
| + | |||
| + | < | ||
| + | -- Accepting AUTHENTICATED call from 10.0.10.122: | ||
| + | -- > requested format = gsm, | ||
| + | -- > requested prefs = (), | ||
| + | -- > actual format = gsm, | ||
| + | -- > host prefs = (gsm|ilbc|speex|g729|g723), | ||
| + | -- > priority = mine | ||
| + | -- Executing [500@default: | ||
| + | -- < | ||
| + | -- Executing [500@default: | ||
| + | -- Called IAX2/ | ||
| + | [Jan 18 22:17:14] NOTICE[13560]: | ||
| + | -- IAX2/ | ||
| + | -- Hungup ' | ||
| + | == Everyone is busy/ | ||
| + | -- Executing [500@default: | ||
| + | -- < | ||
| + | -- Hungup ' | ||
| + | |||
| + | ==== Beispiele ==== | ||
| + | === dial === | ||
| + | https:// | ||
| + | |||
| + | # vim / | ||
| + | < | ||
| + | exten => _XX, | ||
| + | exten => _XX, | ||
| + | </ | ||
| + | |||
| + | # asterisk -vvvvr | ||
| + | < | ||
| + | -- > requested format = gsm, | ||
| + | -- > requested prefs = (), | ||
| + | -- > actual format = gsm, | ||
| + | -- > host prefs = (gsm|ilbc|speex|g729|g723), | ||
| + | -- > priority = mine | ||
| + | -- Executing [36@default: | ||
| + | -- Executing [36@default: | ||
| + | -- Called PJSIP/36 | ||
| + | -- PJSIP/ | ||
| + | == Spawn extension (default, 36, 2) exited non-zero on ' | ||
| + | -- Hungup ' | ||
| + | </ | ||
| + | |||
| + | # vim / | ||
| + | < | ||
| + | |||
| + | ; BEISPIEL 1: | ||
| + | ; ankommende Anrufe vom Provider Telekom für Rufnummer 08121883175 auf der internen Nst. 36 signalisieren | ||
| + | ; | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | </ | ||
| + | |||
| + | # asterisk -vvvvr | ||
| + | < | ||
| + | ### Anruf von +4917645534406 im Kontext telekom_in ### | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Called PJSIP/36 | ||
| + | -- PJSIP/ | ||
| + | == Spawn extension (telekom_in, | ||
| + | </ | ||
| + | |||
| + | # vim / | ||
| + | < | ||
| + | ; ankommende Anrufe vom Provider Telekom für Rufnummer 08121883175 auf der internen Nst. 36 signalisieren und | ||
| + | ; bei nicht erreichen der Nebenstelle bzw. bei unbeantwortetem Anruf Weiterleitung zur Voicemail | ||
| + | ; | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | |||
| + | # asterisk -vvvvr | ||
| + | < | ||
| + | ### Anruf von +4917645534406 im Kontext telekom_in ### | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Called PJSIP/36 | ||
| + | -- PJSIP/ | ||
| + | -- Nobody picked up in 60000 ms | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | > 0x7f647c01e910 -- Probation passed - setting RTP source address to 217.0.7.6: | ||
| + | -- < | ||
| + | -- < | ||
| + | -- < | ||
| + | -- < | ||
| + | -- < | ||
| + | -- Recording the message | ||
| + | -- x=0, open writing: | ||
| + | -- User ended message by pressing # | ||
| + | -- < | ||
| + | == Parsing '/ | ||
| + | == Parsing '/ | ||
| + | == Parsing '/ | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | == Spawn extension (telekom_in, | ||
| + | |||
| + | |||
| + | # vim / | ||
| + | < | ||
| + | ; BEISPIEL 3: | ||
| + | ; ankommende Anrufe vom Provider Telekom für Rufnummer 08121883175 auf der internen Nst. 36 signalisieren und | ||
| + | ; bei nicht erreichen der Nebenstelle bzw. bei unbeantwortetem Anruf Weiterleitung zum Mobiltelefon | ||
| + | ; | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | ; ---------------------------------------------------------------------------------------------------------------------</ | ||
| + | |||
| + | |||
| + | # asterisk -vvvvr | ||
| + | < | ||
| + | ### Anruf von anonymous im Kontext telekom_in ### | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Called PJSIP/36 | ||
| + | == Spawn extension (telekom_in, | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | ### Anruf von anonymous im Kontext telekom_in ### | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Called PJSIP/36 | ||
| + | -- PJSIP/ | ||
| + | -- Nobody picked up in 10000 ms | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Called PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- Channel PJSIP/ | ||
| + | -- Channel PJSIP/ | ||
| + | > Bridge 19dd0b6d-7cc4-4e8b-850a-e932484bfd20: | ||
| + | > Remotely bridged ' | ||
| + | > Remotely bridged ' | ||
| + | -- Channel PJSIP/ | ||
| + | -- Channel PJSIP/ | ||
| + | == Spawn extension (telekom_in, | ||
| + | </ | ||
| + | |||
| + | # vim / | ||
| + | < | ||
| + | ; BEISPIEL 4: | ||
| + | ; ankommende Anrufe vom Provider Telekom für Rufnummer 08121883175 auf der internen Nst. 36 und zeitgleich | ||
| + | ; auf dem Mobiltelefon signalisieren. Anschließend bei nicht erreichen der Nebenstelle bzw. bei | ||
| + | ; unbeantwortetem Anruf Weiterleitung zur Voicemailbox. Leistungsmerkmal " | ||
| + | ; | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | ; ----------------------------------------------------------------------------------------------------------------------- | ||
| + | </ | ||
| + | |||
| + | # asterisk -vvvvr | ||
| + | < | ||
| + | ### Anruf von anonymous im Kontext telekom_in ### | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Called PJSIP/36 | ||
| + | -- Called PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- Nobody picked up in 10000 ms | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | > 0x7f47f0023ce0 -- Probation passed - setting RTP source address to 217.0.4.196: | ||
| + | -- < | ||
| + | -- < | ||
| + | -- < | ||
| + | -- < | ||
| + | -- < | ||
| + | -- Recording the message | ||
| + | -- x=0, open writing: | ||
| + | -- User hung up | ||
| + | == Parsing '/ | ||
| + | == Parsing '/ | ||
| + | == Parsing '/ | ||
| + | == Spawn extension (telekom_in, | ||
| + | |||
| + | # vim / | ||
| + | < | ||
| + | ; BEISPIEL 5: | ||
| + | ; ankommende Anrufe vom Provider Telekom für Rufnummer 08121883175 nur dann auf der internen Nst. 36 | ||
| + | ; signalisieren, | ||
| + | ; werden zur Abwimmelansage "... dieser Anschluss ist vorübergehend nicht erreichbar ..." weitergeleitet. | ||
| + | ; Alle anderen Anrufer werden zur Nst. 36 durchgestellt; | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | ; ----------------------------------------------------------------------------------------------------------------------- | ||
| + | </ | ||
| + | |||
| + | |||
| + | # asterisk -vvvvr | ||
| + | < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | > 0x7f9e7803f350 -- Probation passed - setting RTP source address to 217.0.4.230: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | == Spawn extension (telekom_in, | ||
| + | </ | ||
| + | < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Called PJSIP/36 | ||
| + | -- PJSIP/ | ||
| + | -- Nobody picked up in 20000 ms | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | > 0x7f9e5800abb0 -- Probation passed - setting RTP source address to 217.0.7.70: | ||
| + | -- < | ||
| + | -- < | ||
| + | -- < | ||
| + | -- < | ||
| + | -- < | ||
| + | -- Recording the message | ||
| + | -- x=0, open writing: | ||
| + | -- User hung up | ||
| + | == Parsing '/ | ||
| + | == Parsing '/ | ||
| + | == Parsing '/ | ||
| + | == Spawn extension (telekom_in, | ||
| + | |||
| + | |||
| + | # vim / | ||
| + | < | ||
| + | ; BEISPIEL 6: | ||
| + | ; ankommende Anrufe vom Provider Telekom für Rufnummer 08121883175 nur dann auf der internen Nst. 36 | ||
| + | ; signalisieren, | ||
| + | ; an die Voicemail weitergeleitet. Alle anderen Anrufer werden zur Nst. 36 durchgestellt und bei nicht | ||
| + | ; erreichen der Nebenstelle bzw. bei unbeantwortetem Anruf rfolgt eine Weiterleitung zur Voicemailbox. | ||
| + | ; | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | ; ----------------------------------------------------------------------------------------------------------------------- | ||
| + | </ | ||
| + | |||
| + | # asterisk -vvvvr | ||
| + | < | ||
| + | ### Anruf von +498921652407 im Kontext telekom_in ### | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Goto (telekom_in, | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | > 0x7fd2d0042a80 -- Probation passed - setting RTP source address to 217.0.7.4: | ||
| + | -- < | ||
| + | -- < | ||
| + | -- < | ||
| + | -- < | ||
| + | -- < | ||
| + | -- Recording the message | ||
| + | -- x=0, open writing: | ||
| + | -- User hung up | ||
| + | == Parsing '/ | ||
| + | == Parsing '/ | ||
| + | == Parsing '/ | ||
| + | == Spawn extension (telekom_in, | ||
| + | < | ||
| + | ### Anruf von anonymous im Kontext telekom_in ### | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Goto (telekom_in, | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Called PJSIP/36 | ||
| + | -- PJSIP/ | ||
| + | == Spawn extension (telekom_in, | ||
| + | |||
| + | # vim / | ||
| + | < | ||
| + | ; BEISPIEL 7: | ||
| + | ; alle ankommende Anrufe vom Provider Telekom für Rufnummer 08121883175 werden in der 1st-level Supportgruppe, | ||
| + | ; d.h. an den Nebenstellen 33 und 36 signalisiert. Ruf hingegen unser VIP-Kunde mit der Rufnummer 08931408448 | ||
| + | ; wird dieser Anrufer sofort zum 2nd-level Support (Nst. 31) durchgestellt bzw. bei nicht erreichen zum | ||
| + | ; Mobiltelefon durchgestellt. | ||
| + | ; | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175/ | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | ; -----------------------------------------------------------------------------------------------------------------------</ | ||
| + | |||
| + | < | ||
| + | ### Anruf von VIP-Kunden mit der Rufnummer +4989216750916 im Kontext telekom_in. VIP-Behandlung veranlassen! ### | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Called PJSIP/31 | ||
| + | -- Called PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | == Spawn extension (telekom_in, | ||
| + | </ | ||
| + | < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | [Jan 30 15:31:12] WARNING[17010][C-00000001]: | ||
| + | -- Called PJSIP/36 | ||
| + | -- PJSIP/ | ||
| + | == Spawn extension (telekom_in, | ||
| + | |||
| + | |||
| + | |||
| + | # vim / | ||
| + | < | ||
| + | ; BEISPIEL 8: | ||
| + | ; alle ankommende Anrufe vom Provider Telekom für Rufnummer 08121883175 werden gegen die black- und white- | ||
| + | ; listing Datenbank geprüft und gesondert behandelt: | ||
| + | ; - Anrufer die keine Nummer übertragen werden " | ||
| + | ; zum Händie und/oder Voicemail | ||
| + | ; - Anrufer mit einem Whitelisting-Eintrag in der AstDB (Asterisk-Datenbank) werden sowohl an der internen | ||
| + | ; Nebenstelle 36 wie auch am Händie mit der Rufnummer 0176/ | ||
| + | ; binnen 20 Sekunden beantwortet, | ||
| + | ; auf der Voicemailbox von der Nst. 36 | ||
| + | ; - Anrufer, die einen blacklisting Eintrag haben, werden direkt zur Abwimmelansage der Nst. 36 geleitet | ||
| + | ; und anschließend die Verbindung gekappt, ohne dass der Anrufer eine Nachricht hinterlassen kann. | ||
| + | ; | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | |||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | exten => 08121883175, | ||
| + | ; ----------------------------------------------------------------------------------------------------------------------- | ||
| + | </ | ||
| + | |||
| + | |||
| + | # asterisk -vvvvr | ||
| + | < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Goto (telekom_in, | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Goto (telekom_in, | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Called PJSIP/36 | ||
| + | -- Called PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- PJSIP/ | ||
| + | -- Channel PJSIP/ | ||
| + | -- Channel PJSIP/ | ||
| + | > Bridge 868dad5d-a999-4b8e-babf-88fe30fbf9af: | ||
| + | > Remotely bridged ' | ||
| + | > Remotely bridged ' | ||
| + | -- Channel PJSIP/ | ||
| + | == Spawn extension (telekom_in, | ||
| + | -- Channel PJSIP/ | ||
| + | |||
| + | |||
| + | # asterisk -vvvvr | ||
| + | < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Goto (telekom_in, | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Goto (telekom_in, | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | > 0x7f2f3402ac30 -- Probation passed - setting RTP source address to 217.0.4.68: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | == Spawn extension (telekom_in, | ||
| + | </ | ||
| + | |||
| + | |||
| + | # asterisk -vvvvr | ||
| + | < | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Goto (telekom_in, | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Executing [08121883175@telekom_in: | ||
| + | -- Called PJSIP/31 | ||
| + | -- PJSIP/ | ||
| + | == Spawn extension (telekom_in, | ||
| + | ===== deutsche Sprachprompts ===== | ||
| + | |||
| + | https:// | ||
| + | |||
| + | # mkdir / | ||
| + | |||
| + | # de / | ||
| + | |||
| + | # wget https:// | ||
| + | # wget https:// | ||
| + | |||
| + | # unzip / | ||
| + | # unzip / | ||
| + | |||
| + | # chmod 644 / | ||
| + | |||
| + | # find / | ||
| + | |||
| + | # yum install sox | ||
| + | |||
| + | # vi / | ||
| + | <file bash / | ||
| + | cd / | ||
| + | for a in $(find . -name ' | ||
| + | sox -t raw -e signed-integer -b 16 -c 1 -r 16k $a -t gsm -r 8k `echo $a|sed " | ||
| + | sox -t raw -e signed-integer -b 16 -c 1 -r 16k $a -t raw -r 8k -e a-law `echo $a|sed " | ||
| + | sox -t raw -e signed-integer -b 16 -c 1 -r 16k $a -t raw -r 8k -e mu-law `echo $a|sed " | ||
| + | done | ||
| + | </ | ||
| + | |||
| + | # chmod +x / | ||
| + | |||
| + | # asterisk-sound-convert | ||
| + | |||
| + | |||
| + | ===== Music on hold ===== | ||
| + | |||
| + | # yum install madplay -y | ||
| + | |||
| + | |||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | ===== Anbindung an das VoIP-Netz der Telekom mit PJSIP ===== | ||
| + | ==== Grundkonfiguration ==== | ||
| + | |||
| + | ==== individuelle Rufnummer bei der abgehenden Wahl setzen ==== | ||
| + | Haben wir von unserem VoIP-Anbieter mehrere Rufnummern bekommen, so werden wir diese in aller regel einzelnen Endgeräten oder Diensten zuordnen wollen. Bei ankommenden Gesprächen haben wir diese Zuordnung über den Abschnitt **[telekom_in]** vorgenommen. Nun wollen wir aber auch je nach verwendeter internen Nebenstelle unseres Asterisk eine bestimmte Rufnummr **CLID**((**C**alling **L**ine **ID**entification)) als Absender nach extern verwenden und auch übertragen. | ||
| + | Das was sich bei dem ein oder anderen höchstprofesssionellen Systemintegrator als unlösbare Herausforderunge bei einer VoIP-Anlage mit 3.000 Nebenstellen darstellen kann, gestaltet sich bei unserem Asterisk-Server als triviale Herausforderung. LOL | ||
| + | |||
| + | Für die Zuordnung der internen Rufnummern zu den jeweiligen externen Absenderrufnummern bzw. PJSIP-Kanälen bedienen wir uns der Asterisk-eigenen Datenbank. Diese Datenbank erreichen wir über die Funktion **database**. Wir können damit z.B. unsere Registrierten Geräte abfragen. | ||
| + | |||
| + | # asterisk -r | ||
| + | |||
| + | | ||
| + | |||
| + | Updated database successfully | ||
| + | |||
| + | | ||
| + | |||
| + | Updated database successfully | ||
| + | |||
| + | | ||
| + | |||
| + | / | ||
| + | / | ||
| + | |||
| + | |||
| + | ===== Voicemail ===== | ||
| + | |||
| + | # yum install asterisk-voicemail -y | ||
| + | |||
| + | # chown asterisk: | ||
| + | |||
| + | # wget https:// | ||
| + | # rpm -Uvh cert-forensics-tools-release*rpm | ||
| + | |||
| + | # vim / | ||
| + | <file bash / | ||
| + | name=CERT Forensics Tools Repository | ||
| + | baseurl=http:// | ||
| + | enabled=1 | ||
| + | gpgkey=file:/// | ||
| + | gpgcheck=1 | ||
| + | priority=10 | ||
| + | |||
| + | [forensics-test] | ||
| + | name=CERT Forensics Tools Test Repository | ||
| + | baseurl=http:// | ||
| + | enabled=0 | ||
| + | gpgkey=file:/// | ||
| + | gpgcheck=1 | ||
| + | |||
| + | [forensics-splunk] | ||
| + | name=CERT Forensics Tools Repository - Splunk | ||
| + | baseurl=http:// | ||
| + | gpgkey=file:/// | ||
| + | enabled=0 | ||
| + | gpgcheck=1 | ||
| + | |||
| + | [forensics-sip] | ||
| + | name=CERT Forensics Tools Repository - SiLK, IPA, and Postgresql | ||
| + | baseurl=http:// | ||
| + | enabled=0 | ||
| + | gpgkey=file:/// | ||
| + | gpgcheck=1 | ||
| + | </ | ||
| + | |||
| + | # yum install lame -y | ||
| + | |||
| + | ===== Fax ===== | ||
| + | |||
| + | # yum install asterisk-fax | ||
| + | |||
| + | # rpm -qil asterisk-fax | ||
| + | < | ||
| + | Version | ||
| + | Release | ||
| + | Architecture: | ||
| + | Install Date: Sun 29 Jan 2017 09:51:54 PM CET | ||
| + | Group : Applications/ | ||
| + | Size : 155968 | ||
| + | License | ||
| + | Signature | ||
| + | Source RPM : asterisk-14.2.1-1.el7.centos.src.rpm | ||
| + | Build Date : Thu 08 Dec 2016 11:57:54 PM CET | ||
| + | Build Host : olive.ph.tucny.com | ||
| + | Relocations : (not relocatable) | ||
| + | URL : http:// | ||
| + | Summary | ||
| + | Description : | ||
| + | FAX applications for Asterisk | ||
| + | / | ||
| + | / | ||
| + | / | ||