โดย diamond » 22 พ.ค. 2010 02:04
ก่อนอื่นต้องขอบคุณมากนะครับที่มาช่วยตอบคับ ผมทำตามที่คุณ nuiz แนะนำมานะคับ
1. คอนฟิก Elatix ยังไงบ้างครับตอนที่ส่ง Call ออกไป ต้องรีจิสเตอร์มั๊ย หรือว่าส่งเป็น SIP Trunk หรือ IAX Trunk ไปเลย และมี Elastix กี่ตัว (เดาว่ามี 2 ตัว)
ตอบ ใช้ sip Trunk ของ ToT ครับมี 2 เบอร์ ใช้ Elastix 1 ตัวคับ Config ไว้แบบนี้คับ
Peer Detail
username=06000734xx
type=peer
secret=xxxx
realm=10.10.2.50
port=5060
outboundproxy=203.113.125.82
host=203.113.125.82
fromuser=06000734xx
fromdomain=203.113.125.82
dtmfmode=rfc2833
disallow=all
canreinvite=no
call-limit=1
allow=ulaw&alaw&gsm&g723&g729
Register
06000734xx:xxxx@203.113.125.82:5060/06000734xx
แก้เรื่อง Nat ไว้ที่ไฟล์ sip_general_custom.conf
ดังนี้ครับ
;udpbindaddr=0.0.0.0:5060
srvlookup=yes
nat=yes
port=5060
localnet=192.168.1.0/255.255.255.0
;stunaddr=stun.exten.com:3000
stunaddr=stun.ekiga.net:3000
externrefresh=3600
2. ตอนที่่โทรออกแล้วได้ยินเสียงว่า "All circuita are busy now" บน Asterisk Console (CLI) มันมีข้อความอะไรขึ้นมาบ้างครับ
ตอบ อาจจะยาวหน่อยนะครับต้องขออภัย
Connected to Asterisk 1.6.2.6 currently running on xxxx (pid = 7983)
Verbosity is at least 3
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [1100@from-internal:1] Macro("SIP/1002-00000010", "user-callerid,SKIPTTL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/1002-00000010", "AMPUSER=1002") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/1002-00000010", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/1002-00000010", "1?Set(REALCALLERIDNUM=1002)") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/1002-00000010", "AMPUSER=1002") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/1002-00000010", "AMPUSERCIDNAME=1002") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/1002-00000010", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/1002-00000010", "AMPUSERCID=1002") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/1002-00000010", "CALLERID(all)="1002" <1002>") in new stack
-- Executing [s@macro-user-callerid:9] ExecIf("SIP/1002-00000010", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/1002-00000010", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] NoOp("SIP/1002-00000010", "Using CallerID "1002" <1002>") in new stack
-- Executing [1100@from-internal:2] Set("SIP/1002-00000010", "_NODEST=") in new stack
-- Executing [1100@from-internal:3] Macro("SIP/1002-00000010", "record-enable,1002,OUT,") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/1002-00000010", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] ExecIf("SIP/1002-00000010", "0?MacroExit()") in new stack
-- Executing [s@macro-record-enable:5] GotoIf("SIP/1002-00000010", "0?Group:OUT") in new stack
-- Goto (macro-record-enable,s,15)
-- Executing [s@macro-record-enable:15] GotoIf("SIP/1002-00000010", "0?IN") in new stack
-- Executing [s@macro-record-enable:16] ExecIf("SIP/1002-00000010", "1?MacroExit()") in new stack
-- Executing [1100@from-internal:4] Macro("SIP/1002-00000010", "dialout-trunk,3,1100,,") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/1002-00000010", "DIAL_TRUNK=3") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/1002-00000010", "0?sub-pincheck,s,1") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/1002-00000010", "1?disabletrunk,1") in new stack
-- Goto (macro-dialout-trunk,disabletrunk,1)
-- Executing [disabletrunk@macro-dialout-trunk:1] NoOp("SIP/1002-00000010", "TRUNK: SIP/tot-0681110289 DISABLED - falling through to next trunk") in new stack
-- Executing [1100@from-internal:5] Macro("SIP/1002-00000010", "dialout-trunk,2,1100,,") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/1002-00000010", "DIAL_TRUNK=2") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/1002-00000010", "0?sub-pincheck,s,1") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/1002-00000010", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("SIP/1002-00000010", "DIAL_NUMBER=1100") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("SIP/1002-00000010", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/1002-00000010", "OUTBOUND_GROUP=OUT_2") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/1002-00000010", "0?nomax") in new stack
-- Executing [s@macro-dialout-trunk:8] GotoIf("SIP/1002-00000010", "0?chanfull") in new stack
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/1002-00000010", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("SIP/1002-00000010", "DIAL_TRUNK_OPTIONS=") in new stack
-- Executing [s@macro-dialout-trunk:11] Macro("SIP/1002-00000010", "outbound-callerid,2") in new stack
-- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/1002-00000010", "0?Set(CALLERPRES()=)") in new stack
-- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/1002-00000010", "0?Set(REALCALLERIDNUM=1002)") in new stack
-- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/1002-00000010", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [s@macro-outbound-callerid:6] Set("SIP/1002-00000010", "USEROUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("SIP/1002-00000010", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("SIP/1002-00000010", "TRUNKOUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/1002-00000010", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,12)
-- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/1002-00000010", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/1002-00000010", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/1002-00000010", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/1002-00000010", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
-- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/1002-00000010", "1?AGI(fixlocalprefix)") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
-- <SIP/1002-00000010>AGI Script fixlocalprefix completed, returning 0
-- Executing [s@macro-dialout-trunk:13] Set("SIP/1002-00000010", "OUTNUM=1100") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/1002-00000010", "custom=SIP/tot-06000734xx") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/1002-00000010", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/1002-00000010", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/1002-00000010", "") in new stack
-- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/1002-00000010", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/1002-00000010", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:19] Dial("SIP/1002-00000010", "SIP/tot-06000734xx/1100,300,") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called tot-06000734xx/1100
-- SIP/tot-06000734xx-00000011 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing [s@macro-dialout-trunk:20] NoOp("SIP/1002-00000010", "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 21") in new stack
-- Executing [s@macro-dialout-trunk:21] Goto("SIP/1002-00000010", "s-CONGESTION,1") in new stack
-- Goto (macro-dialout-trunk,s-CONGESTION,1)
-- Executing [s-CONGESTION@macro-dialout-trunk:1] Set("SIP/1002-00000010", "RC=21") in new stack
-- Executing [s-CONGESTION@macro-dialout-trunk:2] Goto("SIP/1002-00000010", "21,1") in new stack
-- Goto (macro-dialout-trunk,21,1)
-- Executing [21@macro-dialout-trunk:1] Goto("SIP/1002-00000010", "continue,1") in new stack
-- Goto (macro-dialout-trunk,continue,1)
-- Executing [continue@macro-dialout-trunk:1] GotoIf("SIP/1002-00000010", "1?noreport") in new stack
-- Goto (macro-dialout-trunk,continue,3)
-- Executing [continue@macro-dialout-trunk:3] NoOp("SIP/1002-00000010", "TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 21 - failing through to other trunks") in new stack
-- Executing [continue@macro-dialout-trunk:4] Set("SIP/1002-00000010", "CALLERID(number)=1002") in new stack
-- Executing [1100@from-internal:6] Macro("SIP/1002-00000010", "outisbusy,") in new stack
-- Executing [s@macro-outisbusy:1] Progress("SIP/1002-00000010", "") in new stack
-- Executing [s@macro-outisbusy:2] GotoIf("SIP/1002-00000010", "0?emergency,1") in new stack
-- Executing [s@macro-outisbusy:3] GotoIf("SIP/1002-00000010", "0?intracompany,1") in new stack
-- Executing [s@macro-outisbusy:4] Playback("SIP/1002-00000010", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
-- <SIP/1002-00000010> Playing 'all-circuits-busy-now.gsm' (language 'en')
-- <SIP/1002-00000010> Playing 'pls-try-call-later.gsm' (language 'en')
== Spawn extension (macro-outisbusy, s, 4) exited non-zero on 'SIP/1002-00000010' in macro 'outisbusy'
== Spawn extension (from-internal, 1100, 6) exited non-zero on 'SIP/1002-00000010'
-- Executing [h@from-internal:1] Macro("SIP/1002-00000010", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/1002-00000010", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,4)
-- Executing [s@macro-hangupcall:4] GotoIf("SIP/1002-00000010", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] GotoIf("SIP/1002-00000010", "1?theend") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] Hangup("SIP/1002-00000010", "") in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/1002-00000010' in macro 'hangupcall'
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/1002-00000010'
-- Remote UNIX connection
-- Remote UNIX connection disconnected
3. หลังจากกดเบอร์ปลายทาง 1100 แล้ว นานมั๊ยกว่าจะได้ยินเสียง All circuits are busy now"
ตอบ ไม่นานครับ แปปเดียว เหมือนโทรปกติ ทดสอบบน softphone ,ata ได้ผลลัพท์เหมือนกัน
4. ใช้โปรแกรม Ngrep มอนิเตอร์ดู SIP Message ที่ส่งออกไปหาอีกฝั่ง และที่รับเข้ามา ว่ามันมี Error อะไรบ้าง
ตอบ Ngrep ได้ผลดังนี้ครับ
ที่ Local 192.168.1.100
[root@xxxx ~]# ngrep -d eth0 host 192.168.1.100 and port 5060
interface: eth0 (192.168.1.0/255.255.255.0)
filter: (ip) and ( host 192.168.1.100 and port 5060 )
#
U 180.180.109.166:5060 -> 192.168.1.100:5060
PUBLISH sip:1002@xxxx.dyndns.org SIP/2.0..Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK-d8754z-c4142629dc41133c-
1---d8754z-;rport..Max-Forwards: 70..Contact: <sip:1002@180.180.109.166:5060>..To: "1002"<sip:1002@xxxx.dyndns.org>
..From: "1002"<sip:1002@xxxx.dyndns.org>;tag=b91e0a31..Call-ID: MDU3MGI5MDliZWFiMTZhMWMzMzczNjM2NmMzMTkxZTM...CSeq:
1 PUBLISH..Expires: 3600..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO..Content-Ty
pe: application/pidf+xml..User-Agent: X-Lite release 1103k stamp 56013..Event: presence..Content-Length: 464....<?xml ve
rsion='1.0' encoding='UTF-8'?><presence xmlns='urn:ietf:params:xml:ns:pidf' xmlns:dm='urn:ietf:params:xml:ns:pidf:data-m
odel' xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid' xmlns:c='urn:ietf:params:xml:ns:pidf:cipid' entity='sip:1002@savecal
l1.dyndns.org'><tuple id='t6979997d'><status><basic>open</basic></status></tuple><dm:person id='p86781060'><rpid:activit
ies><rpid:on-the-phone/></rpid:activities><dm:note>On the Phone</dm:note></dm:person></presence>
#
U 192.168.1.100:5060 -> 180.180.109.166:5060
SIP/2.0 501 Method Not Implemented..Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK-d8754z-c4142629dc41133c-1---d8754z-
;received=180.180.109.166;rport=5060..From: "1002"<sip:1002@xxxx.dyndns.org>;tag=b91e0a31..To: "1002"<sip:1002@save
call1.dyndns.org>;tag=as4d89f59a..Call-ID: MDU3MGI5MDliZWFiMTZhMWMzMzczNjM2NmMzMTkxZTM...CSeq: 1 PUBLISH..Server: Asteri
sk PBX 1.6.2.6..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported: replaces, timer..Co
ntent-Length: 0....
#
U 180.180.109.166:5060 -> 192.168.1.100:5060
INVITE sip:1100@xxxx.dyndns.org SIP/2.0..Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK-d8754z-c901bc3b11409304-1
---d8754z-;rport..Max-Forwards: 70..Contact: <sip:1002@180.180.109.166:5060>..To: "1100"<sip:1100@xxxx.dyndns.org>.
.From: "1002"<sip:1002@xxxx.dyndns.org>;tag=3305f658..Call-ID: YjQ5MTk1NzA3YzQ3YWEwMDkwNGVlZTM1YjhlM2NiN2I...CSeq:
1 INVITE..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO..Content-Type: application/s
dp..User-Agent: X-Lite release 1103k stamp 56013..Content-Length: 192....v=0..o=- 1 2 IN IP4 180.180.109.166..s=CounterP
ath X-Lite 3.0..c=IN IP4 180.180.109.166..t=0 0..m=audio 5062 RTP/AVP 0 8 3 101..a=fmtp:101 0-15..a=rtpmap:101 telephone
-event/8000..a=sendrecv..
#
U 192.168.1.100:5060 -> 180.180.109.166:5060
SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK-d8754z-c901bc3b11409304-1---d8754z-;received=
180.180.109.166;rport=5060..From: "1002"<sip:1002@xxxx.dyndns.org>;tag=3305f658..To: "1100"<sip:1100@xxxx.dynd
ns.org>;tag=as2eb803d3..Call-ID: YjQ5MTk1NzA3YzQ3YWEwMDkwNGVlZTM1YjhlM2NiN2I...CSeq: 1 INVITE..Server: Asterisk PBX 1.6.
2.6..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported: replaces, timer..WWW-Authentic
ate: Digest algorithm=MD5, realm="asterisk", nonce="243671ed"..Content-Length: 0....
#
U 180.180.109.166:5060 -> 192.168.1.100:5060
ACK sip:1100@xxxx.dyndns.org SIP/2.0..Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK-d8754z-c901bc3b11409304-1---
d8754z-;rport..To: "1100"<sip:1100@xxxx.dyndns.org>;tag=as2eb803d3..From: "1002"<sip:1002@xxxx.dyndns.org>;tag
=3305f658..Call-ID: YjQ5MTk1NzA3YzQ3YWEwMDkwNGVlZTM1YjhlM2NiN2I...CSeq: 1 ACK..Content-Length: 0....
#
U 180.180.109.166:5060 -> 192.168.1.100:5060
INVITE sip:1100@xxxx.dyndns.org SIP/2.0..Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK-d8754z-480f3a33e90a4b6d-1
---d8754z-;rport..Max-Forwards: 70..Contact: <sip:1002@180.180.109.166:5060>..To: "1100"<sip:1100@xxxx.dyndns.org>.
.From: "1002"<sip:1002@xxxx.dyndns.org>;tag=3305f658..Call-ID: YjQ5MTk1NzA3YzQ3YWEwMDkwNGVlZTM1YjhlM2NiN2I...CSeq:
2 INVITE..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO..Content-Type: application/s
dp..User-Agent: X-Lite release 1103k stamp 56013..Authorization: Digest username="1002",realm="asterisk",nonce="243671ed
",uri="sip:1100@xxxx.dyndns.org",response="29e26b77caa2eef7c9060746fc513123",algorithm=MD5..Content-Length: 192....
v=0..o=- 1 2 IN IP4 180.180.109.166..s=CounterPath X-Lite 3.0..c=IN IP4 180.180.109.166..t=0 0..m=audio 5062 RTP/AVP 0 8
3 101..a=fmtp:101 0-15..a=rtpmap:101 telephone-event/8000..a=sendrecv..
#
U 192.168.1.100:5060 -> 180.180.109.166:5060
SIP/2.0 100 Trying..Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK-d8754z-480f3a33e90a4b6d-1---d8754z-;received=180.18
0.109.166;rport=5060..From: "1002"<sip:1002@xxxx.dyndns.org>;tag=3305f658..To: "1100"<sip:1100@xxxx.dyndns.org
>..Call-ID: YjQ5MTk1NzA3YzQ3YWEwMDkwNGVlZTM1YjhlM2NiN2I...CSeq: 2 INVITE..Server: Asterisk PBX 1.6.2.6..Allow: INVITE, A
CK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported: replaces, timer..Contact: <sip:1100@192.168.1.100>.
.Content-Length: 0....
#
U 192.168.1.100:5060 -> 203.113.125.82:5060
INVITE sip:1100@203.113.125.82:5060 SIP/2.0..Via: SIP/2.0/UDP 192.168.1.100:5060;branch=z9hG4bK1b30f0ce;rport..Max-Forwa
rds: 70..From: "1002" <sip:06000734xx@203.113.125.82>;tag=as76446bb5..To: <sip:1100@203.113.125.82:5060>..Contact: <sip:
06000734xx@192.168.1.100>..Call-ID: 02da184411beb7be4a2b0e55309a42bb@203.113.125.82..CSeq: 102 INVITE..User-Agent: Aster
isk PBX 1.6.2.6..Date: Fri, 21 May 2010 18:41:08 GMT..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
, INFO..Supported: replaces, timer..Content-Type: application/sdp..Content-Length: 403....v=0..o=root 1119271542 1119271
542 IN IP4 192.168.1.100..s=Asterisk PBX 1.6.2.6..c=IN IP4 192.168.1.100..t=0 0..m=audio 19492 RTP/AVP 0 8 3 4 18 101..a
=rtpmap:0 PCMU/8000..a=rtpmap:8 PCMA/8000..a=rtpmap:3 GSM/8000..a=rtpmap:4 G723/8000..a=fmtp:4 annexa=no..a=rtpmap:18 G7
29/8000..a=fmtp:18 annexb=no..a=rtpmap:101 telephone-event/8000..a=fmtp:101 0-16..a=silenceSupp:off - - - -..a=ptime:20.
.a=sendrecv..
#
U 203.113.125.82:5060 -> 192.168.1.100:5060
SIP/2.0 100 Trying..Via: SIP/2.0/UDP 58.8.107.154:49957;received=192.168.1.100;branch=z9hG4bK1b30f0ce;rport=50767..From:
"1002" <sip:06000734xx@203.113.125.82>;tag=as76446bb5..To: <sip:1100@203.113.125.82:5060>..Call-ID: 02da184411beb7be4a2
b0e55309a42bb@203.113.125.82..CSeq: 102 INVITE....
#
U 203.113.125.82:5060 -> 192.168.1.100:5060
SIP/2.0 403 Forbidden..Via: SIP/2.0/UDP 58.8.107.154:49957;received=192.168.1.100;branch=z9hG4bK1b30f0ce;rport=50767..Fr
om: "1002" <sip:06000734xx@203.113.125.82>;tag=as76446bb5..To: <sip:1100@203.113.125.82:5060>;tag=aprqngfrt-n1fei930000c
6..Call-ID: 02da184411beb7be4a2b0e55309a42bb@203.113.125.82..CSeq: 102 INVITE....
#
U 192.168.1.100:5060 -> 203.113.125.82:5060
ACK sip:1100@203.113.125.82:5060 SIP/2.0..Via: SIP/2.0/UDP 192.168.1.100:5060;branch=z9hG4bK1b30f0ce;rport..Max-Forwards
: 70..From: "1002" <sip:06000734xx@203.113.125.82>;tag=as76446bb5..To: <sip:1100@203.113.125.82:5060>;tag=aprqngfrt-n1fe
i930000c6..Contact: <sip:06000734xx@192.168.1.100>..Call-ID: 02da184411beb7be4a2b0e55309a42bb@203.113.125.82..CSeq: 102
ACK..User-Agent: Asterisk PBX 1.6.2.6..Content-Length: 0....
#
U 192.168.1.100:5060 -> 180.180.109.166:5060
SIP/2.0 183 Session Progress..Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK-d8754z-480f3a33e90a4b6d-1---d8754z-;recei
ved=180.180.109.166;rport=5060..From: "1002"<sip:1002@xxxx.dyndns.org>;tag=3305f658..To: "1100"<sip:1100@xxxx.
dyndns.org>;tag=as7c9b2dea..Call-ID: YjQ5MTk1NzA3YzQ3YWEwMDkwNGVlZTM1YjhlM2NiN2I...CSeq: 2 INVITE..Server: Asterisk PBX
1.6.2.6..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported: replaces, timer..Contact:
<sip:1100@192.168.1.100>..Content-Type: application/sdp..Content-Length: 312....v=0..o=root 1888462462 1888462462 IN IP4
192.168.1.100..s=Asterisk PBX 1.6.2.6..c=IN IP4 192.168.1.100..t=0 0..m=audio 16320 RTP/AVP 0 8 3 101..a=rtpmap:0 PCMU/
8000..a=rtpmap:8 PCMA/8000..a=rtpmap:3 GSM/8000..a=rtpmap:101 telephone-event/8000..a=fmtp:101 0-16..a=silenceSupp:off -
- - -..a=ptime:20..a=sendrecv..
#
U 192.168.1.100:5060 -> 180.180.109.166:5060
SIP/2.0 503 Service Unavailable..Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK-d8754z-480f3a33e90a4b6d-1---d8754z-;re
ceived=180.180.109.166;rport=5060..From: "1002"<sip:1002@xxxx.dyndns.org>;tag=3305f658..To: "1100"<sip:1100@savecal
l1.dyndns.org>;tag=as7c9b2dea..Call-ID: YjQ5MTk1NzA3YzQ3YWEwMDkwNGVlZTM1YjhlM2NiN2I...CSeq: 2 INVITE..Server: Asterisk P
BX 1.6.2.6..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported: replaces, timer..Conten
t-Length: 0..X-Asterisk-HangupCause: Call Rejected..X-Asterisk-HangupCauseCode: 21....
#
U 180.180.109.166:5060 -> 192.168.1.100:5060
ACK sip:1100@xxxx.dyndns.org SIP/2.0..Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK-d8754z-480f3a33e90a4b6d-1---
d8754z-;rport..To: "1100"<sip:1100@xxxx.dyndns.org>;tag=as7c9b2dea..From: "1002"<sip:1002@xxxx.dyndns.org>;tag
=3305f658..Call-ID: YjQ5MTk1NzA3YzQ3YWEwMDkwNGVlZTM1YjhlM2NiN2I...CSeq: 2 ACK..Content-Length: 0....
#
U 180.180.109.166:5060 -> 192.168.1.100:5060
PUBLISH sip:1002@xxxx.dyndns.org SIP/2.0..Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK-d8754z-9f3dd20eb86e3236-
1---d8754z-;rport..Max-Forwards: 70..Contact: <sip:1002@180.180.109.166:5060>..To: "1002"<sip:1002@xxxx.dyndns.org>
..From: "1002"<sip:1002@xxxx.dyndns.org>;tag=e445e732..Call-ID: NzgzMjFkNDgzYTM3ZjZhODViOTZiZDUxMjQ5N2I4MWE...CSeq:
1 PUBLISH..Expires: 3600..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO..Content-Ty
pe: application/pidf+xml..User-Agent: X-Lite release 1103k stamp 56013..Event: presence..Content-Length: 428....<?xml ve
rsion='1.0' encoding='UTF-8'?><presence xmlns='urn:ietf:params:xml:ns:pidf' xmlns:dm='urn:ietf:params:xml:ns:pidf:data-m
odel' xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid' xmlns:c='urn:ietf:params:xml:ns:pidf:cipid' entity='sip:1002@savecal
l1.dyndns.org'><tuple id='t6979997d'><status><basic>open</basic></status></tuple><dm:person id='p86781060'><rpid:activit
ies><rpid:unknown/></rpid:activities></dm:person></presence>
#
U 192.168.1.100:5060 -> 180.180.109.166:5060
SIP/2.0 501 Method Not Implemented..Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK-d8754z-9f3dd20eb86e3236-1---d8754z-
;received=180.180.109.166;rport=5060..From: "1002"<sip:1002@xxxx.dyndns.org>;tag=e445e732..To: "1002"<sip:1002@save
call1.dyndns.org>;tag=as4d2a3610..Call-ID: NzgzMjFkNDgzYTM3ZjZhODViOTZiZDUxMjQ5N2I4MWE...CSeq: 1 PUBLISH..Server: Asteri
sk PBX 1.6.2.6..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported: replaces, timer..Co
ntent-Length: 0....
#
U 180.180.109.166:5060 -> 192.168.1.100:5060
..................
exit
19 received, 0 dropped
ที่ ToT
[root@xxxx ~]# ngrep -d eth0 host 203.113.125.82 and port 5060
interface: eth0 (192.168.1.0/255.255.255.0)
filter: (ip) and ( host 203.113.125.82 and port 5060 )
#
U 192.168.1.100:5060 -> 203.113.125.82:5060
INVITE sip:1100@203.113.125.82:5060 SIP/2.0..Via: SIP/2.0/UDP 192.168.1.100:5060;branch=z9hG4bK5f44142e;rport..Max-Forwa
rds: 70..From: "1002" <sip:06000734xx@203.113.125.82>;tag=as7233efdc..To: <sip:1100@203.113.125.82:5060>..Contact: <sip:
06000734xx@192.168.1.100>..Call-ID: 07fd08f7188b519d7e80485311cee958@203.113.125.82..CSeq: 102 INVITE..User-Agent: Aster
isk PBX 1.6.2.6..Date: Fri, 21 May 2010 18:55:09 GMT..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
, INFO..Supported: replaces, timer..Content-Type: application/sdp..Content-Length: 401....v=0..o=root 278472057 27847205
7 IN IP4 192.168.1.100..s=Asterisk PBX 1.6.2.6..c=IN IP4 192.168.1.100..t=0 0..m=audio 17538 RTP/AVP 0 8 3 4 18 101..a=r
tpmap:0 PCMU/8000..a=rtpmap:8 PCMA/8000..a=rtpmap:3 GSM/8000..a=rtpmap:4 G723/8000..a=fmtp:4 annexa=no..a=rtpmap:18 G729
/8000..a=fmtp:18 annexb=no..a=rtpmap:101 telephone-event/8000..a=fmtp:101 0-16..a=silenceSupp:off - - - -..a=ptime:20..a
=sendrecv..
#
U 203.113.125.82:5060 -> 192.168.1.100:5060
SIP/2.0 100 Trying..Via: SIP/2.0/UDP 58.8.107.154:49957;received=192.168.1.100;branch=z9hG4bK5f44142e;rport=50796..From:
"1002" <sip:06000734xx@203.113.125.82>;tag=as7233efdc..To: <sip:1100@203.113.125.82:5060>..Call-ID: 07fd08f7188b519d7e8
0485311cee958@203.113.125.82..CSeq: 102 INVITE....
#
U 203.113.125.82:5060 -> 192.168.1.100:5060
SIP/2.0 403 Forbidden..Via: SIP/2.0/UDP 58.8.107.154:49957;received=192.168.1.100;branch=z9hG4bK5f44142e;rport=50796..Fr
om: "1002" <sip:06000734xx@203.113.125.82>;tag=as7233efdc..To: <sip:1100@203.113.125.82:5060>;tag=aprqngfrt-0ijkjt10000c
6..Call-ID: 07fd08f7188b519d7e80485311cee958@203.113.125.82..CSeq: 102 INVITE....
#
U 192.168.1.100:5060 -> 203.113.125.82:5060
ACK sip:1100@203.113.125.82:5060 SIP/2.0..Via: SIP/2.0/UDP 192.168.1.100:5060;branch=z9hG4bK5f44142e;rport..Max-Forwards
: 70..From: "1002" <sip:06000734xx@203.113.125.82>;tag=as7233efdc..To: <sip:1100@203.113.125.82:5060>;tag=aprqngfrt-0ijk
jt10000c6..Contact: <sip:06000734xx@192.168.1.100>..Call-ID: 07fd08f7188b519d7e80485311cee958@203.113.125.82..CSeq: 102
ACK..User-Agent: Asterisk PBX 1.6.2.6..Content-Length: 0....
exit
6 received, 0 dropped
[root@xxxx ~]#