in reply to Net::SIP Total Newbie question

I think the whole operation of Net::SIP::Simple is asynchronous, so you need to run its event loop in any case (see also its SYNOPSIS):

... # Mainloop $ua->loop;

To react on the call, you want to pass callbacks into ->invite():

my $call = $ua->invite( $to, cb_final => sub { print "Call finished?\n" }, cb_noanswer => sub { print "Nobody home\n" }, );

See Net::SIP::Simple::Call for more on the callbacks.

Replies are listed 'Best First'.
Re^2: Net::SIP Total Newbie question
by kobaz (Novice) on Mar 10, 2024 at 18:15 UTC
    Thanks.
    Yeah this does look like it. All the normal handling is done in the ua->loop unless you want to write your own.

    On further inspection, the callback I need (ability to read a 302 response), does not exist.

    I went ahead and added my own callback mechanism in NET::SIP::Leg to hit a cb_recieve callback if it's defined

    Now I can read all responses via callback, even the ones that Net::SIP doesn't handle