Mục tiêu thực hành:
- Kết nối vào giao diện CLI của FreeSwitch (FusionPBX).
- Kích hoạt tính năng Debug SIP Message tại giao diện CLI của FreeSwitch.
- Khảo sát các bản tin SIP Message tại giao diện CLI của FreeSwitch.
Các bước triển khai:
Kết nối vào giao diện CLI của FreeSwitch (FusionPBX).
[root@localhost ~]# fs_cli.=======================================================.| _____ ____ ____ _ ___ || | ___/ ___| / ___| | |_ _| || | |_ \___ \ | | | | | | || | _| ___) | | |___| |___ | | || |_| |____/ \____|_____|___| || |.=======================================================.| Anthony Minessale II, Ken Rice, || Michael Jerris, Travis Cross || FreeSWITCH (http://www.freeswitch.org) || Paypal Donations Appreciated: paypal@freeswitch.org || Brought to you by ClueCon http://www.cluecon.com/ |.=======================================================..=======================================================================================================.| _ _ ____ _ ____ || / \ _ __ _ __ _ _ __ _| | / ___| |_ _ ___ / ___|___ _ __ || / _ \ | '_ \| '_ \| | | |/ _` | | | | | | | | |/ _ \ | / _ \| '_ \ || / ___ \| | | | | | | |_| | (_| | | | |___| | |_| | __/ |__| (_) | | | | || /_/ \_\_| |_|_| |_|\__,_|\__,_|_| \____|_|\__,_|\___|\____\___/|_| |_| || || ____ _____ ____ ____ __ || | _ \_ _/ ___| / ___|___ _ __ / _| ___ _ __ ___ _ __ ___ ___ || | |_) || || | | | / _ \| '_ \| |_ / _ \ '__/ _ \ '_ \ / __/ _ \ || | _ < | || |___ | |__| (_) | | | | _| __/ | | __/ | | | (_| __/ || |_| \_\|_| \____| \____\___/|_| |_|_| \___|_| \___|_| |_|\___\___| || || ____ _ ____ || / ___| |_ _ ___ / ___|___ _ __ ___ ___ _ __ ___ || | | | | | | |/ _ \ | / _ \| '_ \ / __/ _ \| '_ ` _ \ || | |___| | |_| | __/ |__| (_) | | | | _ | (_| (_) | | | | | | || \____|_|\__,_|\___|\____\___/|_| |_| (_) \___\___/|_| |_| |_| || |.=======================================================================================================.Type /help <enter> to see a list of commands+OK log level [7]freeswitch@localhost.localdomain>
Kích hoạt tính năng Debug SIP Message tại giao diện CLI của FreeSwitch.
freeswitch@localhost.localdomain> sofia profile internal siptrace onEnabled sip debugging on internalfreeswitch@localhost.localdomain> sofia profile external siptrace onEnabled sip debugging on externalfreeswitch@localhost.localdomain>
Khảo sát các bản tin SIP Message tại giao diện CLI của FreeSwitch.
freeswitch@localhost.localdomain> sofia profile internal siptrace onEnabled sip debugging on internalrecv 549 bytes from udp/[192.168.100.150]:50194 at 14:06:01.123224:------------------------------------------------------------------------REGISTER sip:192.168.100.122 SIP/2.0Via: SIP/2.0/UDP 192.168.100.150:50194;rport;branch=z9hG4bKPj63c058884f524d62af9b041dcf6d6db9Max-Forwards: 70From: "5001" <sip:5001@192.168.100.122>;tag=e90dd071f8fe43b4bbd58fe1e9b1aaa5To: "5001" <sip:5001@192.168.100.122>Call-ID: 0c01e5bbcc1f4466978e644d29e9f07bCSeq: 12973 REGISTERUser-Agent: MicroSIP/3.20.5Contact: "5001" <sip:5001@192.168.100.150:50194;ob>Expires: 300Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONSContent-Length: 0send 639 bytes to udp/[192.168.100.150]:50194 at 14:06:01.123684:------------------------------------------------------------------------SIP/2.0 401 UnauthorizedVia: SIP/2.0/UDP 192.168.100.150:50194;rport=50194;branch=z9hG4bKPj63c058884f524d62af9b041dcf6d6db9From: "5001" <sip:5001@192.168.100.122>;tag=e90dd071f8fe43b4bbd58fe1e9b1aaa5To: "5001" <sip:5001@192.168.100.122>;tag=7HSZct5eercmDCall-ID: 0c01e5bbcc1f4466978e644d29e9f07bCSeq: 12973 REGISTERUser-Agent: FreeSWITCHAllow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBESupported: timer, path, replacesWWW-Authenticate: Digest realm="192.168.100.122", nonce="4b51820a-10fb-4edf-9e2d-561089a0e20c", algorithm=MD5, qop="auth"Content-Length: 02021-05-10 14:06:01.110717 [WARNING] sofia_reg.c:1795 SIP auth challenge (REGISTER) on sofia profile 'internal' for [5001@192.168.100.122] from ip 192.168.100.150recv 812 bytes from udp/[192.168.100.150]:50194 at 14:06:01.124234:------------------------------------------------------------------------REGISTER sip:192.168.100.122 SIP/2.0Via: SIP/2.0/UDP 192.168.100.150:50194;rport;branch=z9hG4bKPj95e18673e5b448669b7059ff95dc97a5Max-Forwards: 70From: "5001" <sip:5001@192.168.100.122>;tag=e90dd071f8fe43b4bbd58fe1e9b1aaa5To: "5001" <sip:5001@192.168.100.122>Call-ID: 0c01e5bbcc1f4466978e644d29e9f07bCSeq: 12974 REGISTERUser-Agent: MicroSIP/3.20.5Contact: "5001" <sip:5001@192.168.100.150:50194;ob>Expires: 300Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONSAuthorization: Digest username="5001", realm="192.168.100.122", nonce="4b51820a-10fb-4edf-9e2d-561089a0e20c", uri="sip:192.168.100.122", response="55569ba3d5d0a19322de1d1e3313b3ea", algorithm=MD5, cnonce="c1ca07ce65314bfeabf892ade9225fab", qop=auth, nc=00000001Content-Length: 02021-05-10 14:06:01.130671 [ERR] switch_cpp.cpp:1465 [cache] can not write file `/var/cache/fusionpbx/directory.5001@192.168.100.122.e436d359-f2ee-4b67-b8b7-48d812b1283f.tmp`: /var/cache/fusionpbx/directory.5001@192.168.100.122.e436d359-f2ee-4b67-b8b7-48d812b1283f.tmp: Permission deniedsend 601 bytes to udp/[192.168.100.150]:50194 at 14:06:01.133250:------------------------------------------------------------------------SIP/2.0 200 OKVia: SIP/2.0/UDP 192.168.100.150:50194;rport=50194;branch=z9hG4bKPj95e18673e5b448669b7059ff95dc97a5From: "5001" <sip:5001@192.168.100.122>;tag=e90dd071f8fe43b4bbd58fe1e9b1aaa5To: "5001" <sip:5001@192.168.100.122>;tag=8tjreNpjB126rCall-ID: 0c01e5bbcc1f4466978e644d29e9f07bCSeq: 12974 REGISTERContact: <sip:5001@192.168.100.150:50194;ob>;expires=300Date: Mon, 10 May 2021 07:06:01 GMTUser-Agent: FreeSWITCHAllow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBESupported: timer, path, replacesContent-Length: 0freeswitch@localhost.localdomain> /exit
Mọi thắc mắc các bạn vui lòng liên hệ với mình thông qua kênh Zalo (Jade Bùi) 076.877.2021.
0 comments