Alice asterisk Bob 192.168.3.7 192.168.1.254 192.168.3.17 9104 9102 sledujeme jenom pakety mezi asteriskem a Bobem Alice i Bob jsou pripojeni k Asteriskovi Asterisk je SIP Proxy registrace je na konci -------------------------------- volam z meho pocitace na 9102 , a na tomto telefonu skleduji pakety takze tady budou pakety z asteriska do telefonu tedy volam z 192.168.3.7 na 192.168.3.17 tcpdump sleduje pakety mezi 192.168.1.254 a 192.168.3.17 Alice vola BOBa tohle je ta druha strana, tedy k Bobovi a prvni paket je Invite od Asteriska k Bobovi 14:29:38.371000 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: INVITE sip:9102@192.168.3.17:5060 SIP/2.0 E...E...@...................INVITE sip:9102@192.168.3.17:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.254:5060;branch=z9hG4bK08882702 Max-Forwards: 70 From: "muj pocitac 192.168.3.7" ;tag=as697aeb82 To: Contact: Call-ID: 516852fc5cdeba8b6f121e220ce499f0@192.168.1.254:5060 CSeq: 102 INVITE User-Agent: Asterisk PBX GIT-master-838583783f Date: Sun, 27 Mar 2022 12:29:38 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Type: application/sdp Content-Length: 299 v=0 o=root 41783995 41783995 IN IP4 192.168.1.254 s=Asterisk PBX GIT-master-838583783f c=IN IP4 192.168.1.254 t=0 0 m=audio 11154 RTP/AVP 8 0 3 101 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=maxptime:150 a=sendrecv 14:29:38.399777 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: SIP/2.0 100 Trying E..........@.............n.PSIP/2.0 100 Trying To: ;tag=ec871b5 Server: YV3/1.0.1 Contact: From: "muj pocitac 192.168.3.7" ;tag=as697aeb82 Via: SIP/2.0/UDP 192.168.1.254:5060;branch=z9hG4bK08882702 Content-Length: 0 CSeq: 102 INVITE Call-ID: 516852fc5cdeba8b6f121e220ce499f0@192.168.1.254:5060 CAll ID jsou stejna Call-ID: 516852fc5cdeba8b6f121e220ce499f0@192.168.1.254:5060 Call-ID: 516852fc5cdeba8b6f121e220ce499f0@192.168.1.254:5060 14:29:38.469002 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: SIP/2.0 180 Ringing E...........................SIP/2.0 180 Ringing Accept: application/dtmf-relay,application/im-iscomposing+xml,application/sdp,text/plain,message/sipfrag,application/sip Via: SIP/2.0/UDP 192.168.1.254:5060;branch=z9hG4bK08882702 From: "muj pocitac 192.168.3.7" ;tag=as697aeb82 Allow-Events: talk,hold,refer Call-ID: 516852fc5cdeba8b6f121e220ce499f0@192.168.1.254:5060 Server: YV3/1.0.1 Contact: Content-Length: 0 CSeq: 102 INVITE To: ;tag=ec871b5 14:29:47.099782 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: SIP/2.0 200 OK E....!....................N.SIP/2.0 200 OK Accept: application/dtmf-relay,application/im-iscomposing+xml,application/sdp,text/plain,message/sipfrag,application/sip Via: SIP/2.0/UDP 192.168.1.254:5060;branch=z9hG4bK08882702 From: "muj pocitac 192.168.3.7" ;tag=as697aeb82 Allow-Events: talk,hold,refer Call-ID: 516852fc5cdeba8b6f121e220ce499f0@192.168.1.254:5060 Server: YV3/1.0.1 Contact: Supported: timer,100rel,join,tdialog,replaces,norefersub,histinfo Content-Length: 294 Content-Type: application/sdp CSeq: 102 INVITE To: ;tag=ec871b5 v=0 o=ipr1B240EF518 15394109 15394109 IN IP4 192.168.3.17 s=Asterisk PBX GIT-master-838583783f c=IN IP4 192.168.3.17 t=0 0 m=audio 32900 RTP/AVP 8 0 101 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=sendrecv a=fmtp:101 0-16 a=maxptime:60 a=ptime:20 14:29:47.100216 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: ACK sip:9102@192.168.3.17:5060 SIP/2.0 E...a...@.................. ACK sip:9102@192.168.3.17:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.254:5060;branch=z9hG4bK3e48f509 Max-Forwards: 70 From: "muj pocitac 192.168.3.7" ;tag=as697aeb82 To: ;tag=ec871b5 Contact: Call-ID: 516852fc5cdeba8b6f121e220ce499f0@192.168.1.254:5060 CSeq: 102 ACK User-Agent: Asterisk PBX GIT-master-838583783f Content-Length: 0 Podruhe Alice vola BOBa tedy stejna situace jako nahore 14:29:47.101113 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: INVITE sip:9102@192.168.3.17:5060 SIP/2.0 E...a...@................y..INVITE sip:9102@192.168.3.17:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.254:5060;branch=z9hG4bK4c78b27a Max-Forwards: 70 From: "muj pocitac 192.168.3.7" ;tag=as697aeb82 To: ;tag=ec871b5 Contact: Call-ID: 516852fc5cdeba8b6f121e220ce499f0@192.168.1.254:5060 CSeq: 103 INVITE User-Agent: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Type: application/sdp Content-Length: 299 v=0 o=root 41783995 41783996 IN IP4 192.168.1.254 s=Asterisk PBX GIT-master-838583783f c=IN IP4 185.100.196.77 t=0 0 m=audio 8000 RTP/AVP 8 0 3 101 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=maxptime:150 a=sendrecv 14:29:47.339405 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: SIP/2.0 200 OK E...."...................uM.SIP/2.0 200 OK Accept: application/dtmf-relay,application/im-iscomposing+xml,application/sdp,text/plain,message/sipfrag,application/sip Via: SIP/2.0/UDP 192.168.1.254:5060;branch=z9hG4bK4c78b27a From: "muj pocitac 192.168.3.7" ;tag=as697aeb82 Allow-Events: talk,hold,refer Call-ID: 516852fc5cdeba8b6f121e220ce499f0@192.168.1.254:5060 Server: YV3/1.0.1 Contact: Supported: timer,100rel,join,tdialog,replaces,norefersub,histinfo Content-Length: 270 Content-Type: application/sdp CSeq: 103 INVITE To: ;tag=ec871b5 v=0 o=ipr1B240EF518 15394109 15394110 IN IP4 192.168.3.17 s=Asterisk PBX GIT-master-838583783f c=IN IP4 192.168.3.17 t=0 0 m=audio 32900 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=sendrecv a=fmtp:101 0-16 a=maxptime:60 a=ptime:20 14:29:47.339642 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: ACK sip:9102@192.168.3.17:5060 SIP/2.0 E...aJ..@.................. ACK sip:9102@192.168.3.17:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.254:5060;branch=z9hG4bK4d3fe6d5 Max-Forwards: 70 From: "muj pocitac 192.168.3.7" ;tag=as697aeb82 To: ;tag=ec871b5 Contact: Call-ID: 516852fc5cdeba8b6f121e220ce499f0@192.168.1.254:5060 CSeq: 103 ACK User-Agent: Asterisk PBX GIT-master-838583783f Content-Length: 0 14:29:54.887860 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: BYE sip:9104@192.168.1.254:5060 SIP/2.0 E.........................O.BYE sip:9104@192.168.1.254:5060 SIP/2.0 User-Agent: YV3/1.0.1 Via: SIP/2.0/UDP 192.168.3.17:5060;rport;branch=z9hG4bK4a748810 From: ;tag=ec871b5 Max-Forwards: 70 Call-ID: 516852fc5cdeba8b6f121e220ce499f0@192.168.1.254:5060 Contact: Content-Length: 0 CSeq: 49134 BYE To: "muj pocitac 192.168.3.7" ;tag=as697aeb82 14:29:54.888278 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: SIP/2.0 200 OK E...e...@..................dSIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bK4a748810;received=192.168.3.17;rport=5060 From: ;tag=ec871b5 To: "muj pocitac 192.168.3.7" ;tag=as697aeb82 Call-ID: 516852fc5cdeba8b6f121e220ce499f0@192.168.1.254:5060 CSeq: 49134 BYE Server: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Length: 0 a tady konec ------------------------- Bob vola Alici tady volam z 9102 na asterisk, pres nej do meho PC takze volam na 9104 sleduji pakety do telefonu 9102 , tedy Bob 3.17 9102 je 192.168.3.17 , je to ten volajici , Bob Bob -> asterisk zaciname volani a opat sledujeme pomoci tcpdump pakety mezi 192.168.3.17 a 192.168.1.254 Smer sestaveni hovoru je opacny nez nahore, tedy zacina Bob a chybi tady hlavicka z tcpdump - netrusim, kam se ztratila 14:31:56.026723 IP .5060: SIP: INVITE sip:9104@192.168.1.254 SIP/2.0 E...........................INVITE sip:9104@192.168.1.254 SIP/2.0 User-Agent: YV3/1.0.1 Accept: application/dtmf-relay,application/im-iscomposing+xml,application/sdp,text/plain,message/sipfrag,application/sip Via: SIP/2.0/UDP 192.168.3.17:5060;rport;branch=z9hG4bK46285a15 From: "9102" ;tag=4b969be4 Allow: UPDATE,INFO,PRACK,MESSAGE,REFER,NOTIFY,INVITE,ACK,OPTIONS,BYE,CANCEL History-Info: ;index=1 Allow-Events: talk,hold,refer Max-Forwards: 70 Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 Contact: Session-Expires: 1800 Supported: timer,100rel,join,tdialog,replaces,norefersub,histinfo Content-Length: 260 Content-Type: application/sdp CSeq: 30065 INVITE To: v=0 o=ipr1B240EF518 15394246 15394246 IN IP4 192.168.3.17 s=- c=IN IP4 192.168.3.17 t=0 0 m=audio 32902 RTP/AVP 18 8 0 101 a=rtpmap:18 G729/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=ptime:20 a=fmtp:101 0-16 dalsi paket tady Asterisk znovu zada o potvrzeni hesla proste po nejake dobe platnost hesla vyprsi a tady vidime dotaz na heslo behem sestavovani hovoru 14:31:56.027135 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: SIP/2.0 401 Unauthorized E..G....@.dP.............3..SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bK46285a15;received=192.168.3.17;rport=5060 From: "9102" ;tag=4b969be4 To: ;tag=as2fa6d021 Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 CSeq: 30065 INVITE Server: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="121df18b" Content-Length: 0 Bob -> Asterisk Bob odpovida 14:31:56.093626 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: ACK sip:9104@192.168.1.254 SIP/2.0 E..f.....................R..ACK sip:9104@192.168.1.254 SIP/2.0 To: ;tag=as2fa6d021 User-Agent: YV3/1.0.1 Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bK46285a15 From: "9102" ;tag=4b969be4 Content-Length: 0 CSeq: 30065 ACK Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 Max-Forwards: 70 Bob posila heslo 14:31:56.177822 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: INVITE sip:9104@192.168.1.254 SIP/2.0 E.........._..............o2INVITE sip:9104@192.168.1.254 SIP/2.0 Accept: application/dtmf-relay,application/im-iscomposing+xml,application/sdp,text/plain,message/sipfrag,application/sip Allow: UPDATE,INFO,PRACK,MESSAGE,REFER,NOTIFY,INVITE,ACK,OPTIONS,BYE,CANCEL Allow-Events: talk,hold,refer Authorization: Digest nonce="121df18b", username="9102", realm="asterisk", uri="sip:9104@192.168.1.254", response="730fd2325b7691678beec93fdb225519", algorithm=MD5 Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 Session-Expires: 1800 Contact: Supported: timer,100rel,join,tdialog,replaces,norefersub,histinfo Content-Length: 260 Content-Type: application/sdp CSeq: 30066 INVITE To: User-Agent: YV3/1.0.1 Via: SIP/2.0/UDP 192.168.3.17:5060;rport;branch=z9hG4bKdec50c9 From: "9102" ;tag=4b969be4 History-Info: ;index=1 P-IPRAuth: asterisk Max-Forwards: 70 v=0 o=ipr1B240EF518 15394246 15394246 IN IP4 192.168.3.17 s=- c=IN IP4 192.168.3.17 t=0 0 m=audio 32902 RTP/AVP 18 8 0 101 a=rtpmap:18 G729/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=ptime:20 a=fmtp:101 0-16 heslo je v radku Authorization: Digest nonce="121df18b", username="9102", realm="asterisk", uri="sip:9104@192.168.1.254", response="730fd2325b7691678beec93fdb225519", algorithm=MD5 nonce - cislo, ktere se posle jenom jednou odpoved - zahesovane heslo response="730fd2325b7691678beec93fdb225519", algoritmus - jak se to hash-uje algorithm=MD5 Asterisk -> Bob 14:31:56.179266 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: SIP/2.0 100 Trying E..2.h..@.c.................SIP/2.0 100 Trying Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bKdec50c9;received=192.168.3.17;rport=5060 From: "9102" ;tag=4b969be4 To: Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 CSeq: 30066 INVITE Server: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Session-Expires: 1800;refresher=uas Contact: Content-Length: 0 Alice pres Asteriska odpovida, ze zvoni na druhe strane Alice poslala paket Ringing a tento paket dosel na druhe strane Bobovi 14:32:12.071954 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: SIP/2.0 180 Ringing E..B....@.;tag=4b969be4 To: ;tag=as06a9723c Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 CSeq: 30066 INVITE Server: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Session-Expires: 1800;refresher=uas Contact: Content-Length: 0 Alice vyzvedla - ASI opet paket od Asterika k Bobovi 14:32:19.026997 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: SIP/2.0 200 OK E.......@.1..............r..SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bKdec50c9;received=192.168.3.17;rport=5060 From: "9102" ;tag=4b969be4 To: ;tag=as06a9723c Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 CSeq: 30066 INVITE Server: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Session-Expires: 1800;refresher=uas Contact: Content-Type: application/sdp Require: timer Content-Length: 280 v=0 o=root 1852259592 1852259592 IN IP4 192.168.1.254 s=Asterisk PBX GIT-master-838583783f c=IN IP4 192.168.1.254 t=0 0 m=audio 10460 RTP/AVP 8 0 101 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=maxptime:150 a=sendrecv A tady je finalni ACK 14:32:19.062103 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: ACK sip:9104@192.168.1.254:5060 SIP/2.0 E..j.....................V..ACK sip:9104@192.168.1.254:5060 SIP/2.0 To: ;tag=as06a9723c User-Agent: YV3/1.0.1 Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bK3be956d From: "9102" ;tag=4b969be4 Content-Length: 0 CSeq: 30066 ACK Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 Max-Forwards: 70 ----------------------------------------------------------------- Podruhe tentokrat Asterisk vola BOBa stejna strana spojeni jako vyse, ale obraceny smer sestaveni spojeni 14:32:19.062296 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: INVITE sip:9102@192.168.3.17:5060 SIP/2.0 E.......@.1..............l..INVITE sip:9102@192.168.3.17:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.254:5060;branch=z9hG4bK6161c535;rport Max-Forwards: 70 From: ;tag=as06a9723c To: "9102" ;tag=4b969be4 Contact: Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 CSeq: 102 INVITE User-Agent: Asterisk PBX GIT-master-838583783f Session-Expires: 1800;refresher=uac Min-SE: 90 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Type: application/sdp Content-Length: 256 v=0 o=root 1852259592 1852259593 IN IP4 192.168.1.254 s=Asterisk PBX GIT-master-838583783f c=IN IP4 185.100.196.77 t=0 0 m=audio 8000 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=maxptime:150 a=sendrecv Bob vyzvednul ???? Asi 14:32:19.238907 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: SIP/2.0 200 OK E...........................SIP/2.0 200 OK Accept: application/dtmf-relay,application/im-iscomposing+xml,application/sdp,text/plain,message/sipfrag,application/sip Via: SIP/2.0/UDP 192.168.1.254:5060;branch=z9hG4bK6161c535;rport=5060;received=192.168.1.254 From: ;tag=as06a9723c Allow: UPDATE,INFO,PRACK,MESSAGE,REFER,NOTIFY,INVITE,ACK,OPTIONS,BYE,CANCEL Require: timer Allow-Events: talk,hold,refer Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 Server: YV3/1.0.1 Contact: Session-Expires: 1800;refresher=uac Supported: timer,100rel,join,tdialog,replaces,norefersub,histinfo Content-Length: 270 Content-Type: application/sdp CSeq: 102 INVITE To: "9102" ;tag=4b969be4 v=0 o=ipr1B240EF518 15394246 15394247 IN IP4 192.168.3.17 s=Asterisk PBX GIT-master-838583783f c=IN IP4 192.168.3.17 t=0 0 m=audio 32902 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=sendrecv a=fmtp:101 0-16 a=maxptime:60 a=ptime:20 14:32:19.239422 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: ACK sip:9102@192.168.3.17:5060 SIP/2.0 E....=..@.2.................ACK sip:9102@192.168.3.17:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.254:5060;branch=z9hG4bK6c656446;rport Max-Forwards: 70 From: ;tag=as06a9723c To: "9102" ;tag=4b969be4 Contact: Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 CSeq: 102 ACK User-Agent: Asterisk PBX GIT-master-838583783f Content-Length: 0 **************** koncime - zavesuji 14:32:24.653647 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: BYE sip:9104@192.168.1.254:5060 SIP/2.0 E..........................UBYE sip:9104@192.168.1.254:5060 SIP/2.0 User-Agent: YV3/1.0.1 Via: SIP/2.0/UDP 192.168.3.17:5060;rport;branch=z9hG4bKf3b4bcd From: "9102" ;tag=4b969be4 Max-Forwards: 70 Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 Contact: Content-Length: 0 CSeq: 30067 BYE To: ;tag=as06a9723c 14:32:24.654255 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: SIP/2.0 200 OK E.......@.%................JSIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bKf3b4bcd;received=192.168.3.17;rport=5060 From: "9102" ;tag=4b969be4 To: ;tag=as06a9723c Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 CSeq: 30067 BYE Server: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Length: 0 --------------------------------- volam z 9104 na 9111 , to neexistuje ale unauthorized znamena, ze je blbe heslo 14:33:25.856568 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: INVITE sip:9111@192.168.1.254 SIP/2.0 E........................ ..INVITE sip:9111@192.168.1.254 SIP/2.0 User-Agent: YV3/1.0.1 Accept: application/dtmf-relay,application/ im-iscomposing+xml,application/sdp,text/plain,message/sipfrag,application/sip Via: SIP/2.0/UDP 192.168.3.17:5060;rport;branch=z9hG4bK39f7a4b From: "9102" ;tag=90dbc1a Allow: UPDATE,INFO,PRACK,MESSAGE,REFER,NOTIFY,INVITE,ACK,OPTIONS,BYE,CANCEL History-Info: ;index=1 Allow-Events: talk,hold,refer Max-Forwards: 70 Call-ID: bc06143f-44a8809e-57d5bd6f-2364d7e3@192.168.3.17 Contact: Session-Expires: 1800 Supported: timer,100rel,join,tdialog,replaces,norefersub,histinfo Content-Length: 260 Content-Type: application/sdp CSeq: 20524 INVITE To: v=0 o=ipr1B240EF518 15394336 15394336 IN IP4 192.168.3.17 s=- c=IN IP4 192.168.3.17 t=0 0 m=audio 32904 RTP/AVP 18 8 0 101 a=rtpmap:18 G729/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=ptime:20 a=fmtp:101 0-16 14:33:25.856946 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: SIP/2.0 401 Unauthorized E..E....@.pM.............1..SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bK39f7a4b;received=192.168.3.17;rport=5060 From: "9102" ;tag=90dbc1a To: ;tag=as041e788f Call-ID: bc06143f-44a8809e-57d5bd6f-2364d7e3@192.168.3.17 CSeq: 20524 INVITE Server: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="5ad95489" Content-Length: 0 14:33:25.975803 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: ACK sip:9111@192.168.1.254 SIP/2.0 E..d.....................P..ACK sip:9111@192.168.1.254 SIP/2.0 To: ;tag=as041e788f User-Agent: YV3/1.0.1 Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bK39f7a4b From: "9102" ;tag=90dbc1a Content-Length: 0 CSeq: 20524 ACK Call-ID: bc06143f-44a8809e-57d5bd6f-2364d7e3@192.168.3.17 Max-Forwards: 70 a tim jsme skoncili ------------------------------------------------ podruhe volani na neexistujici cislo a tady je to uz snad spravne 14:33:26.008875 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: INVITE sip:9111@192.168.1.254 SIP/2.0 E..........G................INVITE sip:9111@192.168.1.254 SIP/2.0 Accept: application/dtmf-relay,application/im-iscomposing+xml,application/sdp,text/plain,message/sipfrag,application/sip Allow: UPDATE,INFO,PRACK,MESSAGE,REFER,NOTIFY,INVITE,ACK,OPTIONS,BYE,CANCEL Allow-Events: talk,hold,refer Authorization: Digest nonce="5ad95489", username="9102", realm="asterisk", uri="sip:9111@192.168.1.254", response="53f12fe0b84ae43c6a56f0d6a0fb0f30", algorithm=MD5 Call-ID: bc06143f-44a8809e-57d5bd6f-2364d7e3@192.168.3.17 Session-Expires: 1800 Contact: Supported: timer,100rel,join,tdialog,replaces,norefersub,histinfo Content-Length: 260 Content-Type: application/sdp CSeq: 20525 INVITE To: User-Agent: YV3/1.0.1 Via: SIP/2.0/UDP 192.168.3.17:5060;rport;branch=z9hG4bK62c8837 From: "9102" ;tag=90dbc1a History-Info: ;index=1 P-IPRAuth: asterisk Max-Forwards: 70 v=0 o=ipr1B240EF518 15394336 15394336 IN IP4 192.168.3.17 s=- c=IN IP4 192.168.3.17 t=0 0 m=audio 32904 RTP/AVP 18 8 0 101 a=rtpmap:18 G729/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=ptime:20 a=fmtp:101 0-16 14:33:26.010139 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: SIP/2.0 100 Trying E..1.A..@.p.................SIP/2.0 100 Trying Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bK62c8837;received=192.168.3.17;rport=5060 From: "9102" ;tag=90dbc1a To: Call-ID: bc06143f-44a8809e-57d5bd6f-2364d7e3@192.168.3.17 CSeq: 20525 INVITE Server: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Session-Expires: 1800;refresher=uas Contact: Content-Length: 0 A tady Astrisk rika, ze cislo neexistuje 14:33:26.010712 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: SIP/2.0 480 Temporarily unavailable E..).B..@.p"................SIP/2.0 480 Temporarily unavailable Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bK62c8837;received=192.168.3.17;rport=5060 From: "9102" ;tag=90dbc1a To: ;tag=as69b70e2e Call-ID: bc06143f-44a8809e-57d5bd6f-2364d7e3@192.168.3.17 CSeq: 20525 INVITE Server: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Session-Expires: 1800;refresher=uas Content-Length: 0 14:33:26.036935 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: ACK sip:9111@192.168.1.254 SIP/2.0 E..d.....................P..ACK sip:9111@192.168.1.254 SIP/2.0 To: ;tag=as69b70e2e User-Agent: YV3/1.0.1 Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bK62c8837 From: "9102" ;tag=90dbc1a Content-Length: 0 CSeq: 20525 ACK Call-ID: bc06143f-44a8809e-57d5bd6f-2364d7e3@192.168.3.17 Max-Forwards: 70 ----------------------------------- a pro jistotu jeste jednou registrace telefon 192.168.3.17 se registruje k Asteriskovi 192.168.1.254 3.17 je IP toho telefonu - 9102 , Bob a v tomto prvnim paketu NENI heslo 14:34:35.826227 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: REGISTER sip:192.168.1.254 SIP/2.0 E..K.......y.............7E.REGISTER sip:192.168.1.254 SIP/2.0 User-Agent: YV3/1.0.1 Via: SIP/2.0/UDP 192.168.3.17:5060;rport;branch=z9hG4bK4df1bfbd Expires: 3600 From: "9102" ;tag=fb04723 History-Info: ;index=1 Allow: UPDATE,INFO,PRACK,MESSAGE,REFER,NOTIFY,INVITE,ACK,OPTIONS,BYE,CANCEL Allow-Events: message-summary Max-Forwards: 70 Call-ID: d72cf133-3803cdf8-09d17c9c-c378042e@192.168.3.17-46c9 Contact: Supported: histinfo Content-Length: 0 CSeq: 1 REGISTER To: "9102" odpoved Asteriska Unauthorized 14:34:35.826634 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: SIP/2.0 401 Unauthorized E..PV...@..!.............<..SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bK4df1bfbd;received=192.168.3.17;rport=5060 From: "9102" ;tag=fb04723 To: "9102" ;tag=as4edc1a2e Call-ID: d72cf133-3803cdf8-09d17c9c-c378042e@192.168.3.17-46c9 CSeq: 1 REGISTER Server: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="07b0626b" Content-Length: 0 tady podruhe registracni paket, tentokrat s heslem 14:34:35.851790 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: REGISTER sip:192.168.1.254 SIP/2.0 E.........................A.REGISTER sip:192.168.1.254 SIP/2.0 User-Agent: YV3/1.0.1 Via: SIP/2.0/UDP 192.168.3.17:5060;rport;branch=z9hG4bK34e6fa5 Expires: 3600 From: "9102" ;tag=fb04723 Allow: UPDATE,INFO,PRACK,MESSAGE,REFER,NOTIFY,INVITE,ACK,OPTIONS,BYE,CANCEL History-Info: ;index=1 Allow-Events: message-summary P-IPRAuth: asterisk Authorization: Digest nonce="07b0626b", username="9102", realm="asterisk", uri="sip:192.168.1.254", response="a10d8ce7c87667c5f33ee1a370ea9453", algorithm=MD5 Max-Forwards: 70 Call-ID: d72cf133-3803cdf8-09d17c9c-c378042e@192.168.3.17-46c9 Contact: Supported: histinfo Content-Length: 0 CSeq: 2 REGISTER To: "9102" heslo je v radku Authorization: 5 nonce - cislo, ktere se posle jenom jednou odpoved - zahesovane heslo response="", algoritmus - jak se to hash-uje algorithm=MD5 14:34:35.852329 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: SIP/2.0 200 OK E..aV,..@................M..SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bK34e6fa5;received=192.168.3.17;rport=5060 From: "9102" ;tag=fb04723 To: "9102" ;tag=as4edc1a2e Call-ID: d72cf133-3803cdf8-09d17c9c-c378042e@192.168.3.17-46c9 CSeq: 2 REGISTER Server: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Expires: 3600 Contact: ;expires=3600 Date: Sun, 27 Mar 2022 12:34:35 GMT Content-Length: 0 jeste jednou registrace s poznamkami tak poznamky zatim nejsou, udelam pozdeji 14:34:35.826227 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: REGISTER sip:192.168.1.254 SIP/2.0 E..K.......y.............7E.REGISTER sip:192.168.1.254 SIP/2.0 User-Agent: YV3/1.0.1 Via: SIP/2.0/UDP 192.168.3.17:5060;rport;branch=z9hG4bK4df1bfbd 3.17 je IP toho telefonu - 9102 , Bob Expires: 3600 From: "9102" ;tag=fb04723 History-Info: ;index=1 Allow: UPDATE,INFO,PRACK,MESSAGE,REFER,NOTIFY,INVITE,ACK,OPTIONS,BYE,CANCEL Allow-Events: message-summary Max-Forwards: 70 Call-ID: d72cf133-3803cdf8-09d17c9c-c378042e@192.168.3.17-46c9 Contact: Supported: histinfo Content-Length: 0 CSeq: 1 REGISTER To: "9102" 14:34:35.826634 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: SIP/2.0 401 Unauthorized E..PV...@..!.............<..SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bK4df1bfbd;received=192.168.3.17;rport=5060 From: "9102" ;tag=fb04723 To: "9102" ;tag=as4edc1a2e Call-ID: d72cf133-3803cdf8-09d17c9c-c378042e@192.168.3.17-46c9 CSeq: 1 REGISTER Server: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="07b0626b" Content-Length: 0 14:34:35.851790 IP 192.168.3.17.5060 > 192.168.1.254.5060: SIP: REGISTER sip:192.168.1.254 SIP/2.0 E.........................A.REGISTER sip:192.168.1.254 SIP/2.0 User-Agent: YV3/1.0.1 Via: SIP/2.0/UDP 192.168.3.17:5060;rport;branch=z9hG4bK34e6fa5 Expires: 3600 From: "9102" ;tag=fb04723 Allow: UPDATE,INFO,PRACK,MESSAGE,REFER,NOTIFY,INVITE,ACK,OPTIONS,BYE,CANCEL History-Info: ;index=1 Allow-Events: message-summary P-IPRAuth: asterisk Authorization: Digest nonce="07b0626b", username="9102", realm="asterisk", uri="sip:192.168.1.254", response="a10d8ce7c87667c5f33ee1a370ea9453", algorithm=MD5 Max-Forwards: 70 Call-ID: d72cf133-3803cdf8-09d17c9c-c378042e@192.168.3.17-46c9 Contact: Supported: histinfo Content-Length: 0 CSeq: 2 REGISTER To: "9102" 14:34:35.852329 IP 192.168.1.254.5060 > 192.168.3.17.5060: SIP: SIP/2.0 200 OK E..aV,..@................M..SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.3.17:5060;branch=z9hG4bK34e6fa5;received=192.168.3.17;rport=5060 From: "9102" ;tag=fb04723 To: "9102" ;tag=as4edc1a2e Call-ID: d72cf133-3803cdf8-09d17c9c-c378042e@192.168.3.17-46c9 CSeq: 2 REGISTER Server: Asterisk PBX GIT-master-838583783f Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Expires: 3600 Contact: ;expires=3600 Date: Sun, 27 Mar 2022 12:34:35 GMT Content-Length: 0 ----------------------------------------------------- INVITE s poznamkami Bob -> asterisk zaciname volani 14:31:56.026723 IP 192.168.3.17.5060 > 192.168.1.254.5060 SIP: INVITE sip:9104@192.168.1.254 SIP/2.0 E...........................INVITE sip:9104@192.168.1.254 SIP/2.0 User-Agent: YV3/1.0.1 Accept: application/dtmf-relay,application/im-iscomposing+xml,application/sdp,text/plain,message/sipfrag,application/sip Via: SIP/2.0/UDP 192.168.3.17:5060;rport;branch=z9hG4bK46285a15 From: "9102" ;tag=4b969be4 Allow: UPDATE,INFO,PRACK,MESSAGE,REFER,NOTIFY,INVITE,ACK,OPTIONS,BYE,CANCEL History-Info: ;index=1 Allow-Events: talk,hold,refer Max-Forwards: 70 Call-ID: 1efdded1-46904667-f12b84e5-37d831c7@192.168.3.17 Contact: Session-Expires: 1800 Supported: timer,100rel,join,tdialog,replaces,norefersub,histinfo Content-Length: 260 Content-Type: application/sdp CSeq: 30065 INVITE To: v=0 o=ipr1B240EF518 15394246 15394246 IN IP4 192.168.3.17 s=- c=IN IP4 192.168.3.17 t=0 0 m=audio 32902 RTP/AVP 18 8 0 101 a=rtpmap:18 G729/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=ptime:20 a=fmtp:101 0-16 podivame se do RTP, formaty paketu je tam telephone-event - to je DTMF ! dale se podivame na cislicka, jsou stejna