Roy Anderson

I have seen posts regarding this problem but as yet have not seen an answer. No VB.Net answer anyway.
I have a VB.NET (VS2005) application which needs to provide both a conference session and an IM session. I have initialised RTC as follows :


objClient = New RTCClient
objClient.Initialize()
Dim myFilter As Integer = RTCEF_CLIENT Or TCEF_SESSION_STATE_CHANGE Or _
RTCEF_MEDIA Or RTCEF_MESSAGING
objClient.EventFilter = myFilter

objRTCE = objClient

objClient.ListenForIncomingSessions = RTC_LISTEN_MODE.RTCLM_BOTH

Dim myMedia As Integer = RTCMT_AUDIO_SEND Or RTCMT_VIDEO_SEND Or _
RTCMT_AUDIO_RECEIVE Or RTCMT_VIDEO_RECEIVE
objClient.SetPreferredMediaTypes(myMedia, True)

objVideoSend = objClient.IVideoWindow(i_RTCDLL.RTC_VIDEO_DEVICE.RTCVD_PREVIEW)
objVideoRecv = objClient.IVideoWindow(i_RTCDLL.RTC_VIDEO_DEVICE.RTCVD_RECEIVE)

The event handler is as follows :

Private Sub objRTCE_Event(ByVal RTCEvent As RTC_EVENT, ByVal pEvent As Object) Handles objRTCE.Event
Select Case RTCEvent
Case RTC_EVENT.RTCE_CLIENT
Handle_Client_Event(pEvent)
Case RTC_EVENT.RTCE_MEDIA
Handle_Media_Event(pEvent)
Case RTC_EVENT.RTCE_MESSAGING
Handle_Messaging_Event(pEvent)
Case RTC_EVENT.RTCE_SESSION_STATE_CHANGE
Handle_Session_Event(pEvent)
End Select
End Sub


And session handling code is :

Private Sub Handle_Session_Event(ByVal pEvent As Object)
Dim objSessionEvent As IRTCSessionStateChangeEvent2 = pEvent
Dim objState As RTC_SESSION_STATE = objSessionEvent.State

Select Case objState
....
Case RTC_SESSION_STATE.RTCSS_INCOMING
If chkAnswer.Checked = True Then
If objSessionEvent.Session.Type = RTC_SESSION_TYPE.RTCST_PC_TO_PC Then
objSession = objSessionEvent.Session
objSession.Answer()
End If
' Note: I have also tried the normal IM session type here also.
If objSessionEvent.Session.Type = RTC_SESSION_TYPE.RTCST_MULTIPARTY_IM Then
objIMSession = objSessionEvent.Session
objIMSession.Answer()
End If
End If
.......
End Select

objSessionEvent = Nothing
End Sub

As you can see, I have 2 session variables for the conference session and the IM session. Both sessions connect.

The problem is that it seems the events handler never sees a messaging event and as such never calls the message handling code.

Is there something fundamental that I am doing wrong I am almost bald from tearing my hair out trying to solve this problem.

Does anyone have a working VB application similar to what I am trying to do

At this stage I am using IP addresses to connect between machines (ie. SIP:10.0.0.10) which seems to be working fine as both session seem to connect fine.

It also seems that I never see the RTCCET_ASYNC_CLEANUP_DONE event after doing objClient.PrepareForShutDown but this is another issue.




Re: Visual Basic General VB.NET RTC application not seeing messaging events

Lorenza

Hi,

I've the same problem.

I create 2 applications. One on Vb6 and it run with no error, the other on VS2005 but this version not receive any events.

Do you have any idea to resolve this problem





Re: Visual Basic General VB.NET RTC application not seeing messaging events

redviking63

I solved the problem. You need to supply both arguments to the SendMessage method. I was only supplying the message argument and leaving the messageheader as an empty string. As it turns out if the messageheader is supplied everything works fine.