MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / siInit

Method siInit

SIP/SIP2Interface.cpp:722–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

720
721
722void SipInterface::siInit()
723{
724 // We use random() alot in here for SIP tags, CSeq number starting points.
725 // You MUST call srandom first or the numbers returned by random are deterministic, which will result in collisions
726 // between "random" numbers on different BTS that are using identical random number sequences.
727 struct timeval now;
728 gettimeofday(&now,NULL);
729 srandom(now.tv_usec);
730
731 // Start the ortp stuff.
732 ortp_init();
733 ortp_scheduler_init();
734 // FIXME -- Can we coordinate this with the global logger?
735 //ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR);
736
737 ortp_set_log_handler(ortpLogFunc);
738
739 mSIPSocket = new UDPSocket(gConfig.getNum("SIP.Local.Port"));
740
741 mDriveThread.start((void *(*)(void*))driveLoop2, &gSipInterface );
742 mPeriodicServiceThread.start((void *(*)(void*))periodicServiceLoop, &gSipInterface );
743}
744
745
746void SIPInterfaceStart()

Callers 1

SIPInterfaceStartFunction · 0.45

Calls 1

startMethod · 0.45

Tested by

no test coverage detected