Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
RTC client based SIP clients with Brekeke
Author Message
buddhikagune
Brekeke Newbie


Joined: 13 Jun 2007
Posts: 3

PostPosted: Wed Jun 13, 2007 4:49 am    Post subject: RTC client based SIP clients with Brekeke Reply with quote

1. Brekeke Product Name and version: 2.1.0.1/225

2. Java version:

3. OS type and the version: Win XP SP2

4. UA (phone), gateway or other hardware/software involved:

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/networkpatterns.html :

6. Your problem:

I plan to develop a SIP application using the Microsoft RTC client SDK ver1.3. Is it possible for my application to be used with Brekeke SIP server? Should any RTC client based application be able to Log in to Brekeke SIP server without a problem? Is there any precautions that I must take in writing the application?

Thanks in advance

Buddhika

_________________
- Sri Lanka -
Back to top
View user's profile
Ahmed
Brekeke Junior Member


Joined: 20 Jun 2007
Posts: 8

PostPosted: Wed Jun 20, 2007 4:07 am    Post subject: Reply with quote

Hi buddhikagune !
I just created an account in this forum to get an answer to that same question.
But here I now found something which I want you to know too, and which can be an indication of a positive answer:
In the list of compatible SIP phones, Brekeke states that Microsoft Messenge is one of them!
In return, Microsoft itself says that its Messenger was developed using RTC API!
Back to top
View user's profile
job
Brekeke Addict


Joined: 28 Feb 2007
Posts: 34

PostPosted: Wed Jun 20, 2007 9:53 am    Post subject: Reply with quote

die you select "UDP" ? and set correct proxy address ?
If so try capturing the packets and see what is happening.
Back to top
View user's profile
buddhikagune
Brekeke Newbie


Joined: 13 Jun 2007
Posts: 3

PostPosted: Thu Jun 21, 2007 2:23 am    Post subject: Development with RTC client SDK Reply with quote

job wrote:
die you select "UDP" ? and set correct proxy address ?
If so try capturing the packets and see what is happening.


Well guys, thanks for the replies. I think I found my answer elsewhere. I tried logging in to Bekeke server using the new windows messenger which has SIP capabilities and was successful. So I guess RTC client SDK could be used with any normal SIP server. I'll give you my code if am successful.

BTW, for those who are into development with C#.net using RTC client, here is an article which would help.

http://www.learn247.net/werock247/labs/rtc/csharp/index.htm

rgds,

Buddhika

_________________
- Sri Lanka -
Back to top
View user's profile
Ahmed
Brekeke Junior Member


Joined: 20 Jun 2007
Posts: 8

PostPosted: Fri Jun 22, 2007 4:42 am    Post subject: Reply with quote

buddhikagune it is good you succeeded logging to BSS using messenger,
I am using RTC API, and till now I couldn't log in to BSS using RTCSample sample program in the RTC SDK.
My fear is that there is an incompatibility problem, although signs say that things are OK.
When your code using RTC API succeeds then at least tell us so we pursue work with no doubts or fear !!
Back to top
View user's profile
Ahmed
Brekeke Junior Member


Joined: 20 Jun 2007
Posts: 8

PostPosted: Wed Jun 27, 2007 4:15 am    Post subject: Reply with quote

buddhikagune, the RTC API is well compliant with BSS !
I made some changes to the code of RTCSample and managed to establish a session between two instances of the program locally!
Remains the data now !
Back to top
View user's profile
buddhikagune
Brekeke Newbie


Joined: 13 Jun 2007
Posts: 3

PostPosted: Wed Jun 27, 2007 6:06 am    Post subject: Glad to hear that Reply with quote

Hi Ahmed,

I'm glad to hear that you suceeded with Brekeke.
I couldnt continue my development for few days now. Anyway, would be pleased if you could share us at least part of the code u tried.

Thanks

Buddhika

_________________
- Sri Lanka -
Back to top
View user's profile
Ahmed
Brekeke Junior Member


Joined: 20 Jun 2007
Posts: 8

PostPosted: Mon Jul 02, 2007 7:59 am    Post subject: Reply with quote

Evrything is done through RTCModule class,
there are 3 main public functions:
Initialize : where you gather init params like the windows handle for video, note also that the window procedure handles a custom-event fired by IRTCEventNotification, infact i didn't want to handle async notitications directly from IRTCEventNotification to the RTCModule class which embeds and rtcevents object, but rather fire an message, and then let it be routed to RTCModule via the window proc, so that evrything is serialized, ie: evrything executes in the context of the main thread that owns RTCModule object and owns the window handle.Of course I feared sync problems when yet trying to do a very compact module.

there is then PostRegisterAtBSS which triggers provisionning and of course the actual registration is defered untill an provisioning completion event is fired.

Finally there's DoCall which creates a session between two UAs.


Now to the other functions there are many, I also discontinued developments for these days, but I intend to develop upon this abstraction untill I get something worjing in a separate Dlg application, then finally insert the module into my main application where I need audio/video chat (no presence, no groups, no text chat, no app sharing, etc).



Here's the .h file where you can note how I re-organized the RTCSample code, and give me your email to send you the whole project, if the organization seems acceptable to you.


class CRTCModule
{
public:
CRTCModule(void);
CMainDlg* m_pDlg;
void PrintString(CString str);
public:
~CRTCModule(void);
private:
IRTCClient2 * m_pClient;
CRTCEvents * m_pEvents;
int login_status;//1 for unlogged, 2 for logReq_pending, 3 for logged
IRTCProfile2 * m_pProfile;
int session_status;//1 for nothing, 2 for calling, 3 for ok
IRTCSession * m_pSession;
RTC_SESSION_STATE m_enState;
public:
BOOL Initialize(HWND m_hWnd,CString& strErr);
BOOL PostRegisterAtBSS(CString strURI,CString server,CString& strErr);
BOOL DoCall(CString strURI,CString& strErr);
void OnRTCEvent(UINT uMsg, WPARAM wParam, LPARAM lParam);
private:
/////INITIALIZE RELATED
BOOL InitRTCObject(CString& strErr);//Called by Initialize;
BOOL _SetRTCObjectAnswerModeAndAllowedPorts(CString& strErr);//Called by RegisterRTCObjectForEvents.
BOOL RegisterRTCObjectForEvents(HWND m_hWnd,CString& strErr);//Called by Initialize
BOOL SetLocalPresence(CString& strErr);//Should be called by Initialize at the end.
//////LOGON RELATED
BOOL DoProvisioning(CString user,CString server,CString& strErr);
void OnProvisioningFailed(CString strErr);
void OnProvisioningSuccess(IRTCProfileEvent2 *pEvent);
BOOL DoActualRegister(CString& strErr);
BOOL DoEnablePresence(BOOL fEnable,CString& strErr);
//
void OnRegistrationInProgress();
void OnUnRegistrationInProgress();
void OnNotRegistered();
void OnRegistered();
void OnRegistrationError();
void OnRegisteredOff();
///////SESSION RELATED
void DeliverSessionState(RTC_SESSION_STATE enState);
void DeliverParticipantState(IRTCParticipant * pParticipant, RTC_PARTICIPANT_STATE enState);
void DeliverMedia(long lMediaType, RTC_MEDIA_EVENT_TYPE enType, RTC_MEDIA_EVENT_REASON enReason);
// Update the video controls display
void ShowVideo(RTC_VIDEO_DEVICE enDevice, BOOL fShow);
//////RTCEVENT HELPERS
void OnRTCProfileEvent(IRTCProfileEvent2 *pEvent);
void OnRTCRegistrationStateChangeEvent(IRTCRegistrationStateChangeEvent *pEvent);
void OnRTCSessionStateChangeEvent(IRTCSessionStateChangeEvent *pEvent);
void OnRTCParticipantStateChangeEvent(IRTCParticipantStateChangeEvent *pEvent);
void OnRTCMediaEvent(IRTCMediaEvent *pEvent);
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1