| 720 | |
| 721 | |
| 722 | void 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 | |
| 746 | void SIPInterfaceStart() |
no test coverage detected