[solved] Trunk Indihome No audio from PSTN

Selamat siang Suhu,

Saya baru mencoba asterisk menggunakan FreePBX.
Problem saya adalah ketika melakukan panggilana maupun menerima lewat trunk Indihome kita tidak bisa mendengar suara dr remote, tp remote bisa mendengar suara kita.
Setelah saya coba cari informasi sebagian besar kemungkinan masalah NAT.
Tapi kalau masalah NAT ketika trunk Indihome saya pasang di Microsip di Laptop yg satu LAN dengan server FreePBX bisa lancar.
Antar extension baik dalam LAN maupun dr luar lewat port forwarding lancar juga.
Sudah berkutat selama 2 minggu tp belum berhasil juga.
Mohon bimbingannya.

Adapun topologinya:

Modem Indihome — Mikrotik — Server FreePBX

Setting di Microsip kalau coba trunk Indihome (hanya berfungsi ketika settingnya seperti di gambar, coba Zoiper di android belum bisa saja)

Microsip

Configurasi Trunk di FreePBX:

username=+62xxxxxx@telkom.net.id
type=peer
supportpath=yes
secret=xxxxx
realm=telkom.net.id
qualify=yes
nat=force_rport,comedia
insecure=port,invite
host=10.0.0.10
fromuser=+62xxxxx
fromdomain=telkom.net.id
context=from-pstn

Configurasi sip FreePBX:

freepbx*CLI> sip show settings

Global Settings:

UDP Bindaddress: 0.0.0.0:5160
TCP SIP Bindaddress: Disabled
TLS SIP Bindaddress: Disabled
RTP Bindaddress: Disabled
Videosupport: No
Textsupport: No
Ignore SDP sess. ver.: No
AutoCreate Peer: Off
Match Auth Username: No
Allow unknown access: Yes
Allow subscriptions: Yes
Allow overlap dialing: Yes
Allow promisc. redir: No
Enable call counters: No
SIP domain support: No
Path support : No
Realm. auth: No
Our auth realm asterisk
Use domains as realms: No
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Direct RTP setup: No
User Agent: FPBX-14.0.2.14(15.2.2)
SDP Session Name: Asterisk PBX 15.2.2
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Trust RPID: No
Send RPID: No
Legacy userfield parse: No
Send Diversion: Yes
Caller ID: Unknown
From: Domain:
Record SIP history: Off
Auth. Failure Events: Off
T.38 support: No
T.38 EC mode: Unknown
T.38 MaxDtgrm: 4294967295
SIP realtime: Disabled
Qualify Freq : 60000 ms
Q.850 Reason header: No
Store SIP_CAUSE: No

Network QoS Settings:

IP ToS SIP: CS3
IP ToS RTP audio: EF
IP ToS RTP video: AF41
IP ToS RTP text: CS0
802.1p CoS SIP: 4
802.1p CoS RTP audio: 5
802.1p CoS RTP video: 6
802.1p CoS RTP text: 5
Jitterbuffer enabled: Yes
Jitterbuffer forced: No
Jitterbuffer max size: 200
Jitterbuffer resync: 1000
Jitterbuffer impl: adaptive
Jitterbuffer tgt extra: 40
Jitterbuffer log: No

Network Settings:

SIP address remapping: Enabled using externhost
Externhost: xxx.xxxxxxx.com
Externaddr: 1xx.xx.xx.61:0
Externrefresh: 120
Localnet: 10.0.0.0/255.0.0.0
172.16.0.0/255.240.0.0
192.168.0.0/255.255.0.0
169.254.0.0/255.255.0.0

Global Signalling Settings:

Codecs: (opus|alaw|ulaw)
Relax DTMF: No
RFC2833 Compensation: No
Symmetric RTP: Yes
Compact SIP headers: No
RTP Keepalive: 1
RTP Timeout: 30
RTP Hold Timeout: 300
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: No
Pedantic SIP support: Yes
Reg. min duration 3600 secs
Reg. max duration: 3600 secs
Reg. default duration: 3600 secs
Sub. min duration 3600 secs
Sub. max duration: 3600 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Outbound reg. retry 403:No
Notify ringing state: Yes
Include CID: No
Notify hold state: Yes
SIP Transfer mode: open
Max Call Bitrate: 1024 kbps
Auto-Framing: No
Outb. proxy:
Session Timers: Accept
Session Refresher: uas
Session Expires: 1800 secs
Session Min-SE: 90 secs
Timer T1: 500
Timer T1 minimum: 100
Timer B: 32000
No premature media: Yes
Max forwards: 70

Default Settings:

Allowed transports: UDP
Outbound transport: UDP
Context: from-sip-external
Record on feature: automon
Record off feature: automon
Force rport: Yes
DTMF: rfc2833
Qualify: 0
Keepalive: 0
Use ClientCode: No
Progress inband: No
Language: en
Tone zone:
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: *97
RTCP Multiplexing: No

freepbx*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
104/104 192.168.10.2 D Yes Yes A 5060 OK (119 ms)
Indihome/+62xxxxxx@te 10.0.0.10 Yes Yes 5060 OK (68 ms)
2 sip peers [Monitored: 2 online, 0 offline Unmonitored: 0 online, 0 offline]

freepbx*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
10.0.0.10:5060 N +62xxxxxx 3585 Registered Mon, 16 Apr 2018 13:13:17
1 SIP registrations.

Log ketika melakukan panggilan:

== Setting global variable ‘SIPDOMAIN’ to ‘192.168.10.8’
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
– Executing [9147@from-internal:1] Macro(“PJSIP/101-00000010”, “user-callerid,LIMIT”) in new stack
– Executing [s@macro-user-callerid:1] Set(“PJSIP/101-00000010”, “TOUCH_MONITOR=1523860352.43”) in new stack
– Executing [s@macro-user-callerid:2] Set(“PJSIP/101-00000010”, “AMPUSER=101”) in new stack
– Executing [s@macro-user-callerid:3] GotoIf(“PJSIP/101-00000010”, “0?report”) in new stack
– Executing [s@macro-user-callerid:4] ExecIf(“PJSIP/101-00000010”, “1?Set(REALCALLERIDNUM=101)”) in new stack
– Executing [s@macro-user-callerid:5] Set(“PJSIP/101-00000010”, “AMPUSER=101”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“PJSIP/101-00000010”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:7] Set(“PJSIP/101-00000010”, “AMPUSERCIDNAME=Lenovo”) in new stack
– Executing [s@macro-user-callerid:8] ExecIf(“PJSIP/101-00000010”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
– Executing [s@macro-user-callerid:9] GotoIf(“PJSIP/101-00000010”, “0?report”) in new stack
– Executing [s@macro-user-callerid:10] Set(“PJSIP/101-00000010”, “AMPUSERCID=101”) in new stack
– Executing [s@macro-user-callerid:11] Set(“PJSIP/101-00000010”, “__DIAL_OPTIONS=HhTtr”) in new stack
– Executing [s@macro-user-callerid:12] Set(“PJSIP/101-00000010”, “CALLERID(all)=“Lenovo” <101>”) in new stack
– Executing [s@macro-user-callerid:13] GotoIf(“PJSIP/101-00000010”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:14] ExecIf(“PJSIP/101-00000010”, “1?Set(GROUP(concurrency_limit)=101)”) in new stack
– Executing [s@macro-user-callerid:15] ExecIf(“PJSIP/101-00000010”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:16] NoOp(“PJSIP/101-00000010”, “Macro Depth is 1”) in new stack
– Executing [s@macro-user-callerid:17] GotoIf(“PJSIP/101-00000010”, “1?report2:macroerror”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [s@macro-user-callerid:19] GotoIf(“PJSIP/101-00000010”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,37)
– Executing [s@macro-user-callerid:37] Set(“PJSIP/101-00000010”, “CALLERID(number)=101”) in new stack
– Executing [s@macro-user-callerid:38] Set(“PJSIP/101-00000010”, “CALLERID(name)=Lenovo”) in new stack
– Executing [s@macro-user-callerid:39] GotoIf(“PJSIP/101-00000010”, “0?cnum”) in new stack
– Executing [s@macro-user-callerid:40] Set(“PJSIP/101-00000010”, “CDR(cnam)=Lenovo”) in new stack
– Executing [s@macro-user-callerid:41] Set(“PJSIP/101-00000010”, “CDR(cnum)=101”) in new stack
– Executing [s@macro-user-callerid:42] Set(“PJSIP/101-00000010”, “CHANNEL(language)=en”) in new stack
– Executing [9147@from-internal:2] Set(“PJSIP/101-00000010”, “ROUTEUSER=101”) in new stack
– Executing [9147@from-internal:3] Set(“PJSIP/101-00000010”, “ROUTEUSER=101”) in new stack
– Executing [9147@from-internal:4] GotoIf(“PJSIP/101-00000010”, “1?notblind”) in new stack
– Goto (from-internal,9147,7)
– Executing [9147@from-internal:7] GotoIf(“PJSIP/101-00000010”, “1?restrictedroute-c81e728d9d4c2f636f067f89cc14862c,9147,2:outbound-allroutes,9147,2”) in new stack
– Goto (restrictedroute-c81e728d9d4c2f636f067f89cc14862c,9147,2)
– Executing [9147@restrictedroute-c81e728d9d4c2f636f067f89cc14862c:2] Gosub(“PJSIP/101-00000010”, “sub-record-check,s,1(out,9147,dontcare)”) in new stack
– Executing [s@sub-record-check:1] GotoIf(“PJSIP/101-00000010”, “0?initialized”) in new stack
– Executing [s@sub-record-check:2] Set(“PJSIP/101-00000010”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [s@sub-record-check:3] Set(“PJSIP/101-00000010”, “NOW=1523860352”) in new stack
– Executing [s@sub-record-check:4] Set(“PJSIP/101-00000010”, “__DAY=16”) in new stack
– Executing [s@sub-record-check:5] Set(“PJSIP/101-00000010”, “__MONTH=04”) in new stack
– Executing [s@sub-record-check:6] Set(“PJSIP/101-00000010”, “__YEAR=2018”) in new stack
– Executing [s@sub-record-check:7] Set(“PJSIP/101-00000010”, “__TIMESTR=20180416-133232”) in new stack
– Executing [s@sub-record-check:8] Set(“PJSIP/101-00000010”, “__FROMEXTEN=101”) in new stack
– Executing [s@sub-record-check:9] Set(“PJSIP/101-00000010”, “__MON_FMT=wav”) in new stack
– Executing [s@sub-record-check:10] NoOp(“PJSIP/101-00000010”, “Recordings initialized”) in new stack
– Executing [s@sub-record-check:11] ExecIf(“PJSIP/101-00000010”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [s@sub-record-check:12] Set(“PJSIP/101-00000010”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [s@sub-record-check:13] ExecIf(“PJSIP/101-00000010”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [s@sub-record-check:14] GotoIf(“PJSIP/101-00000010”, “3?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [s@sub-record-check:17] GotoIf(“PJSIP/101-00000010”, “1?sub-record-check,out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [out@sub-record-check:1] NoOp(“PJSIP/101-00000010”, “Outbound Recording Check from 101 to 9147”) in new stack
– Executing [out@sub-record-check:2] Set(“PJSIP/101-00000010”, “RECMODE=never”) in new stack
– Executing [out@sub-record-check:3] ExecIf(“PJSIP/101-00000010”, “0?Goto(routewins)”) in new stack
– Executing [out@sub-record-check:4] ExecIf(“PJSIP/101-00000010”, “0?Goto(routewins)”) in new stack
– Executing [out@sub-record-check:5] Gosub(“PJSIP/101-00000010”, “recordcheck,1(never,out,9147)”) in new stack
– Executing [recordcheck@sub-record-check:1] NoOp(“PJSIP/101-00000010”, “Starting recording check against never”) in new stack
– Executing [recordcheck@sub-record-check:2] Goto(“PJSIP/101-00000010”, “never”) in new stack
– Goto (sub-record-check,recordcheck,14)
– Executing [recordcheck@sub-record-check:14] Set(“PJSIP/101-00000010”, “__REC_POLICY_MODE=NEVER”) in new stack
– Executing [recordcheck@sub-record-check:15] Goto(“PJSIP/101-00000010”, “stoprec”) in new stack
– Goto (sub-record-check,recordcheck,25)
– Executing [recordcheck@sub-record-check:25] NoOp(“PJSIP/101-00000010”, “Stopping recording: out, 9147”) in new stack
– Executing [recordcheck@sub-record-check:26] Set(“PJSIP/101-00000010”, “__REC_STATUS=STOPPED”) in new stack
– Executing [recordcheck@sub-record-check:27] System(“PJSIP/101-00000010”, "/var/lib/asterisk/bin/stoprecording.php “PJSIP/101-00000010"”) in new stack
– Executing [recordcheck@sub-record-check:28] Return(“PJSIP/101-00000010”, “”) in new stack
– Executing [out@sub-record-check:6] Return(“PJSIP/101-00000010”, “”) in new stack
– Executing [9147@restrictedroute-c81e728d9d4c2f636f067f89cc14862c:3] ExecIf(“PJSIP/101-00000010”, “0 ?Set(CDR(accountcode)=)”) in new stack
– Executing [9147@restrictedroute-c81e728d9d4c2f636f067f89cc14862c:4] Set(“PJSIP/101-00000010”, “MOHCLASS=default”) in new stack
– Executing [9147@restrictedroute-c81e728d9d4c2f636f067f89cc14862c:5] ExecIf(“PJSIP/101-00000010”, “1?Set(TRUNKCIDOVERRIDE=+62xxxxxxx2)”) in new stack
– Executing [9147@restrictedroute-c81e728d9d4c2f636f067f89cc14862c:6] Set(“PJSIP/101-00000010”, “_NODEST=”) in new stack
– Executing [9147@restrictedroute-c81e728d9d4c2f636f067f89cc14862c:7] Macro(“PJSIP/101-00000010”, “dialout-trunk,1,147,off”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“PJSIP/101-00000010”, “DIAL_TRUNK=1”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“PJSIP/101-00000010”, “0?sub-pincheck,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:3] ExecIf(“PJSIP/101-00000010”, “0?Set(CALLERID(num)=101)”) in new stack
– Executing [s@macro-dialout-trunk:4] GotoIf(“PJSIP/101-00000010”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“PJSIP/101-00000010”, “DIAL_NUMBER=147”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“PJSIP/101-00000010”, “DIAL_TRUNK_OPTIONS=HhTtr”) in new stack
– Executing [s@macro-dialout-trunk:7] Set(“PJSIP/101-00000010”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [s@macro-dialout-trunk:8] Set(“PJSIP/101-00000010”, “DIAL_TRUNK_OPTIONS=T”) in new stack
– Executing [s@macro-dialout-trunk:9] GotoIf(“PJSIP/101-00000010”, “0?nomax”) in new stack
– Executing [s@macro-dialout-trunk:10] GotoIf(“PJSIP/101-00000010”, “0?chanfull”) in new stack
– Executing [s@macro-dialout-trunk:11] GotoIf(“PJSIP/101-00000010”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:12] Macro(“PJSIP/101-00000010”, “outbound-callerid,1”) in new stack
– Executing [s@macro-outbound-callerid:1] NoOp(“PJSIP/101-00000010”, “101”) in new stack
– Executing [s@macro-outbound-callerid:2] NoOp(“PJSIP/101-00000010”, “”) in new stack
– Executing [s@macro-outbound-callerid:3] NoOp(“PJSIP/101-00000010”, “all”) in new stack
– Executing [s@macro-outbound-callerid:4] ExecIf(“PJSIP/101-00000010”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
– Executing [s@macro-outbound-callerid:5] ExecIf(“PJSIP/101-00000010”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
– Executing [s@macro-outbound-callerid:6] ExecIf(“PJSIP/101-00000010”, “0?Set(REALCALLERIDNUM=101)”) in new stack
– Executing [s@macro-outbound-callerid:7] GotoIf(“PJSIP/101-00000010”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,11)
– Executing [s@macro-outbound-callerid:11] Set(“PJSIP/101-00000010”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:12] Set(“PJSIP/101-00000010”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:13] Set(“PJSIP/101-00000010”, “TRUNKOUTCID=+62xxxxxxxx2”) in new stack
– Executing [s@macro-outbound-callerid:14] GotoIf(“PJSIP/101-00000010”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,19)
– Executing [s@macro-outbound-callerid:19] ExecIf(“PJSIP/101-00000010”, “1?Set(CALLERID(all)=+62xxxxxxx2)”) in new stack
– Executing [s@macro-outbound-callerid:20] ExecIf(“PJSIP/101-00000010”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:21] ExecIf(“PJSIP/101-00000010”, “1?Set(CALLERID(all)=+62xxxxxxx2)”) in new stack
– Executing [s@macro-outbound-callerid:22] ExecIf(“PJSIP/101-00000010”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
– Executing [s@macro-outbound-callerid:23] ExecIf(“PJSIP/101-00000010”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
– Executing [s@macro-outbound-callerid:24] Set(“PJSIP/101-00000010”, “CDR(outbound_cnum)=+62xxxxxxx2”) in new stack
– Executing [s@macro-outbound-callerid:25] Set(“PJSIP/101-00000010”, “CDR(outbound_cnam)=”) in new stack
– Executing [s@macro-dialout-trunk:13] GosubIf(“PJSIP/101-00000010”, “0?sub-flp-1,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“PJSIP/101-00000010”, “OUTNUM=147”) in new stack
– Executing [s@macro-dialout-trunk:15] Set(“PJSIP/101-00000010”, “custom=SIP/Indihome”) in new stack
– Executing [s@macro-dialout-trunk:16] ExecIf(“PJSIP/101-00000010”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
– Executing [s@macro-dialout-trunk:17] ExecIf(“PJSIP/101-00000010”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:18] Macro(“PJSIP/101-00000010”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“PJSIP/101-00000010”, “”) in new stack
– Executing [s@macro-dialout-trunk:19] GotoIf(“PJSIP/101-00000010”, “0?skipcrm”) in new stack
– Executing [s@macro-dialout-trunk:20] Set(“PJSIP/101-00000010”, “__CRM_DIRECTION=OUTBOUND”) in new stack
– Executing [s@macro-dialout-trunk:21] Set(“PJSIP/101-00000010”, “__CRM_DESTINATION=147”) in new stack
– Executing [s@macro-dialout-trunk:22] Set(“PJSIP/101-00000010”, “__CRM_SOURCE=101”) in new stack
– Executing [s@macro-dialout-trunk:23] AGI(“PJSIP/101-00000010”, “sangomacrm.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
– <PJSIP/101-00000010>AGI Script sangomacrm.agi completed, returning 0
– Executing [s@macro-dialout-trunk:24] Set(“PJSIP/101-00000010”, “CHANNEL(hangup_handler_push)=crm-hangup,s,1”) in new stack
– Executing [s@macro-dialout-trunk:25] NoOp(“PJSIP/101-00000010”, “CRM Finished”) in new stack
– Executing [s@macro-dialout-trunk:26] GotoIf(“PJSIP/101-00000010”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:27] ExecIf(“PJSIP/101-00000010”, “1?Set(CONNECTEDLINE(num,i)=147)”) in new stack
– Executing [s@macro-dialout-trunk:28] ExecIf(“PJSIP/101-00000010”, “1?Set(CONNECTEDLINE(name,i)=CID:+62xxxxxxxx2)”) in new stack
– Executing [s@macro-dialout-trunk:29] ExecIf(“PJSIP/101-00000010”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)+62xxxxxxxx2)”) in new stack
– Executing [s@macro-dialout-trunk:30] GotoIf(“PJSIP/101-00000010”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:31] Dial(“PJSIP/101-00000010”, “SIP/Indihome/147,300,Tb(func-apply-sipheaders^s^1)”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– SIP/Indihome-0000001b Internal Gosub(func-apply-sipheaders,s,1) start
– Executing [s@func-apply-sipheaders:1] ExecIf(“SIP/Indihome-0000001b”, “0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
– Executing [s@func-apply-sipheaders:2] NoOp(“SIP/Indihome-0000001b”, “Applying SIP Headers to channel”) in new stack
– Executing [s@func-apply-sipheaders:3] Set(“SIP/Indihome-0000001b”, “SIPHEADERKEYS=”) in new stack
– Executing [s@func-apply-sipheaders:4] While(“SIP/Indihome-0000001b”, “0”) in new stack
– Jumping to priority 8
– Executing [s@func-apply-sipheaders:9] Return(“SIP/Indihome-0000001b”, “”) in new stack
== Spawn extension (from-pstn, 9147, 1) exited non-zero on ‘SIP/Indihome-0000001b’
– SIP/Indihome-0000001b Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
Audio is at 17640
Adding codec opus to SDP
Adding codec alaw to SDP
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 10.0.0.10:5060:
INVITE sip:147@10.0.0.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.8:5160;branch=z9hG4bK3c03e14c;rport
Max-Forwards: 70
From: sip:+62xxxxxxx2@telkom.net.id:5160;tag=as7ff984b3
To: sip:147@10.0.0.10
Contact: sip:+62xxxxxxx2@192.168.10.8:5160
Call-ID: 0f845b0d587028da2fb5a2b86be93dd2@telkom.net.id
CSeq: 102 INVITE
User-Agent: FPBX-14.0.2.14(15.2.2)
Date: Mon, 16 Apr 2018 06:32:33 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer, path
Content-Type: application/sdp
Content-Length: 339

v=0
o=root 1024073464 1024073464 IN IP4 192.168.10.8
s=Asterisk PBX 15.2.2
c=IN IP4 192.168.10.8
t=0 0
m=audio 17640 RTP/AVP 107 8 0 101
a=rtpmap:107 opus/48000/2
a=fmtp:107 maxplaybackrate=24000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20
a=sendrecv


-- Called SIP/Indihome/147

<— SIP read from UDP:10.0.0.10:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.10.8:5160;branch=z9hG4bK3c03e14c;received=10.41.35.6;rport=5160
Call-ID: 0f845b0d587028da2fb5a2b86be93dd2@telkom.net.id
From: sip:+62xxxxxxxx2@telkom.net.id:5160;tag=as7ff984b3
To: sip:147@10.0.0.10
CSeq: 102 INVITE
Content-Length: 0

<------------->
— (7 headers 0 lines) —

<— SIP read from UDP:10.0.0.10:5060 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.10.8:5160;branch=z9hG4bK3c03e14c;received=10.41.35.6;rport=5160
Call-ID: 0f845b0d587028da2fb5a2b86be93dd2@telkom.net.id
From: sip:+62xxxxxxxx2@telkom.net.id:5160;tag=as7ff984b3
To: sip:147@10.0.0.10;tag=sbc0905af9qf7s7-CC-71
CSeq: 102 INVITE
Contact: sip:10.0.0.10:5060
P-Early-Media: sendonly
Content-Length: 197
Content-Type: application/sdp

v=0
o=- 74009762 74009762 IN IP4 10.0.0.2
s=SBC call
c=IN IP4 10.0.0.2
t=0 0
m=audio 30216 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
— (10 headers 10 lines) —
sip_route_dump: route/path hop: sip:10.0.0.10:5060
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - (opus|alaw|ulaw), peer - audio=(alaw)/video=(nothing)/text=(nothing), combined - (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
> 0x7f681c026490 – Strict RTP learning after remote address set to: 10.0.0.2:30216
Peer audio RTP is at port 10.0.0.2:30216
– SIP/Indihome-0000001b is ringing
– SIP/Indihome-0000001b is making progress passing it to PJSIP/101-00000010
> 0x7f6820086030 – Strict RTP learning after remote address set to: 192.168.10.33:4002
> 0x7f6820086030 – Strict RTP learning after remote address set to: 192.168.10.33:4002
> 0x7f6820086030 – Strict RTP switching to RTP target address 192.168.10.33:4002 as source

<— SIP read from UDP:10.0.0.10:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.10.8:5160;branch=z9hG4bK3c03e14c;received=10.41.35.6;rport=5160
Call-ID: 0f845b0d587028da2fb5a2b86be93dd2@telkom.net.id
From: sip:+62xxxxxxx2@telkom.net.id:5160;tag=as7ff984b3
To: sip:147@10.0.0.10;tag=sbc0905af9qf7s7-CC-71
CSeq: 102 INVITE
Allow: INVITE,ACK,BYE,CANCEL,INFO,PRACK,NOTIFY,REFER,SUBSCRIBE,OPTIONS,MESSAGE
Contact: sip:10.0.0.10:5060
Require: timer
Session-Expires: 1800;refresher=uas
Content-Length: 197
Content-Type: application/sdp

v=0
o=- 74009762 74009763 IN IP4 10.0.0.2
s=SBC call
c=IN IP4 10.0.0.2
t=0 0
m=audio 30216 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
— (12 headers 10 lines) —
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - (opus|alaw|ulaw), peer - audio=(alaw)/video=(nothing)/text=(nothing), combined - (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
> 0x7f681c026490 – Strict RTP learning after remote address set to: 10.0.0.2:30216
Peer audio RTP is at port 10.0.0.2:30216
sip_route_dump: route/path hop: sip:10.0.0.10:5060
Transmitting (NAT) to 10.0.0.10:5060:
ACK sip:10.0.0.10:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.8:5160;branch=z9hG4bK3ec3009b;rport
Max-Forwards: 70
From: sip:+62xxxxxxx2@telkom.net.id:5160;tag=as7ff984b3
To: sip:147@10.0.0.10;tag=sbc0905af9qf7s7-CC-71
Contact: sip:+62xxxxxxx2@192.168.10.8:5160
Call-ID: 0f845b0d587028da2fb5a2b86be93dd2@telkom.net.id
CSeq: 102 ACK
User-Agent: FPBX-14.0.2.14(15.2.2)
Content-Length: 0


-- SIP/Indihome-0000001b answered PJSIP/101-00000010
-- Channel SIP/Indihome-0000001b joined 'simple_bridge' basic-bridge <c67523ef-50aa-41dc-8c54-426a69e0f333>
-- Channel PJSIP/101-00000010 joined 'simple_bridge' basic-bridge <c67523ef-50aa-41dc-8c54-426a69e0f333>

[2018-04-16 13:32:34] WARNING[25395][C-00000016]: chan_sip.c:8056 sip_indicate: Don’t know how to indicate condition 36
Really destroying SIP dialog ‘asbc4923rb3af7a3ieeqd37s7esb88r334fq@19500.0.ATS.jk1m-ats01.telkom.net.id.71’ Method: NOTIFY
> 0x7f6820086030 – Strict RTP learning complete - Locking on source address 192.168.10.33:4002
– Channel PJSIP/101-00000010 left ‘simple_bridge’ basic-bridge
== Spawn extension (macro-dialout-trunk, s, 31) exited non-zero on ‘PJSIP/101-00000010’ in macro ‘dialout-trunk’
== Spawn extension (restrictedroute-c81e728d9d4c2f636f067f89cc14862c, 9147, 7) exited non-zero on ‘PJSIP/101-00000010’
– Executing [h@restrictedroute-c81e728d9d4c2f636f067f89cc14862c:1] Hangup(“PJSIP/101-00000010”, “”) in new stack
== Spawn extension (restrictedroute-c81e728d9d4c2f636f067f89cc14862c, h, 1) exited non-zero on ‘PJSIP/101-00000010’
– PJSIP/101-00000010 Internal Gosub(crm-hangup,s,1) start
– Executing [s@crm-hangup:1] NoOp(“PJSIP/101-00000010”, “Sending Hangup to CRM”) in new stack
– Executing [s@crm-hangup:2] NoOp(“PJSIP/101-00000010”, “HANGUP CAUSE: 16”) in new stack
– Executing [s@crm-hangup:3] ExecIf(“PJSIP/101-00000010”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
– Executing [s@crm-hangup:4] NoOp(“PJSIP/101-00000010”, “MASTER CHANNEL: 1523860352.43 = 1523860352.43”) in new stack
– Executing [s@crm-hangup:5] GotoIf(“PJSIP/101-00000010”, “0?return”) in new stack
– Executing [s@crm-hangup:6] Set(“PJSIP/101-00000010”, “__CRM_HANGUP=1”) in new stack
– Executing [s@crm-hangup:7] AGI(“PJSIP/101-00000010”, “sangomacrm.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
– Channel SIP/Indihome-0000001b left ‘simple_bridge’ basic-bridge
Scheduling destruction of SIP dialog ‘0f845b0d587028da2fb5a2b86be93dd2@telkom.net.id’ in 6400 ms (Method: INVITE)
Reliably Transmitting (NAT) to 10.0.0.10:5060:
BYE sip:10.0.0.10:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.8:5160;branch=z9hG4bK14f13257;rport
Max-Forwards: 70
From: sip:+62xxxxxxxxx2@telkom.net.id:5160;tag=as7ff984b3
To: sip:147@10.0.0.10;tag=sbc0905af9qf7s7-CC-71
Call-ID: 0f845b0d587028da2fb5a2b86be93dd2@telkom.net.id
CSeq: 103 BYE
User-Agent: FPBX-14.0.2.14(15.2.2)
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


<— SIP read from UDP:10.0.0.10:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.10.8:5160;branch=z9hG4bK14f13257;received=10.41.35.6;rport=5160
Call-ID: 0f845b0d587028da2fb5a2b86be93dd2@telkom.net.id
From: sip:+62xxxxxxxx2@telkom.net.id:5160;tag=as7ff984b3
To: sip:147@10.0.0.10;tag=sbc0905af9qf7s7-CC-71
CSeq: 103 BYE
Content-Length: 0

<------------->
— (7 headers 0 lines) —
Really destroying SIP dialog ‘0f845b0d587028da2fb5a2b86be93dd2@telkom.net.id’ Method: INVITE
– <PJSIP/101-00000010>AGI Script sangomacrm.agi completed, returning 0
– Executing [s@crm-hangup:8] Return(“PJSIP/101-00000010”, “”) in new stack
== Spawn extension (restrictedroute-c81e728d9d4c2f636f067f89cc14862c, h, 1) exited non-zero on ‘PJSIP/101-00000010’
– PJSIP/101-00000010 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

IP address yang hadap telkom untuk layanan voice bukannya kelas 10.0.0.0/8 ya? di salah satu SDP, media di arahkan ke ip address 192.168.10.8 di mana itu mungkin interface yang hadap ke LAN atau ip address ip phone/softphone. Externip nya kalo ndak salah harusya 10.0.0.X juga. lalu define internal host 192.168.0.0/16.

Selamat siang mas,

Kalau boleh tau SDP apa yah, maaf masih belum familiar dengan asterisk hehehe…
Untuk informasi tambahan
IP Server FreePBX 192.168.10.8
Microsip di laptop 192.168.10.33
IP yg di dpt dr VOIP indihome 10.41.35.6 (melihat di setting modem indihome)
Port Voip di modem Indihome ini di binding ke port 2 LAN yg kemudian disambungkan ke mikrotik sehingga mendapatkan IP 192.168.1.5 di interface mikrotiknya.

Saya coba ganti exterip jd pakai 10.41.35.6 dan internal hanya 192.168.0.0/16 tapi belum berhasil juga keluar suara.

Kasusnya sama dg di Mirosip, kalau option “IP Rewrite” dihilangkan tidak keluar suara juga.

SDP (Session Description Protocol) bukan hanya Asterisk saja, dia ada di percakapan SIP terutama untuk INVITE dan replyan OK 200 ketika panggilan diterima. Fungsinya adalah untuk menetapkan pembicaraan akan menggunakan audio/video, codecnya apa saja, dan salah satunya ip address media pembicaraan masing-masing ujung akan dikirim mana saja.

Jadi kalo dilihat dari log mas, SDP FreePBX yang ditawarkan ke server telkomnya adalah:

INVITE sip:147@10.0.0.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.8:5160;branch=z9hG4bK3c03e14c;rport
Max-Forwards: 70
From: sip:+62xxxxxxx2@telkom.net.id:5160;tag=as7ff984b3
To: sip:147@10.0.0.10
Contact: sip:+62xxxxxxx2@192.168.10.8:5160
Call-ID: 0f845b0d587028da2fb5a2b86be93dd2@telkom.net.id
CSeq: 102 INVITE
User-Agent: FPBX-14.0.2.14(15.2.2)
Date: Mon, 16 Apr 2018 06:32:33 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer, path
Content-Type: application/sdp
Content-Length: 339

v=0
o=root 1024073464 1024073464 IN IP4 192.168.10.8 <---- ini server Media yang ditawarkan ke Telkom
s=Asterisk PBX 15.2.2
c=IN IP4 192.168.10.8
t=0 0
m=audio 17640 RTP/AVP 107 8 0 101
a=rtpmap:107 opus/48000/2
a=fmtp:107 maxplaybackrate=24000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20
a=sendrecv

Sedangkan dari telkom

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.10.8:5160;branch=z9hG4bK3c03e14c;received=10.41.35.6;rport=5160
Call-ID: 0f845b0d587028da2fb5a2b86be93dd2@telkom.net.id
From: sip:+62xxxxxxx2@telkom.net.id:5160;tag=as7ff984b3
To: sip:147@10.0.0.10;tag=sbc0905af9qf7s7-CC-71
CSeq: 102 INVITE
Allow: INVITE,ACK,BYE,CANCEL,INFO,PRACK,NOTIFY,REFER,SUBSCRIBE,OPTIONS,MESSAGE
Contact: sip:10.0.0.10:5060
Require: timer
Session-Expires: 1800;refresher=uas
Content-Length: 197
Content-Type: application/sdp

v=0
**o=- 74009762 74009763 IN IP4 10.0.0.2** <---- ini media server yang ditawarkan Telkom ke FreePBX
s=SBC call
c=IN IP4 10.0.0.2
t=0 0
m=audio 30216 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

nah ada kemungkinan 10.0.0.2 ini ndak bisa lihat 192.168.10.8 sementara dari 192.168.10.8 bisa lihat ke 10.0.0.2.

Itu yang menyebabkan one way audio

Dengan externip harusnya sudah dioverwrite jadi 10.41.35.6. Tapi entah kenapa di SDP INVITE itu masih 192.168.10.8. Ada yang terlewat mungkin?

localnet 10.0.0.0/8 nya coba di comment dulu (remove)

anton

Selamat siang mas anton dan mas godril,

Sudah saya coba hapus localnet tetap tidak keluar seuara.
Tetapi ada 1 yang aneh, ketika traceroute dr server FreePBX ke server sip 10.0.0.10 hasil akhirnya malah ke 10.0.0.254

traceroute to 10.0.0.10 (10.0.0.10), 30 hops max, 60 byte packets
1 gateway (192.168.10.1) 0.577 ms 0.492 ms 0.488 ms
2 192.168.1.1 (192.168.1.1) 0.861 ms 0.816 ms 0.736 ms
3 10.41.35.1 (10.41.35.1) 2.787 ms 3.382 ms 4.338 ms
4 10.255.255.187 (10.255.255.187) 6.570 ms 10.563 ms 10.508 ms
5 10.0.0.254 (10.0.0.254) 15.320 ms 15.250 ms 17.695 ms

Tapi kalau trace dr laptop sesuai ke 10.0.0.10

Tracing route to 10.0.0.10 over a maximum of 30 hops

1 2 ms 9 ms 1 ms 192.168.10.1
2 3 ms 1 ms 2 ms 192.168.1.1
3 4 ms 16 ms 11 ms 10.41.35.1
4 5 ms 3 ms 5 ms 10.255.255.187
5 15 ms 5 ms 8 ms 10.0.0.10

Trace complete.

Server FreePBX dan laptop dalam 1 LAN, tp server FreePBX pakai VM dengan NIC dalam kondisi pass-through mode.

Terlampir log di microsip yang bisa untuk telepon keluar.
microsip_log.txt (55.2 KB)

Kalau dr log terlihat IP yg melakukan SDP adalah IP 192.168.1.5 atau IP di interface mikrotik.
Sedangkan kalau di server FreePBX adalah IP servernya 192.168.10.8

di Server FreePBX

v=0
o=root 1728929383 1728929383 IN IP4 192.168.10.8
s=Asterisk PBX 15.2.2
c=IN IP4 192.168.10.8
t=0 0
m=audio 10278 RTP/AVP 0 8 3 111 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv


-- Called SIP/Indihome/147

di Microsip

v=0
o=- 3733046954 3733046954 IN IP4 192.168.1.5
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 0 8 123 101
c=IN IP4 192.168.1.5
b=TIAS:64000
a=rtcp:4001 IN IP4 192.168.1.5
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:123 opus/48000/2
a=fmtp:123 maxplaybackrate=24000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ssrc:804026983 cname:584d66095d294cbb

–end msg–

Setelah ganti external IP ke 192.168.1.5 sudah bisa keluar suara baik call atau menerima telepon.

Terima kasih mas anton dan mas godril

Ternyata muncul masalah tidak ada suara buat extensi yang konek dr luar LAN hehehe…
kalau external IP di ganti dengan IP public internet trunk telkom tidak berfungsi…

Apakah ada solusinya?

Terima kasih

bisa pake codec g729 gk ya ?

Ini nanya yg mana ya?

sedikit berhubungan degan thread ini mas,

kondisi :

  1. sy punya analog trunk ke telkom pake card TDM400P, semua sudah running well untuk incoming & outgoing.
  2. ippbx pake elastix

Permasalahan :

  1. pake codec ulaw, alaw kalo sip client koneknya diluar jaringan sendiri sering delay bahkan putus2

nahh maksud sy, apakah sudah ada yg ngetes atau implementasi pake codec g729.

Matur nuwun

Untuk update, permasalahan saya sudah beres
Di SIP setting bagian general saya isi external address dengan host DDNS saya.
di Chan SIP setting, NAT saya pilih NO, IP pilih static dan di isi IP 192.168.1.5 atau IP dr Interface mikrotik yg terhubung dengan trunk di modem indihome
di PJSIP setting, Domain the transport comes from dan External IP Address saya isi host DDNS saya.

Sekarang telepon dr internal ke trunk lancar, dr luar ke internal lancar, dr luar ke trunk lancar jg

Barusan saya coba pakai g729 di microsip yg posisi di luar ke trunk lancar mas.
Kayaknya kalau masalah tdk lancar dan putus2 lebih di kondisi jaringan, coba pakai QOS biar lebih prioritas

1 Like

siyap…matur nuwun informasinya mas

Host DDNS itu IP Publik 10.xxx.xx. bridge dari modem, atau IP DMZ 192.168.xx dari mikrotik?

Top sharing nya mas…