< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] Need Help with DUM ReInvite


Ideally you would not call provideAnswer from onNewSession - you should
wait for either the onOffer or onOfferRequired callbacks, then call
provideAnswer or provideOffer appropriately.  

In order to accept the inbound call, the onOffer callback could contain
the following code that would no execute for re-invites:
if(!is->isAccepted())
{
   is->accept();
}

Scott

> -----Original Message-----
> From: resiprocate-users-bounces@xxxxxxxxxxxxxxx [mailto:resiprocate-
> users-bounces@xxxxxxxxxxxxxxx] On Behalf Of voora srinivas
> Sent: Monday, November 05, 2007 10:43 AM
> To: resiprocate-users@xxxxxxxxxxxxxxx
> Subject: [reSIProcate-users] Need Help with DUM ReInvite
> 
> Hi,
> 
> I need to build a simple application which will answer a SIP call.
> Initially i modified the OnNewSession
> 
> onNewSession{
>       h->provideAnswer(*sdp);
>       h->accept();
> }
> 
> It was sending 200 reply for Invite but when the server sends the
> reinvite it just sends 100 reply and sits there. So i modified the
> onOffer and onTerminated.
> 
> onOffer{
>   if(reinvite)
>       is->provideAnswer(Sdp);
>   else
>         reinvite = true;
> }
> 
> onTerminated{
>        reinvite = false;
> }
> 
> Now it works fine re invites, Let me know if this is the right
approach
> or there is a better way.
> 
> Thanks in Advance,
> Srinivas Voora
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com