; ============================================================
; HalaVoice On-Premise — pjsip.conf (قالب مبسّط)
;
; عدّل حسب بيئتك:
;  - قسم [trunk] لمزود SIP محلي أو بوابة FXO (Grandstream مثلاً)
;  - قسم [6001] هاتف SIP داخلي للاختبار (اتصل بـ700)
;
; DTMF: dtmf_mode=rfc4733 (الموصى به) — Asterisk يحوّله تلقائيًا
; إلى إطار AudioSocket 0x03 الذي يقرأه الجسر مباشرة.
; ============================================================

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060

; ---------- SIP trunk / بوابة FXO ----------
[trunk]
type=endpoint
context=from-trunk
disallow=all
allow=ulaw,alaw
dtmf_mode=rfc4733
aors=trunk-aor

[trunk-aor]
type=aor
contact=sip:REPLACE-GATEWAY-IP:5060

[trunk-identify]
type=identify
endpoint=trunk
match=REPLACE-GATEWAY-IP

; ---------- هاتف اختبار داخلي ----------
[6001]
type=endpoint
context=internal-test
disallow=all
allow=ulaw,alaw
dtmf_mode=rfc4733
auth=6001-auth
aors=6001-aor

[6001-auth]
type=auth
auth_type=userpass
username=6001
password=CHANGE-ME-STRONG-PASSWORD

[6001-aor]
type=aor
max_contacts=2
