linphone-developers
[Top][All Lists]
Advanced

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

[Linphone-developers] No mp for timestamp queried???


From: Shane Purtill
Subject: [Linphone-developers] No mp for timestamp queried???
Date: Thu, 11 Jul 2002 09:43:43 +0100

Hi,

 

I am trying to get oRtp to run between Linphone and a voice mail server I am writing to interact with it. I have placed an extract from the relevant C code below as well as the output from the screen that I am getting. As can be seen from the output oRTP is complaining about “no mp for timestamp queried”. The code below more or less mirrors the code in Linphone so it should work. I am wondering if anyone can spot what I am missing or point me in the right direction.

 

The code should just establish an RTP session and then loop forever receiving packets and sending them back out again. This should cause the caller to hear what they say repeated to them with a half second lag or so. This is not happening at the moment so I am assuming it is the mentioned error that is causing the problem. Audio is working on both machines so it is not that.

 

All help and comments gratefully accepted,

 

Shane

 

 

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

SCREEN OUTPUT

///////////////////////////////////

oRTP: rtp_getq(): Timestamp 324320 wanted.

oRTP: No mp for timestamp queried

dt_size is : 160

HaveMore is : 0

Received Something : 160 - timestamp of received data: 398880

Data:

Sent the  Data Successfully - timestamp of sent data: 398880

******************* ts is : 398880 **********************

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

C CODE

////////////////////////////

ortp_init();                                                                                                                                                          /*init the rtp library*/

            //          ortp_scheduler_init();                                                                                                                              /*not using the scheduler but init it anyway*/

 

            rtpsession = rtp_session_new(RTP_SESSION_SENDRECV);                                            /*set up an RTP session that can both send and receive*/             

 

            rtp_session_set_blocking_mode(rtpsession, 1);

            rtp_session_set_scheduling_mode(rtpsession, 0);                                                            /* not scheduled */

            rtp_session_set_local_addr(rtpsession, locip4, locport)     /*Set local IP address and port*/

            rtp_session_set_remote_addr(rtpsession, remip4, remport)                        /*Remote IP address and port*/  

            rtp_session_set_payload_type(rtpsession, payload)                                              /*set the payload type*/

            rtp_session_set_jitter_compensation(rtpsession, jittcomp);                        /*set jitter compensation e.g. 40*/

           

            ortp_set_debug_file("oRTP", stdout);                                                                                            /*send the debug info to this file for RTP*/

 

            tsinc = codinfo->fr_size/2;

            printf("tsinc is : %d\n", tsinc);                                                                  /*these are the time steps the time stamp is increased in*/   

 

            while(iocond != 0)/*loop receiving and sending*/

              {  

                err = rtp_session_recv_with_ts(rtpsession,rtpdata,codinfo->dt_size,ts,&havemore);/*used to receive data over RTP*/

 

                printf("dt_size is : %d\n", codinfo->dt_size);

                printf("HaveMore is : %d\n", havemore);

           

                if(err > 0)

                  {

                        printf("Received Something : %d - timestamp of received data: %d\n", err, ts);

                        printf("Data:%s\n", rtpdata);

 

                  }

                else

                  {

                        printf("WARNING receiving : %d\n", err);

                  }

                err = rtp_session_send_with_ts(rtpsession,rtpdata,codinfo->dt_size,ts);/*used to send data over RTP*/    

                if(err >= 0)

                  {

                        printf("Sent the  Data Successfully - timestamp of sent data: %d\n", ts);

                  }

                else

                  {

                        printf("WARNING sending a blank data packet\n");

                  }

     

                printf("******************* ts is : %d **********************\n\n\n", ts);

                ts+=tsinc;

              }

}

 


reply via email to

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