Share

CAPI Voice Mail System

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

aquiring caller id for use in a script

You are viewing a single message from this topic. View all messages.

  1. 2004-11-26 03:36:57 UTC
    Hi!

    I must admit my Perl skills are very low. I tried to implement a Caller-Indicator via Samba Messages, but CVM does not tell me about the Caller-ID in a way I can process it. I used your Quick Start thing from the man page:

    #!/usr/bin/perl
    use CAPI::CVM;
    $v = new CAPI::CVM;
    $v->add_handler('NO_CARRIER', 'endh', sub { $v->stop; exit(0); });
    local $SIG{ALRM} = sub { $v->stop; };
    $v->enable_events;
    my ($callernr, $callednr) = $v->wait_for_ring;
    system ("echo $callernr >/tmp/numbertest");
    $v->play_and_wait('/var/spool/uucp/abvonsebastian.711');
    $v->shutdown;

    /tmp/numbertest only shows an empty newline, so I didn't have to play around with samba any more, usually there would be a system("/usr/bin/isdn2samba cerebrum $callernr $callednr") where cerebrum is the target host for the message. This works, but only without displaying the numbers.

    Is there an easy way to get content for the 2 variables?

    Thank you

    Sebastian
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.