Hello, I've a little problem with SipXtapidotnet.

I'm developing an appplication that need to log every call my computer
recive.

I dont need to answer, i just need 2 or 3 ring before close the
comunication.

My problem it that i cant hear nothing on the phone that I use for
calling(Ringing), I can see in my log "NewCall" i can Answer the incoming
call , but i dont know why i dont hear nothing on the caller Phone.

I miss something ?

Here is my code /VB.NET /VS 2008

 MySip = SipXTapiDotNet.SipxInstance.Create(Me.muriString, mtcpPort,
mtcpPort, mproxyPort)

  MySip.Connect(True)

    MyConfig = SipxConfig.Create(MySip)

    MyConfig.OutboundProxy = "sip.messagenet.it:5061"

    For i As Short = 0 To mLineNumber - 1
        MySip.LineCreate()
        MySip.Lines(i).AddCreditial(muserName, muserPassword,
muserServerDomain)
        MySip.Lines(i).Register()
    Next

......

   Private Sub MySip_CallEvent(ByVal sender As Object, ByVal e As
SipXTapiDotNet.SipxCallEventArgs) Handles MySip.CallEvent
       Try
             Dim mycall As SipxCall = sender
             Dim mystring = mycall.RemoteAddress
             myTraceLog.WriteLine(Date.Now & " - " &
e.CallStateinfo.StateEvent.ToString & " - " & mystring)
          Select Case e.CallStateinfo.StateEvent
            Case SipxCallStateEvent.NewCall

                MySip.Lines(0).Calls(MySip.Lines(0).Calls.Count).Accept()

                If (e.CallStateinfo.StateCause =
SipxCallStateCause.Transferred) Then

                ElseIf (e.CallStateinfo.StateCause =
SipxCallStateCause.Transfer) Then

                End If

            Case SipxCallStateEvent.RemoteOffering
                              myTraceLog.WriteLine("remote Offering")

            Case SipxCallStateEvent.Offering

            Case SipxCallStateEvent.Allerting

MySip.Lines(0).Calls(e.CallStateinfo.CallHandle.ToInt32()).Reject(0,
0)
                              Case SipxCallStateEvent.Disconnected
                mycall.StopTone()

        End Select
    Catch ex As Exception
        myTraceLog.WriteLine(Date.Now & " - " &
e.CallStateinfo.StateEvent.ToString & " ERROR - " & ex.Message)
    End Try

    myTraceLog.Flush()
End Sub
_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/

Reply via email to