Sign in to follow this  
Followers 0
docx

handscanners assistant.

3 posts in this topic

at various points in my life i've written little handscanner assistant utilities.. yes, i know there are some already out there - whatever.. i like to code.

 

i've been working on a new project called cons0le (and cons0le-web). i restarted this project because i recently obtained a dialogic diva card and wanted to play with some of the features of the card. at this point i am reaching out to see what realistic features any of you might want to see added to such an app... It is a windows based app written in vb.net and also a javascript counterpart web based app. 

 

current working or to be worked on items are:

 

- random/sequential dialing of multiple npa/pre/suff

- extreme scheduling/timing of scan jobs 

- dtmf detection

- dtmf send either via dial string or live during call via mouse clicks

- outgoing .wav either on outgoing calls or incoming calls

- tone detection in general

- definable call documentation as well as presets (vmb, ringout, etc..)

- sync with a master web app which will provide a "phone book" type interface 

- master web app will also be able to generate npa/pre/suff and log calls via presets/user definable buttons

- f2f syncing of results files. (encryption type is still up in the air on this..)

 

All of the above is already set in stone.. I would love to hear any suggestions for other features though.. 

 

doc

2

Share this post


Link to post
Share on other sites

Posted (edited)

Heh, now that's sort of a weird coincidence. I was working on a Linux Diva dialer earlier today! This is in C, but given the similarities of the API calls, feel free to use any of this if you find it useful; it's just a modified version of demo code and the default tone detection rules. If it interests anyone enough, I'll get off my ass and make it multi-channel/a little more script friendly. That being said, imho, there's a much more practical use of telephony boards like these though. Granted, this is written for a CG6565E (also modified demo code. I do write actual things; the CG cards are sort of an annoyance to develop for though, so I'm keeping away from it for now), but take a listen: nmsscan.wav        .

 

The star key is returning the last four digits of the number being dialed. 6 is being used to move that number up by one, and five is being used to play back what happened on that particular number. Other than that, all signal processing is manual. Sorry about the noisy/low volume to the distant end; there's a reason for that. But more to the point, notice we blew through nine numbers (with a lot of ringouts) in the span of two minutes. If anybody wants the prefix of this though, it's 720-746.

 

A compromise of these two ideas would be amazing; something that, for example, let you review scans, but skip over common things like vacant numbers, or perhaps more importantly, numbers that just ring and go nowhere. As the recording demonstrates, that's easily the most time consuming part of a scan. Though it can also be rewarding long term if you're looking to learn how to compare the sound of ringback from one switch type to the next.

 

>

/*-----------------------------------------------------------------------------
 *
 * Copyright 2001-2014    Dialogic(R) Corporation
 *
 * All Rights Reserved.
 *
 * This software is the property of Dialogic Corporation and/or its
 * subsidiaries ("Dialogic"). This copyright notice may not be removed,
 * modified or obliterated without the prior written permission of
 * Dialogic.
 *
 * No right, title, ownership or other interest in the software is hereby
 * granted or transferred. The information contained herein is subject
 * to change without notice and should not be construed as a commitment of
 * Dialogic.
 *
 * This application code is not part of any standard Dialogic product and is
 * provided to you solely for the purpose of assisting you in the development
 * of your applications with Dialogic Diva SDK. The code is provided "AS IS",
 * without warranty of any kind. Dialogic shall not be liable for any
 * damages arising out of your use of this application, even if it has been
 * advised of the possibility of such damages.
 *
 *-----------------------------------------------------------------------------
 * Sample for an outgoing call including streaming a file.
 *
 * The sample shows how to connect a single call, to stream a message and to
 * disconnect. The sample is started from the command prompt. The phone number
 * to dial and the file to stream must be specified as parameter.
 *
 * Note that this sample is designed to show very simple how to process a
 * single call and to stream audio. Therefore the sample does not do any
 * error handling.
 *----------------------------------------------------------------------------*/

#include <stdio.h>
#ifdef WIN32
    #include <conio.h>
#endif
#include <string.h>
#include "dssdk.h"

 

/*
 * Some globals
 */
DivaAppHandle   hApp = NULL;
DivaCallHandle  hSdkCall = NULL;
AppCallHandle   hMyCall = NULL;

void CallbackHandler ( DivaAppHandle hApp, DivaEvent Event, PVOID Param1, PVOID Param2 )
{
    switch (Event)
    {
    case DivaEventEarlyDataChannelConnected: // Geez, what a mouthful...
        if ( DivaReportTones( hSdkCall, TRUE) != DivaSuccess ) {
            printf( "Failed to initialize tone reporting. Disconnecting...\n" );
            DivaDisconnect ( hSdkCall );
        }
        // Instruct the board to create a timer that expires after 30 seconds
        if ( DivaStartCallTimer( hSdkCall, 30000 ) != DivaSuccess ) {
            printf( "Fuck, something is really wrong; we can't create a timer event.\n" );
            DivaDisconnect ( hSdkCall );
        }
        else
            printf ( "Call progress received! Listening for network events...\n" );
        break;
        
    case DivaEventCallConnected:
        printf( "Call suped!\n" );
        break;
        
        
    case DivaEventCallTimer:
        printf( "Call analysis timed out. Disconnecting...\n" );
        DivaDisconnect ( hSdkCall );
        break;
        
    case DivaEventToneDetected:
            if ( Param2 == 201 ) printf( "Human speech detected\n" );
            if ( Param2 == 138 ) {
                printf( "SIT tone received! Disconnecting...\n" );
                DivaDisconnect ( hSdkCall );
            }
            if ( Param2 == 160 ) printf( "SIT 0 received.\n" );
            if ( Param2 == 161 ) printf( "SIT 1 received.\n" );
            if ( Param2 == 162 ) printf( "SIT 2 received.\n" );
            if ( Param2 == 163 ) printf( "SIT 3 received.\n" );
            if ( Param2 == 164 ) printf( "Operator intercept SIT received.\n" );
            if ( Param2 == 165 ) printf( "Vacant circuit SIT received.\n" );
            if ( Param2 == 166 ) printf( "SIT for recording received? What?\n");
            if ( Param2 == 167 ) printf( "SIT for no circuit found received.\n" );
            if ( Param2 == 134 ) printf( "Call is ringing...\n" );
            if ( Param2 == 135 ) printf( "Call is ringing back. Specially...\n" );
            
            if ( ( Param2 == 194 ) || ( Param2 == 195 ) ) {
            printf( "Modem or fax answer tone received.\n" );
            DivaDisconnect(hSdkCall);
            }
            if ( Param2 == 198 ) {

            // This is probably not useful; 2200 hertz modem tones are in practice grabbed by the above rule.
            printf( "Oldschool modem answer tone detected.\n" );
            DivaDisconnect(hSdkCall);
            }
            
            if ( Param2 == 136 ) {
            printf( "Call is busy. Disconnecting...\n" );
            DivaDisconnect(hSdkCall);
            }
            
            if ( Param2 == 137 ) {
            printf( "Reorder tone came back. Disconnecting...\n" );
            DivaDisconnect(hSdkCall);
            }
            
            if ( Param2 == 130 ) {
            printf( "Holy shit, we got a dialtone! Quick, go phr34kz0r it! NAO!!\n" );
            DivaDisconnect(hSdkCall);
            }
            
            if ( Param2 == 131 ) {
            printf( "PBX dialtone received.\n");
            DivaDisconnect(hSdkCall);
            }
            
            if ( Param2 == 132 ) {
            printf( "'Special' dialtone received. Don't you feel special?\n" );
            DivaDisconnect(hSdkCall);
            }
            
            if ( Param2 == 133 ) {
            printf( "Stutter dialtone received!\n" );
            DivaDisconnect(hSdkCall);
            }
            
            if ( Param2 == 202 ) {
            printf( "Answering machine tone (theoretically; 390 hertz) heard\n");
            DivaDisconnect(hSdkCall);
            }
            
        break;

    case DivaEventSendVoiceEnded:
        DivaDisconnect ( hSdkCall );
        break;

    case DivaEventCallDisconnected:
        hSdkCall = 0;
        DivaCloseCall ( Param2 );
        printf ( "Disconnected\n" );
        DivaUnregister ( hApp );
        DivaTerminate ();
        break;

    default:
        break;
    }
}

 


int main(int argc, char* argv[])
{
    char    DialString[100];
    int     c;

    if ( argc != 2 )
    {
        printf ( "USAGE: numidentify <phone number>\n\n" );
        return -1;
    }

    strcpy ( DialString, argv[1] );
    // heh, strcpy. Don't look at me, it's not my code! You, uh, you might want to change this.

    printf("Version: %d.%d\n", (DivaGetVersion() >> 16) & 0xffff , DivaGetVersion() & 0xffff );

    if (DivaInitialize() != DivaSuccess)
        return -1;

    hMyCall = (void *) 0x11223344;

    if ( DivaRegister ( &hApp, DivaEventModeCallback, (void *) CallbackHandler, 0, 1, 7, 2048 ) != DivaSuccess )
    {
        return -1;
    }

    if ( DivaConnectVoice ( hApp, hMyCall, &hSdkCall, DialString, LINEDEV_ALL, "", "0", DivaVoiceOptionEarlyDataChannel ) != DivaSuccess )
    {
        return -1;
    }

    printf ( "Number identifier running, press <ENTER> to terminate\n" );

    while ( 1 )
    {
#ifdef WIN32
        c = _getch ( );
#else
        c = getc (stdin);
#endif
        if ( c == 'q' )
            break;
    }
    printf ( "Number identifier stopped\n" );

    DivaUnregister ( hApp );
    DivaTerminate ();

    return ( 0 );
};

Edited by ThoughtPhreaker
0

Share this post


Link to post
Share on other sites

Something I didn't mention is that the handscanner assistant (cons0le) will not just be for the Diva, it will also be able to be used with voice modems - and with a much dumbed down feature set - regular modems with no voice features at all.

 

to one of your thoughts - and this would be far down the line as my level of coding is not quite to this point yet - but i like the idea of tone pattern matching to identify and eliminate.. i also like the idea of doing CNAM pulls on numbers dialed to eliminate certain types of destination numbers from even being dialed. 

 

I'm getting quite far in my wardialers.org project and it will be at a point of resting and promoting soon, at which point i will continue and accelerate work on cons0le.. i will definitely seek input and testers here if anyone thinks they might be interested..

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0