Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
|
asterisk [2025/06/03 01:00] jango [Installation] |
asterisk [2025/06/18 15:03] (aktuell) jango [CHAN_PJSIP] |
||
|---|---|---|---|
| Zeile 27: | Zeile 27: | ||
| =====Installation===== | =====Installation===== | ||
| + | Mit CHAN_PJSIP statt CHAN_SIP! | ||
| < | < | ||
| #!/bin/sh | #!/bin/sh | ||
| Zeile 64: | Zeile 65: | ||
| </ | </ | ||
| + | =====Firewall===== | ||
| + | |||
| + | Damit Asterisk zuverlässig funktioniert – insbesondere für SIP-basierte VoIP-Kommunikation – müssen in der Firewall bestimmte Ports freigegeben werden. Welche genau, hängt vom eingesetzten Protokoll (SIP, IAX, RTP etc.) und der Konfiguration ab. Hier die Standard-Ports, | ||
| + | |||
| + | ====SIP==== | ||
| + | Siehe [[SIP]] | ||
| + | * UDP/5060 – für unverschlüsselten [[SIP]]-Verkehr (Standard) | ||
| + | * TCP/5060 – optional, wenn [[TCP]] verwendet wird | ||
| + | * TLS/5061 – für verschlüsselten SIP-Traffic ([[SIPS]]) | ||
| + | |||
| + | Falls du [[PJSIP]] verwendest, ist ebenfalls Port 5060 (UDP) üblich, außer du hast etwas anderes konfiguriert. | ||
| + | |||
| + | ====RTP==== | ||
| + | [[RTP]] ist **für die Audioübertragung erforderlich**. | ||
| + | * UDP/ | ||
| + | |||
| + | Dieser Bereich ist in der Asterisk-Konfiguration (rtp.conf) unter rtpstart und rtpend definierbar. Der Standardbereich ist 10000–20000. | ||
| + | |||
| + | ====IAX2==== | ||
| + | Siehe [[IAX2]] | ||
| + | * UDP/4569 – für IAX2-Verbindungen (wenn du IAX statt [[SIP]] nutzt) | ||
| + | |||
| + | ====WebRTC==== | ||
| + | Siehe [[WebRTC]] | ||
| + | * UDP/3478 – [[STUN]] (wenn [[TURN]]/ | ||
| + | * TCP/8088 – für Asterisk [[HTTP]] WebSockets (z. B. für WebRTC via http.conf) | ||
| + | * TCP/4443, UDP/5349 – wenn [[TURN]]/ | ||
| =====Erstkonfiguration===== | =====Erstkonfiguration===== | ||
| + | ====CHAN_SIP==== | ||
| Beispiel einer < | Beispiel einer < | ||
| Zeile 104: | Zeile 133: | ||
| #include ext/ | #include ext/ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | asterisk -rx "core reload" | ||
| + | asterisk -rx "sip reload" | ||
| + | asterisk -rvvv | ||
| + | sip show peers | ||
| + | </ | ||
| + | ====CHAN_PJSIP==== | ||
| + | |||
| + | Beispiel einer | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Datei. | ||
| + | |||
| + | < | ||
| + | [transport-udp] | ||
| + | type=transport | ||
| + | protocol=udp | ||
| + | bind=0.0.0.0: | ||
| + | |||
| + | [6001] | ||
| + | type=endpoint | ||
| + | transport=transport-udp | ||
| + | context=internal | ||
| + | disallow=all | ||
| + | allow=ulaw | ||
| + | auth=6001 | ||
| + | aors=6001 | ||
| + | |||
| + | [6001] | ||
| + | type=auth | ||
| + | auth_type=userpass | ||
| + | username=6001 | ||
| + | password=geheim123 | ||
| + | |||
| + | [6001] | ||
| + | type=aor | ||
| + | max_contacts=1 | ||
| + | |||
| + | [6002] | ||
| + | type=endpoint | ||
| + | transport=transport-udp | ||
| + | context=internal | ||
| + | disallow=all | ||
| + | allow=ulaw | ||
| + | auth=6002 | ||
| + | aors=6002 | ||
| + | |||
| + | [6002] | ||
| + | type=auth | ||
| + | auth_type=userpass | ||
| + | username=6002 | ||
| + | password=passwort456 | ||
| + | |||
| + | [6002] | ||
| + | type=aor | ||
| + | max_contacts=1 | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | asterisk -rx "core reload" | ||
| + | asterisk -rx "pjsip reload" | ||
| + | asterisk -rvvv | ||
| + | pjsip show endpoints | ||
| + | |||
| + | database show | ||
| + | |||
| + | asterisk@*> | ||
| + | / | ||
| + | 1 results found. | ||
| + | |||
| + | database delete registrar contact/ | ||
| + | database deltree registrar/ | ||
| </ | </ | ||
| =====Extensions===== | =====Extensions===== | ||