Re: [OpenSIPStack] strange result of call->GetPartyB()
Brought to you by:
joegenbaclor
From: Joegen E. B. <jb...@so...> - 2007-05-30 12:21:40
|
Try using the SoftPhoneSIPEndPoint CallBacks instead. Example: virtual void OnDisconnected( CallSession & session, const SIPMessage & msg ); You can either use the SIP Message to get the to and From URI's or use CallSession Accessors such as: PINLINE const SIPURI & GetLocalURI()const{ return m_LocalURI; }; // from URI to be used for request PINLINE const SIPURI & GetRemoteURI()const{ return m_RemoteURI; }; // to URI to be used for requests PINLINE const SIPURI & GetTargetURI()const{ return m_TargetURI; };/// the startline URI to use for requests Joegen H.Kropf wrote: > I try to use OSS in SIP-client application. > One problem: > > =========================================== > SoftPhone.cpp > =========================================== > void SoftPhoneManager::OnClearedCall(OpalCall & call) > { > PString remoteName = '"' + call.GetPartyB() + '"'; > switch (call.GetCallEndReason()) > { > case OpalConnection::EndedByRemoteUser : > std::cout << remoteName << " has cleared the call"; > break; > ........ > ........ > } > ........ > ........ > } > =========================================== > > > Why "call.GetPartyB()" return value > "551684e4-cdf8-1810-9807-c2555659a538" instead "sip:co...@se..." ? > > In "OpalManager::SetUpCall(...)" variable "OpalCall::partyB" retrieve > value "sip:co...@se..." > > > =========================================== > opal / manager.cxx > =========================================== > BOOL OpalManager::SetUpCall(const PString & partyA, > const PString & partyB, > PString & token, > void * userData) > { > PTRACE(3, "OpalMan\tSet up call from " << partyA << " to " << partyB); > > OpalCall * call = CreateCall(); > token = call->GetToken(); > > call->SetPartyB(partyB); > ........ > ........ > } > =========================================== > > > But in "OpalCall::OnAlerting".... > > > =========================================== > opal / call.cxx > =========================================== > BOOL OpalCall::OnAlerting(OpalConnection & connection) > { > PTRACE(3, "Call\tOnAlerting " << connection); > > BOOL ok = FALSE; > > if (!LockReadWrite()) > return FALSE; > > partyB = connection.GetRemotePartyName(); > ........ > ........ > } > =========================================== > > > After "OnAlerting()", value of "partyB" is > "551684e4-cdf8-1810-9807-c2555659a538" > > Is there any way to getting NORMAL remoteName ? > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > opensipstack-devel mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensipstack-devel > > > |