| 832 | |
| 833 | |
| 834 | void call::init(scenario * call_scenario, SIPpSocket *socket, struct sockaddr_storage *dest, const char * p_id, int userId, bool ipv6, bool isAutomatic, bool isInitCall) |
| 835 | { |
| 836 | #ifdef USE_TLS |
| 837 | _srtpctxdebugfile = nullptr; |
| 838 | |
| 839 | if (srtpcheck_debug) |
| 840 | { |
| 841 | if (sendMode == MODE_CLIENT) |
| 842 | { |
| 843 | _srtpctxdebugfile = fopen("srtpctxdebugfile_uac", "w"); |
| 844 | } |
| 845 | else if (sendMode == MODE_SERVER) |
| 846 | { |
| 847 | _srtpctxdebugfile = fopen("srtpctxdebugfile_uas", "w"); |
| 848 | } |
| 849 | |
| 850 | if (_srtpctxdebugfile == nullptr) |
| 851 | { |
| 852 | /* error encountered opening srtp ctx debug file */ |
| 853 | WARNING("Error encountered opening srtp ctx debug file"); |
| 854 | } |
| 855 | } |
| 856 | #endif // USE_TLS |
| 857 | |
| 858 | _sessionStateCurrent = eNoSession; |
| 859 | _sessionStateOld = eNoSession; |
| 860 | |
| 861 | this->call_scenario = call_scenario; |
| 862 | zombie = false; |
| 863 | |
| 864 | debugBuffer = nullptr; |
| 865 | debugLength = 0; |
| 866 | |
| 867 | msg_index = 0; |
| 868 | last_send_index = 0; |
| 869 | last_send_msg = nullptr; |
| 870 | last_send_len = 0; |
| 871 | |
| 872 | last_recv_hash = 0; |
| 873 | last_recv_index = -1; |
| 874 | last_recv_msg = nullptr; |
| 875 | |
| 876 | last_recv_invite_cseq = 0; |
| 877 | |
| 878 | recv_retrans_hash = 0; |
| 879 | recv_retrans_recv_index = -1; |
| 880 | recv_retrans_send_index = -1; |
| 881 | |
| 882 | dialog_route_set = nullptr; |
| 883 | next_req_url = nullptr; |
| 884 | |
| 885 | cseq = 0; |
| 886 | |
| 887 | next_retrans = 0; |
| 888 | nb_retrans = 0; |
| 889 | nb_last_delay = 0; |
| 890 | |
| 891 | paused_until = 0; |
nothing calls this directly
no test coverage detected