Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RTC API in VB.NET- Multiple type of sessions in the same session

27 views
Skip to first unread message

loletez

unread,
Oct 23, 2007, 11:05:33 AM10/23/07
to
Hi everybody,

I'm integrating RTC API 1.3 in a Visual Basic .Net project using the
Interop wrapper. Following the instructions of werock247's lab I
reached to establish a conference call with audio/video streaming, not
problem. But now I want to improve this and add instant messaging in
the call. I've not found any example of this (a/v call with,
simultaneously, IM), so I try to add the follow line to create an IM
session following the instructions indicated in the werock247's lab:

oSession =
oClient.CreateSession(RTCCORELib.RTC_SESSION_TYPE.RTCST_PC_TO_PC,
vbNullString, Nothing, 0)
oSession =
oClient.CreateSession(RTCCORELib.RTC_SESSION_TYPE.RTCST_PC_TO_PHONE,
vbNullString, Nothing, 0)

oSession = oClient.CreateSession(RTCCORELib.RTC_SESSION_TYPE.RTCST_IM,
vbNullString, Nothing, 0) 'added

Also I add the RTCEF_MESSAGING constant to RTC_EVENTFILTERS, used to
declare the client's event filter later, just following the
Initialize() method of the client:

Const RTC_EVENTFILTERS As Int16 = RTCEF_CLIENT Or
RTCEF_SESSION_STATE_CHANGE Or RTCEF_MEDIA Or RTCEF_MESSAGING

....
oClient.EventFilter = RTC_EVENTFILTERS

Finally I've modified the events handler to process the RTCE_MESSAGING
events, calling a new sub I've implemented:

Private Sub MessagingEvent(ByVal pEvent As Object)
On Error GoTo testError
Dim oMessageEvent As RTCCORELib.IRTCMessagingEvent
Dim EventType As RTCCORELib.RTC_MESSAGING_EVENT_TYPE
oMessageEvent = DirectCast(pEvent,
RTCCORELib.IRTCMessagingEvent)
EventType = oMessageEvent.EventType
Select Case EventType
Case RTCCORELib.RTC_MESSAGING_EVENT_TYPE.RTCMSET_MESSAGE
RaiseEvent
MessageIncoming(oMessageEvent.MessageHeader, oMessageEvent.Message)
Case RTCCORELib.RTC_MESSAGING_EVENT_TYPE.RTCMSET_STATUS
Select Case oMessageEvent.UserStatus
Case
RTCCORELib.RTC_MESSAGING_USER_STATUS.RTCMUS_IDLE
RaiseEvent MessageUserStatus("idle")
Case
RTCCORELib.RTC_MESSAGING_USER_STATUS.RTCMUS_TYPING
RaiseEvent MessageUserStatus("typing")
End Select
End Select
oMessageEvent = Nothing
Exit Sub
testError:
Select Case RTCErrors.errorSeverity(Err.Description)
Case RTCErrors.STATUS_SEVERITY_INFORMATIONAL
Case RTCErrors.STATUS_SEVERITY_WARNING

logearError(RTCErrors.errorDescription(Err.Description),
"GestorSA.MessagingEvent")
Case RTCErrors.STATUS_SEVERITY_ERROR

logearError(RTCErrors.errorDescription(Err.Description),
"GestorSA.MessagingEvent")
Case Else
logearError(Err.Description, "Inicializar")
Logger.WriteException(Err.GetException,
TraceEventType.Error, "GestorSA.MessagingEvent")
End Select
Err.Clear()
Resume Next
End Sub


Firtsly I create and initialize the client in both participants (who
share the class that I've designed to envolve the RTC API), then I try
to create a new session as above, but inmediately receiving the
CONNECT event, raise a DISCONNECT message.

What's wrong in my approach? Can't I use the same client to do that?
Can I make a single session with IM and A/V types?

Thanks in advance

Regards

Oscar Newkerk{MSFT]

unread,
Oct 23, 2007, 1:48:00 PM10/23/07
to
A session can only be of one type. You will need to maintain two sessions
if you want A/V and IM. You should also use RTCST_MULTIPARTY_IM as the
session type for the IM session since LCS 2005 does not support RTCST_IM.


--

Oscar Newkerk
Unified Communications Group
---------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.


"loletez" <lol...@gmail.com> wrote in message
news:1193151933.4...@t8g2000prg.googlegroups.com...

loletez

unread,
Oct 24, 2007, 3:21:02 AM10/24/07
to

First of all , thanks for the quick reply.

I've just resolved it before reading your reply. Indeed, I've to
establish 2 sessions over the same client object (with RTCST_IM and
RTCST_PC_TO_PC types each one), and also capture IM related events.
I'm using RTC API 1.3 due to the minimal requeriments of my aplication
(only needed a p2p A/V and Messaging comunication, like older
Messenger Service), so I don't try to work with LCS 2005. The only
preocupattion related to this it's the Vista compatibility (I've
already not tested it).

Regards

On Oct 23, 7:48 pm, "Oscar Newkerk{MSFT]"


<oscarn@REMOVE_CAPS.microsoft.com> wrote:
> A session can only be of one type. You will need to maintain two sessions
> if you want A/V and IM. You should also use RTCST_MULTIPARTY_IM as the
> session type for the IM session since LCS 2005 does not support RTCST_IM.
>
> --
>
> Oscar Newkerk
> Unified Communications Group
> ---------------------------------------------------------------
> This posting is provided "AS IS" with no warranties, and confers no rights.
>

> "loletez" <lole...@gmail.com> wrote in message

Oscar Newkerk{MSFT]

unread,
Oct 24, 2007, 2:24:44 PM10/24/07
to
The RTC API works on Vista with some limitations. See this blog post for
details.

http://blogs.technet.com/uc/archive/2006/11/30/rtc-client-api-s-and-windows-vista.aspx


--

Oscar Newkerk
Unified Communications Group
---------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.

"loletez" <lol...@gmail.com> wrote in message

news:1193210462....@q3g2000prf.googlegroups.com...

silent.madosilent.mado

unread,
Oct 26, 2007, 3:50:43 AM10/26/07
to
Slm,

You said that you could etablish an audio/video conference with rtc, can you help me please, or give me a code example. I'll be so thanksfull.

silen...@gmail.com

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com

silent.mado

unread,
Oct 26, 2007, 4:00:52 AM10/26/07
to

loletez

unread,
Oct 26, 2007, 7:16:49 AM10/26/07
to
I suggest you the werock247's site as a good initiation point to
develop your own application (that's I've done). There are some good
code examples in both C# and VB.NET. http://www.learn247.net/werock247/labs/rtc/vb/index.htm,
i.e.

In my application, I can establish the communication in a LAN
enviroment, I'm not implemented yet portmapping because the purpose of
my implementation actually don't require it; I will do it for the next
version.

On Oct 26, 10:00 am, silent.mado wrote:
> Slm,
>
> You said that you could etablish an audio/video conference with rtc, can you help me please, or give me a code example. I'll be so thanksfull.
>

> silent.m...@gmail.com

sharad shukla

unread,
Jun 22, 2009, 3:39:15 PM6/22/09
to

Hi Guys,

I have seen your block on net for softphone.

I have also develop softphone using MS RTC Client API 1.3.
It's working fine for direct number i.e any mobile or landline number.

But when we are dailing at that number which has required extension number.
i.e. system generated voice please dial extension number.
How we can handle this and make call on that extension number.

If you have any solution please help me as soon as possible.

Thanks

Regards:

Sharad
Email:shar...@gmail.com

url:http://www.ureader.com/msg/1480731.aspx

sharad shukla

unread,
Jun 22, 2009, 3:38:59 PM6/22/09
to

sharad shukla

unread,
Jun 22, 2009, 3:39:29 PM6/22/09
to
0 new messages