MCPcopy Create free account
hub / github.com/SIPp/sipp / init

Method init

src/call.cpp:834–1085  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

832
833
834void 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;

Callers

nothing calls this directly

Calls 12

WARNINGFunction · 0.85
rtpstream_new_callFunction · 0.85
ERRORFunction · 0.85
getmicrosecondsFunction · 0.85
get_tdm_map_numberFunction · 0.85
setSrtpHeaderSizeMethod · 0.80
findMethod · 0.80
getTableMethod · 0.80
putTableMethod · 0.80
sizeMethod · 0.80
nRtdsMethod · 0.80
nextLineMethod · 0.80

Tested by

no test coverage detected