#include "playCommon.hh"#include "SIPClient.hh"Include dependency graph for playSIP.cpp:

Go to the source code of this file.
Functions | |
| Medium * | createClient (UsageEnvironment &env, int verbosityLevel, char const *applicationName) |
| char * | getOptionsResponse (Medium *client, char const *url, char *username, char *password) |
| char * | getSDPDescriptionFromURL (Medium *client, char const *url, char const *username, char const *password, char const *proxyServerName, unsigned short proxyServerPortNum, unsigned short clientStartPortNum) |
| Boolean | clientSetupSubsession (Medium *client, MediaSubsession *subsession, Boolean streamUsingTCP) |
| Boolean | clientStartPlayingSession (Medium *client, MediaSession *) |
| Boolean | clientTearDownSession (Medium *client, MediaSession *) |
Variables | |
| Boolean | allowProxyServers = True |
| Boolean | controlConnectionUsesTCP = False |
| Boolean | supportCodecSelection = True |
| char const * | clientProtocolName = "SIP" |
| Boolean clientSetupSubsession | ( | Medium * | client, | |
| MediaSubsession * | subsession, | |||
| Boolean | streamUsingTCP | |||
| ) |
Definition at line 87 of file playSIP.cpp.
References False, NULL, MediaSubsession::sessionId, RTSPClient::setupMediaSubsession(), subsession, and True.
00088 { 00089 subsession->sessionId = "mumble"; // anything that's non-NULL will work 00090 return True; 00091 }
| Boolean clientStartPlayingSession | ( | Medium * | client, | |
| MediaSession * | ||||
| ) |
Definition at line 93 of file playSIP.cpp.
References duration, False, initialSeekTime, NULL, RTSPClient::playMediaSession(), scale, SIPClient::sendACK(), and session.
00094 { 00095 SIPClient* sipClient = (SIPClient*)client; 00096 return sipClient->sendACK(); 00097 //##### This isn't quite right, because we should really be allowing 00098 //##### for the possibility of this ACK getting lost, by retransmitting 00099 //##### it *each time* we get a 2xx response from the server. 00100 }
| Boolean clientTearDownSession | ( | Medium * | client, | |
| MediaSession * | ||||
| ) |
Definition at line 102 of file playSIP.cpp.
References False, NULL, SIPClient::sendBYE(), session, and RTSPClient::teardownMediaSession().
00103 { 00104 if (client == NULL) return False; 00105 SIPClient* sipClient = (SIPClient*)client; 00106 return sipClient->sendBYE(); 00107 }
| Medium* createClient | ( | UsageEnvironment & | env, | |
| int | verbosityLevel, | |||
| char const * | applicationName | |||
| ) |
Definition at line 23 of file playSIP.cpp.
References RTSPClient::createNew(), SIPClient::createNew(), desiredAudioRTPPayloadFormat, env, mimeSubtype, and tunnelOverHTTPPortNum.
00024 { 00025 // First, trim any directory prefixes from "applicationName": 00026 char const* suffix = &applicationName[strlen(applicationName)]; 00027 while (suffix != applicationName) { 00028 if (*suffix == '/' || *suffix == '\\') { 00029 applicationName = ++suffix; 00030 break; 00031 } 00032 --suffix; 00033 } 00034 00035 extern unsigned char desiredAudioRTPPayloadFormat; 00036 extern char* mimeSubtype; 00037 return SIPClient::createNew(env, 00038 desiredAudioRTPPayloadFormat, mimeSubtype, 00039 verbosityLevel, applicationName); 00040 }
| char* getOptionsResponse | ( | Medium * | client, | |
| char const * | url, | |||
| char * | username, | |||
| char * | password | |||
| ) |
Definition at line 42 of file playSIP.cpp.
References Medium::envir(), NULL, RTSPClient::sendOptionsCmd(), and UsageEnvironment::setResultMsg().
00043 { 00044 SIPClient* sipClient = (SIPClient*)client; 00045 sipClient->envir().setResultMsg("NOT SUPPORTED IN CLIENT");//##### 00046 return NULL;//##### 00047 }
| char* getSDPDescriptionFromURL | ( | Medium * | client, | |
| char const * | url, | |||
| char const * | username, | |||
| char const * | password, | |||
| char const * | proxyServerName, | |||
| unsigned short | proxyServerPortNum, | |||
| unsigned short | clientStartPortNum | |||
| ) |
Definition at line 49 of file playSIP.cpp.
References NetAddress::data(), RTSPClient::describeStatus(), RTSPClient::describeURL(), RTSPClient::describeWithPassword(), Medium::envir(), NetAddressList::firstAddress(), SIPClient::invite(), SIPClient::inviteStatus(), SIPClient::inviteWithPassword(), NULL, NetAddressList::numAddresses(), SIPClient::setClientStartPortNum(), SIPClient::setProxyServer(), and statusCode.
00053 { 00054 SIPClient* sipClient = (SIPClient*)client; 00055 00056 if (proxyServerName != NULL) { 00057 // Tell the SIP client about the proxy: 00058 NetAddressList addresses(proxyServerName); 00059 if (addresses.numAddresses() == 0) { 00060 client->envir() << "Failed to find network address for \"" 00061 << proxyServerName << "\"\n"; 00062 } else { 00063 NetAddress address = *(addresses.firstAddress()); 00064 unsigned proxyServerAddress // later, allow for IPv6 ##### 00065 = *(unsigned*)(address.data()); 00066 if (proxyServerPortNum == 0) proxyServerPortNum = 5060; // default 00067 00068 sipClient->setProxyServer(proxyServerAddress, proxyServerPortNum); 00069 } 00070 } 00071 00072 if (clientStartPortNum == 0) clientStartPortNum = 8000; // default 00073 sipClient->setClientStartPortNum(clientStartPortNum); 00074 00075 char* result; 00076 if (username != NULL && password != NULL) { 00077 result = sipClient->inviteWithPassword(url, username, password); 00078 } else { 00079 result = sipClient->invite(url); 00080 } 00081 00082 extern unsigned statusCode; 00083 statusCode = sipClient->inviteStatus(); 00084 return result; 00085 }
Definition at line 109 of file playSIP.cpp.
| char const* clientProtocolName = "SIP" |
Definition at line 112 of file playSIP.cpp.
Definition at line 110 of file playSIP.cpp.
Definition at line 111 of file playSIP.cpp.
1.5.2