linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] Deliver .wav across core session?


From: greyfox
Subject: [Linphone-developers] Deliver .wav across core session?
Date: Tue, 7 Jun 2005 12:36:49 -0600

Hey all,

I've got a function that tries to be lazy and establish a session with
linphone_core_invite and then send a .wav file across with
audio_stream_start_with_files. The call gets established and my little
program ACTS like it's delivering a .wav file, but I get no audio
through the session. Could someone take a look at it and tell me what
I'm doing wrong?

void deliverWavToTarget(VoipDeliverSession *currentSession)
{
  LinphoneCore *lc = currentSession->lc; /* I'm lazy... */

  /*
   * Establish the call, I think?
   */
  linphone_core_invite(lc, currentSession->sipUrlToCall,
                       lc->default_proxy);

  while(lc->call->state == LCStateInit || lc->call->state == LCStateRinging) {
    linphone_core_iterate(lc);
    if (!lc->call) {
      printf("Call failed.\n");
      exit(VOIP_SESSION_ERROR);
    }
  }

  lc->audiostream = audio_stream_start_with_files(lc->call->profile,
                                                   
lc->call->audio_params.localport,
                                                   
lc->call->audio_params.remoteaddr,
                                                   
lc->call->audio_params.remoteport,
                                                   lc->call->audio_params.pt,
                                                   20,
                                                   currentSession->wavFileName,
                                                  "/dev/null");
 

  ms_filter_set_notify_func(lc->audiostream->soundread,
                            deliverWavFileDone,
                            (gpointer) currentSession);

  while (!currentSession->endCall) {
    linphone_core_iterate(currentSession->lc);
  }

  linphone_core_terminate_dialog(currentSession->lc, NULL);

}

-- 
Bruce Ide
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]