Các bài đăng bởi admin

Thiết lập server ElasticSearch trên Centos 7: Elastic – Kibana – Docker – Nginx – Letsencrypt

Link: datallboy/elastic-kibana-docker-nginx-letsencrypt: Setup a Elastic + Kibana stack in seconds! Ready for public use with TLS enabled between nodes, and automatic SSL/TLS certificates + renewal with certbot and Nginx. (github.com)

Bước 1: Chuẩn bị 1 server và tải code về hệ thống. Ở đây chúng mình dùng Centos 7

Bước 2: Sau khi đã tải về, cd đến thư mục đã giải né, chạy lệnh tạo chứng chỉ bảo mật server:

 docker-compose -f create-certs.yml run --rm create_certs

Bước 3: Thay thế DOMAINNAME.com bằng tên domain của bạn trong file nginx/config.conf và init-letsencrypt.sh

Bước 4: Chạy script sau để tạo chứng chỉ bảo mật cho server

chmod +x init-letsencrypt.sh
sudo ./init-letsencrypt.sh

Nếu hệ thống lỗi thì chạy thêm script này và khởi động lại Docker

sysctl -w vm.max_map_count=262144
sudo systemctl restart docker

Bước 5: Chạy tạo password trên es01 và lưu lại các tài khoản này

docker exec es01 /bin/bash -c "cp /usr/share/elasticsearch/config/certificates/ca/ca.crt /usr/local/share/ca-certificates"
docker exec es01 /bin/bash -c "update-ca-certificates"
docker exec es01 /bin/bash -c "bin/elasticsearch-setup-passwords auto --batch --url https://es01:9200"

Bước 6: Mở file .env, thay thế ELASTIC_PASSWORD bằng password của tài khoản kibana_system vừa tạo lại ở bước 5. Thay thế KIBANA_ENCRYPTION_KEY bằng 32 ký tự bất kỳ, được sử dụng để encrypting API keys

Bước 7: Khởi động lại image docker

docker-compose stop
docker-compose up -d

Bước 8: Đã cấu hình xong, bây giờ bạn có thể truy cập vào hệ thống với bằng domain và đã có chứng chỉ bảo mật SSL của Let’s Encrypt. Dùng tài khoản elastic và mật khẩu đã tạo ở bước 5 để đăng nhập. Chúc bạn thành công nhé !!

Nguồn: datallboy/elastic-kibana-docker-nginx-letsencrypt: Setup a Elastic + Kibana stack in seconds! Ready for public use with TLS enabled between nodes, and automatic SSL/TLS certificates + renewal with certbot and Nginx. (github.com)

Asterisk code map biến ${HANGUPCAUSE} trong dialplan

Asterisk ValueISDN Cause codes (Q.850 & Q.931 unless specified)MFC/R2SIP/PJSIPMotif
AST_CAUSE_NOT_DEFINEDCause not definedOR2_CAUSE_UNSPECIFIED  
AST_CAUSE_UNALLOCATEDUnallocated (unassigned) number 404, 485, 604 
AST_CAUSE_NO_ROUTE_TRANSIT_NET2. No route to specified transmit network   
AST_CAUSE_NO_ROUTE_DESTINATION3. No route to destination 420 
AST_CAUSE_MISDIALLED_TRUNK_PREFIX5. Misdialled trunk prefix (national use)   
AST_CAUSE_CHANNEL_UNACCEPTABLE6. Channel unacceptable   
AST_CAUSE_CALL_AWARDED_DELIVERED7. Call awarded and being delivered in an established channel   
AST_CAUSE_PRE_EMPTEDISUP – 8. Preemption   
AST_CAUSE_NUMBER_PORTED_NOT_HERE14. QoR: ported number   
AST_CAUSE_NORMAL_CLEARING16. Normal ClearingOR2_CAUSE_NORMAL_CLEARING gone, success
AST_CAUSE_USER_BUSY17. User busyOR2_CAUSE_BUSY_NUMBER486, 600busy
AST_CAUSE_NO_USER_RESPONSE18. No user responding 408expired
AST_CAUSE_NO_ANSWER19. No answer from user (user alerted)OR2_CAUSE_NO_ANSWER480, 483 
AST_CAUSE_SUBSCRIBER_ABSENT20. Subscriber absentOR2_CAUSE_UNALLOCATED_NUMBER  
AST_CAUSE_CALL_REJECTED21. Call Rejected 401, 403, 407, 603cancel, decline
AST_CAUSE_NUMBER_CHANGED22. Number changed 410 
AST_CAUSE_REDIRECTED_TO_NEW_DESTINATION23. Redirected to new destination   
AST_CAUSE_ANSWERED_ELSEWHERE26. Non-selected user clearing(ASTERISK-15057)   
AST_CAUSE_DESTINATION_OUT_OF_ORDER27. Destination out of orderOR2_CAUSE_OUT_OF_ORDER502 
AST_CAUSE_INVALID_NUMBER_FORMAT28. Invalid number format 484 
AST_CAUSE_FACILITY_REJECTED29. Facility rejected 501 
AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY30. Response to STATUS ENQUIRY   
AST_CAUSE_NORMAL_UNSPECIFIED31. Normal, unspecified   
AST_CAUSE_NORMAL_CIRCUIT_CONGESTION34. No circuit/channel available(Note that we’ve called this “Circuit/channel congestion” for a while which can cause confusion with code 42)OR2_CAUSE_NETWORK_CONGESTION general-error
AST_CAUSE_NETWORK_OUT_OF_ORDER38. Network out of order 500 
AST_CAUSE_NORMAL_TEMPORARY_FAILURE41. Temporary failure 409 
AST_CAUSE_SWITCH_CONGESTION42. Switching equipment congestion 5xxfailed-application
AST_CAUSE_ACCESS_INFO_DISCARDED43. Access information discarded   
AST_CAUSE_REQUESTED_CHAN_UNAVAIL44. Requested circuit/channel not available   
AST_CAUSE_FACILITY_NOT_SUBSCRIBED50. Requested facility not subscribed   
AST_CAUSE_OUTGOING_CALL_BARRED52. Outgoing call barred   
AST_CAUSE_INCOMING_CALL_BARRED54. Incoming call barred   
AST_CAUSE_BEARERCAPABILITY_NOTAUTH57. Bearer capability not authorized   
AST_CAUSE_BEARERCAPABILITY_NOTAVAIL58. Bearer capability not presently available 488, 606incompatible-parameters, media-error, unsupported-applications
AST_CAUSE_BEARERCAPABILITY_NOTIMPL65. Bearer capability not implemented   
AST_CAUSE_CHAN_NOT_IMPLEMENTED66. Channel type not implemented   
AST_CAUSE_FACILITY_NOT_IMPLEMENTED69. Requested facility not implemented  unsupported-transports
AST_CAUSE_INVALID_CALL_REFERENCE81. Invalid call reference value   
AST_CAUSE_INCOMPATIBLE_DESTINATION88. Incompatible destination   
AST_CAUSE_INVALID_MSG_UNSPECIFIED95. Invalid message unspecified   
AST_CAUSE_MANDATORY_IE_MISSING96. Mandatory information element is missing   
AST_CAUSE_MESSAGE_TYPE_NONEXIST97. Message type non-existent or not implemented   
AST_CAUSE_WRONG_MESSAGE98. Message not compatible with call state or message type non-existent or not implemented   
AST_CAUSE_IE_NONEXIST99. Information element nonexistent or not implemented   
AST_CAUSE_INVALID_IE_CONTENTS100. Invalid information element contents   
AST_CAUSE_WRONG_CALL_STATE101. Message not compatible with call state   
AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE102. Recover on timer expiry 504timeout
AST_CAUSE_MANDATORY_IE_LENGTH_ERROR? Mandatory IE length error   
AST_CAUSE_PROTOCOL_ERROR111. Protocol error, unspecified  failed-transport, security-error
AST_CAUSE_INTERWORKING127. Interworking, unspecified 4xx, 505, 6xxconnectivity-error

Link: Hangup Cause Mappings – Asterisk Project – Asterisk Project Wiki