?
Solved

Capturing Data

Posted on 2011-10-10
5
Medium Priority
?
382 Views
Last Modified: 2013-11-26
In debug...the output window...I can see this data

Debug:[ManagerReader-57] ManagerReader:Run - AppData: Using CallerID "TVDEV-9998887777" <9998887777>

Why is it I can't see the "TVDEV" in my readers, array, etc anywhere?
0
Comment
Question by:lrbrister
  • 3
  • 2
5 Comments
 
LVL 40
ID: 36944402
Could you show us the code you use to generate that line.
0
 

Author Comment

by:lrbrister
ID: 36944543
Using Asterisk.Net and wrapping it.

On a button click...the function is called.
The output is actually this piece of the attached code...

If InStr(pArray(0).ToString, "Local/" & extension & "@from-internal") >= 1 Then
    If pArray(2).ToString = queue And pArray(3).ToString = "1" Then
        'source = pArray(7).ToString
        source = "3334445555"   'changed for this
        binComingCall = True
    End If
End If
RichTextBox1.Text += presponse(i) & Environment.NewLine

Public Function sendCommand(ByVal paction As String, ByVal pcommand As String) As String
        Dim pCommandAction As New Action.CommandAction
        Dim pExtensionStateAction As New Action.ExtensionStateAction
        Dim pSIPShowPeerAction As New Action.SIPShowPeerAction
        Dim binComingCall As Boolean = False

        sendCommand = ""
        queue = "691"

        If _manager.IsConnected = True Then
            Dim presponse As Array

            If Len(paction) = 0 Then
                paction = "Command"
            End If
            If Len(pcommand) <> 0 Then
                presponse = Nothing
                Select Case LCase(paction)
                    Case "command"
                        pCommandAction.Command = pcommand
                        presponse = _manager.SendAction(pCommandAction, 500).ToString.Split(";"c)
                    Case "extensionstate"
                        pExtensionStateAction.Exten = pcommand
                        presponse = _manager.SendAction(pExtensionStateAction, 500).ToString.Split(";"c)
                    Case "sipshowpeer"
                        pSIPShowPeerAction.Peer = pcommand
                        presponse = _manager.SendAction(pExtensionStateAction, 500).ToString.Split(";"c)
                    Case Else
                        MsgBox("Action not in list!")
                        'Dim s As String = "nothing;Local/1026@from-internal-c9fd,1!from-internal!691!1!Down!AppQueue!(Outgoing Line)!9548811302!!3!3!(None)"
                        'presponse = s.Split(";"c)
                End Select

                If IsNothing(presponse) = False Then
                    RichTextBox1.Text = ""
                    For i As Integer = 0 To presponse.Length - 1
                        Dim pArray As Array = presponse(i).ToString.Split("!"c)

                        If InStr(pArray(0).ToString, "Local/" & extension & "@from-internal") >= 1 Then
                            If pArray(2).ToString = queue And pArray(3).ToString = "1" Then
                                'source = pArray(7).ToString
                                source = "3334445555"
                                binComingCall = True
                            End If
                        End If
                        RichTextBox1.Text += presponse(i) & Environment.NewLine
                    Next
                End If
                If binComingCall = True Then
                    userName = GetUserName()             'I) Get user's name logged in on windows
                    Dim dirEntry As DirectoryEntry = New DirectoryEntry()                   'Verify that user is on the domain
                    dirEntry = FindUserOnDirectoryEntry(userName)      'II) Directory search for user
                    If IsNothing(dirEntry) = False Then
                        Dim pForm As New PopupForm

                        pForm.loadProcess()
                        sendCommand = source
                    End If
                End If
            Else
                MsgBox("Enter a command!")
            End If
        Else
            btnConnect.Enabled = True
            MsgBox("Connection lost. Re-establish connection!")
        End If
    End Function

Open in new window

0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 2000 total points
ID: 36945031
This code does not tell me anything. All it does from what I see is that it changes the variable source according to the content of pArray. Then you put the value of presponse(i) in a RichTextBox.

I do not see the use of "TVDEV" with source, or the way presponse(i) is built.

Where is the problem?

In the content of the RichTextBox? If so, there is no way to tell where the problem could be, since presponse is buit from _manager.SendAction, and we do not even know what _manager is.

Where is "TVDEV" supposed to come from in there. From _manager.SendAction, or from one of the pArray elements? If it is in p_Array(7), then there is a comment at the beginning of the line.

The code we need to see is the code that builds the "Debug:[ManagerReader-57] ManagerReader:Run - AppData: Using CallerID "TVDEV-9998887777" <9998887777>" string. And be able to compare it to the code that builds the "readers, array, etc anywhere?" where TVDEV vanish.

0
 

Author Comment

by:lrbrister
ID: 36969956
JamesBurger:
This is an Asterisk.Net dll we're accessing.

Earlier it was getting called with a "concise" paramater which was wrong.

Your question put me on the backtrack
Thanks for the help
0
 

Author Closing Comment

by:lrbrister
ID: 36969957
See comments
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question