Handling 302 w/pjsua API

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

 



Hi Benny,

The issue is the sip proxy server expects the CallID
to be the same, so it can identify the forwarded call
as being part of the previous call. Else, it would be
a completely new transaction.

For instance, a UserA dials UserB, but UserB is not
available and he has setup a forward to some PSTN
number. Consequently, Proxy returns 302 with new
number.

Now, with the callid, the proxy can recognize that it
was a forward from UserB, so UserB is the party
responsible for it (and any billing/accounting
associated).

With a new CallID, UserA would have to pay to be
forwarded. Not really optimal.

For reference, both Xlite & Grandstream SIP Phones I
have used send the Invite in response to the callid
with the same CallID to maintain the transaction.
Though, they differ in how they send out the To and
Sip URI fields.

It is pretty vital that this works by placing a call
with the same call id. Is there no way to control
this? Perhaps it would be a simple matter to modify
pjsip? If so, where would you recommend
modifications... allow client to set the callid sounds
simplest.

Thanks

--- Benny Prijono <bennylp at pjsip.org> wrote:

> On 1/8/08, P.J. Cast. <pjcast at yahoo.com> wrote:
> >
> > I have a question about handling the 302 Moved
> > Temporarily Message from an Invite session.
> >
> > Using the pjsua_call_make_call to place an Invite,
> > when the other side is not available, the Sip
> Proxy is
> > sending 302 Moved with the new destination in the
> > Contact header field of the Sip message.
> >
> > Now, with pjsip, I see I can detect this 302
> condition
> > in the on_call_state callback, when the state is
> > PJSIP_INV_STATE_DISCONNECTED and the last_status
> is
> > 302. However, I do I go about continuing the call?
> 
> 
> Currently we can only create a new call, using the
> URI in the Contact header
> of 3xx response as the destination of the call. So
> yes, the Call-ID will
> change for the new call. I don't think this is a
> major issue, CMIIW.
> 
> 
> To make this work correctly, I need to be able to
> get
> > another Invite sent out with the new destination
> (as
> > received in the Contact field) using the old
> CallID
> > header field value - since it is part of the same
> > transaction as far as I know. I see there is the
> > reinvite method in the pjsua API, but it appears
> just
> > to be used for taking a call off hold.
> >
> > Is there a method I need to call to enable 302
> > handling? Or, is there method I can call from the
> > callback to continue on with the dialog using the
> new
> > contact... or, do I have to place a completely new
> > call with make call method and somehow specify the
> > callid from the previous call. I've tried to
> search
> > the mailing list but searching for 302/moved/etc
> > didn't yield very good results. And, I couldn't
> find
> > anything in the documentation - if it is there,
> I'm
> > extremely sorry and would love a link to the
> location
> > so I can find future questions :-)
> 
> 
> No, this feature is not there, as you can't create a
> new, initial INVITE
> when the previous initial INVITE failed (with pjsip,
> that is). But do tell
> me if you absolutely need this feature, then maybe
> we can discuss possible
> solutions.
> 
> cheers,
>  -benny
> 
> 
> Thanks a bunch.
> >
> >
> >
> >
> >
> >      
>
____________________________________________________________________________________
> > Be a better friend, newshound, and
> > know-it-all with Yahoo! Mobile.  Try it now.
> >
>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> >
> >
> > _______________________________________________
> > Visit our blog: http://blog.pjsip.org
> >
> > pjsip mailing list
> > pjsip at lists.pjsip.org
> >
>
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> >
> > _______________________________________________
> Visit our blog: http://blog.pjsip.org
> 
> pjsip mailing list
> pjsip at lists.pjsip.org
>
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> 



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux