Ok. I finally find a way to make it working : I use SipxLineAdd() function instead of SipxConferenceJoin().
Thanks Jaro (I didn't understand you were speaking about the SipxConferenceJoin() function when you said it wasn't safe). Stéphane. _____ From: Stéphane Rouland [mailto:[EMAIL PROTECTED] Sent: mercredi 6 juin 2007 11:39 To: '[email protected]' Subject: Problem creating a conference Hi, I'm trying to create a conference between 2 phones using sipxtapi dll. I'm using VB.Net. I imported all necessary functions from dll. I joined the main part of the source code at the end of this mail. It is just a test program so I dind't manage exceptions and events. Here is my problem: - After first call connection, it works - After second call connection, the second call voice is not received but the first one still works - After conference creation, the first call voice is not received but the second call works; And I don't hear anything on the 2 phones. I tried many things (connect calls after joining the conference,...) but nothing works. Can someone help me, please? Or at least tell me if I correctly used the sipxtapi functions. Thanks. Stéphane. ======================================================================= Here is what I do in the main function: Create_Instance("[EMAIL PROTECTED]") Create_Line("[EMAIL PROTECTED] , "300", "300", "mysipserver.fr") Create_Call("[EMAIL PROTECTED]") Create_Call ("[EMAIL PROTECTED]") Create_Conference(1, 2) And the called functions : Public Sub Create_Instance (ByVal identity As String, Optional ByVal enableRPort As Boolean = True) identity = identity TcpPort = 5060 UdpPort = 5060 TlsPort = 5061 RtpPortStart = 10000 MaxConnections = 32 BindToAddress = "0.0.0.0" UseSequentialPorts = True ' Config Dim Result As SipxResult Result = SipxConfigSetLogLevel(SipxLogLevel.Debug) Result = SipxConfigSetLogFile("log.txt") Result = SipxInitialize(hInstance, TcpPort, UdpPort, TlsPort, RtpPortStart, MaxConnections, identity, BindToAddress, UseSequentialPorts) Result = SipxConfigEnableRport(hInstance, enableRPort) AudioInput = AudioDevices(SipxMediaDeviceType.Input)(0) AudioOutput = AudioDevices(SipxMediaDeviceType.Output)(0) Result = SipxAudioSetCallInputDevice(hInstance, AudioInput) Result = SipxAudioSetCallOutputDevice(hInstance, AudioOutput) End Sub Public Sub Create_Line (ByVal Numero As String, ByVal UserName As String, ByVal Password As String, ByVal Realm As String) Dim Result As SipxResult Result = SipxLineAdd(hInstance, Numero, hLine) Result = SipxLineAddCredential(hLine, UserName, Password, Realm) Result = SipxLineRegister(hLine, True) End Sub Public Sub Create_Call (ByVal NumeroSIP As String) Dim Result As SipxResult Dim hC As Integer = 0 nbCalls += 1 ReDim Preserve hCall(nbCalls + 1) Result = SipxCallCreate(hInstance, hLine, hC) hCall(nbCalls) = hC Result = SipxCallConnect(hCall(nbCalls), NumeroSIP) End Sub Public Sub Create_Conference (ByVal Call1 As Integer, ByVal Call2 As Integer) Dim Result As SipxResult Result = SipxConferenceCreate(hInstance, hConference) Result = SipxConferenceJoin(hConference, hCall(Call1)) Result = SipxConferenceJoin(hConference, hCall(Call2)) Result = SipxCallUnhold(hCall(Call1)) Result = SipxCallUnhold(hCall(Call2)) End Sub ===========================================================================
_______________________________________________ sipxtapi-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
