Menu

aquiring caller id for use in a script

Help
2004-11-26
2013-02-27
  • Sebastian Bremicker

    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

     
    • Sebastian Bremicker

      Hi!

      Soon after the postint I switched to asterisk which gives me a caller ID to process with.

      Thanks anyway

      Seabastian

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.