PC
P.J. Cast.
Tue, Jan 8, 2008 1:04 AM
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?
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 :-)
Thanks a bunch.
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
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?
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 :-)
Thanks a bunch.
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
KD
Klaus Darilion
Tue, Jan 8, 2008 2:49 PM
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?
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.
The INVITE transaction is terminated with 302 as this is a final
response. If the SIP UAC decides to try to reach the callee under the
provided contact then this is a new session, thus, a new transaction.
Thus, IMO the callid should change.
regards
klaus
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 :-)
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@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
P.J. Cast. schrieb:
> 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?
>
> 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.
The INVITE transaction is terminated with 302 as this is a final
response. If the SIP UAC decides to try to reach the callee under the
provided contact then this is a new session, thus, a new transaction.
Thus, IMO the callid should change.
regards
klaus
> 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 :-)
>
> 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@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
BP
Benny Prijono
Tue, Jan 8, 2008 4:57 PM
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.
On 1/8/08, P.J. Cast. <pjcast@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@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
PC
P.J. Cast.
Tue, Jan 8, 2008 5:30 PM
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@pjsip.org 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
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
in the on_call_state callback, when the state is
PJSIP_INV_STATE_DISCONNECTED and the last_status
- 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
received in the Contact field) using the old
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
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
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
the mailing list but searching for 302/moved/etc
didn't yield very good results. And, I couldn't
anything in the documentation - if it is there,
extremely sorry and would love a link to the
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.
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@pjsip.org> wrote:
> On 1/8/08, P.J. Cast. <pjcast@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@lists.pjsip.org
> >
>
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> >
> > _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@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
KD
Klaus Darilion
Tue, Jan 8, 2008 8:24 PM
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.
Terminology:
transaction: consists of a request, optional 0..n provisional
responses and a final response.
Thus every new INVITE request is a new SIP transaction.
Its even a new SIP dialog as the the first INVITE transaction did not
created a dialog.
Thus, the relationship between the first INVITE and the second INVITE is
only at application layer - not at SIP layer. A good SIP client should
not automatically accept a 302 and make a new call but it should ask the
user if it wants to make a new call to the provided URI.
Maybe some clients reuse the call-id in the new call attempt, but others
will not and IMO both is valid.
A SIP proxy (or the billing system) should never rely on data provided
by the SIP client.
If you need full control over call setup and billing it is better to do
the redirection in the proxy.
do not trust user provided data (like call-id, tags, contact ...)
blindly as this are very easy to spoof.
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.
Again: never expect all clients to act like you expect them. If you want
to charge to call to user B then make the redirection in the proxy.
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
its pretty vital that you do not design your system by expecting all
clients act the same way.
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.
IMO you should fix the handling in your proxy.
regards
klaus
P.J. Cast. wrote:
> 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.
Terminology:
transaction: consists of a request, optional 0..n provisional
responses and a final response.
Thus every new INVITE request is a new SIP transaction.
Its even a new SIP dialog as the the first INVITE transaction did not
created a dialog.
Thus, the relationship between the first INVITE and the second INVITE is
only at application layer - not at SIP layer. A good SIP client should
not automatically accept a 302 and make a new call but it should ask the
user if it wants to make a new call to the provided URI.
Maybe some clients reuse the call-id in the new call attempt, but others
will not and IMO both is valid.
A SIP proxy (or the billing system) should never rely on data provided
by the SIP client.
If you need full control over call setup and billing it is better to do
the redirection in the proxy.
do not trust user provided data (like call-id, tags, contact ...)
blindly as this are very easy to spoof.
>
> 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.
Again: never expect all clients to act like you expect them. If you want
to charge to call to user B then make the redirection in the proxy.
>
> 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
its pretty vital that you do not design your system by expecting all
clients act the same way.
> 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.
IMO you should fix the handling in your proxy.
regards
klaus
PC
P.J. Cast.
Tue, Jan 8, 2008 9:25 PM
Of course everything is easy to spoof. So nothing is
trusted blindly. That is really beyond the point of
this disscussion IMHO.
In regards to clients that automatically redirect, I
did not state that pjsip should automatically do it.
It would be nice if there was a method to call to
reinvite with the same callid would be nice. This
archive, top two posts, illustrates what I would like:
https://lists.cs.columbia.edu/pipermail/sip-implementors/2006-September.txt
I don't think either way is right or wrong, but it
would be extremely nice if pjsip was able to coup with
this. As, almost all phones I have used work by
reusing the callid for a redirection. Ciscos,
grandstreams, Resiprocate (iirc what xlite uses). As
it stands, this is a pretty big hurdle right now for
me, as supporting forwards in this manner is a must. I
could possibly hack the heck out of pjsip to support
this, but I would rather see a compromise that would
become part of pjsip.
Cheers
--- Klaus Darilion klaus.mailinglists@pernau.at
wrote:
Hi Benny,
The issue is the sip proxy server expects the
to be the same, so it can identify the forwarded
as being part of the previous call. Else, it would
a completely new transaction.
Terminology:
transaction: consists of a request, optional 0..n
provisional
responses and a final response.
Thus every new INVITE request is a new SIP
transaction.
Its even a new SIP dialog as the the first INVITE
transaction did not
created a dialog.
Thus, the relationship between the first INVITE and
the second INVITE is
only at application layer - not at SIP layer. A good
SIP client should
not automatically accept a 302 and make a new call
but it should ask the
user if it wants to make a new call to the provided
URI.
Maybe some clients reuse the call-id in the new call
attempt, but others
will not and IMO both is valid.
A SIP proxy (or the billing system) should never
rely on data provided
by the SIP client.
If you need full control over call setup and billing
it is better to do
the redirection in the proxy.
do not trust user provided data (like call-id, tags,
contact ...)
blindly as this are very easy to spoof.
For instance, a UserA dials UserB, but UserB is
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
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.
Again: never expect all clients to act like you
expect them. If you want
to charge to call to user B then make the
redirection in the proxy.
For reference, both Xlite & Grandstream SIP Phones
have used send the Invite in response to the
with the same CallID to maintain the transaction.
Though, they differ in how they send out the To
Sip URI fields.
It is pretty vital that this works by placing a
with the same call id. Is there no way to control
its pretty vital that you do not design your system
by expecting all
clients act the same way.
this? Perhaps it would be a simple matter to
pjsip? If so, where would you recommend
modifications... allow client to set the callid
Of course everything is easy to spoof. So nothing is
trusted blindly. That is really beyond the point of
this disscussion IMHO.
In regards to clients that automatically redirect, I
did not state that pjsip should automatically do it.
It would be nice if there was a method to call to
reinvite with the same callid would be nice. This
archive, top two posts, illustrates what I would like:
https://lists.cs.columbia.edu/pipermail/sip-implementors/2006-September.txt
I don't think either way is right or wrong, but it
would be extremely nice if pjsip was able to coup with
this. As, almost all phones I have used work by
reusing the callid for a redirection. Ciscos,
grandstreams, Resiprocate (iirc what xlite uses). As
it stands, this is a pretty big hurdle right now for
me, as supporting forwards in this manner is a must. I
could possibly hack the heck out of pjsip to support
this, but I would rather see a compromise that would
become part of pjsip.
Cheers
--- Klaus Darilion <klaus.mailinglists@pernau.at>
wrote:
> P.J. Cast. wrote:
> > 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.
>
> Terminology:
> transaction: consists of a request, optional 0..n
> provisional
> responses and a final response.
>
> Thus every new INVITE request is a new SIP
> transaction.
> Its even a new SIP dialog as the the first INVITE
> transaction did not
> created a dialog.
>
> Thus, the relationship between the first INVITE and
> the second INVITE is
> only at application layer - not at SIP layer. A good
> SIP client should
> not automatically accept a 302 and make a new call
> but it should ask the
> user if it wants to make a new call to the provided
> URI.
>
> Maybe some clients reuse the call-id in the new call
> attempt, but others
> will not and IMO both is valid.
>
> A SIP proxy (or the billing system) should never
> rely on data provided
> by the SIP client.
>
> If you need full control over call setup and billing
> it is better to do
> the redirection in the proxy.
>
> do not trust user provided data (like call-id, tags,
> contact ...)
> blindly as this are very easy to spoof.
>
> >
> > 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.
>
> Again: never expect all clients to act like you
> expect them. If you want
> to charge to call to user B then make the
> redirection in the proxy.
> >
> > 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
>
> its pretty vital that you do not design your system
> by expecting all
> clients act the same way.
>
> > 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.
>
> IMO you should fix the handling in your proxy.
>
> regards
> klaus
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@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
BP
Benny Prijono
Wed, Jan 9, 2008 4:59 PM
I kinda agree with you both. :)
I agree with Klaus, as RFC 3261 says:
8.1.3.4 Processing 3xx Responses
...
It is RECOMMENDED that the UAC reuse the same To, From, and Call-ID
used in the original redirected request, but the UAC MAY also choose
to update the Call-ID header field value for new requests, for
example.
So since it only recommends (it's not even a SHOULD), it's seems like a bad
idea to design a feature based on the assumption that Call-ID stays the same
upon redirection.
On the other hand, I agree with P.J. that as a stack, pjsip should have the
flexibility to control the Call-ID in a dialog, so I'm willing to implement
this. It should be rather straightforward, just need to add a new function
to create dialog with the additional call-id parameter, and propagate this
function all the way to pjsua-lib level. I'll do this in the next few days,
and for now I've just added this ticket:
http://www.pjsip.org/trac/ticket/442. Flame me if I forget..
cheers,
-benny
On 1/8/08, P.J. Cast. pjcast@yahoo.com wrote:
Of course everything is easy to spoof. So nothing is
trusted blindly. That is really beyond the point of
this disscussion IMHO.
In regards to clients that automatically redirect, I
did not state that pjsip should automatically do it.
It would be nice if there was a method to call to
reinvite with the same callid would be nice. This
archive, top two posts, illustrates what I would like:
https://lists.cs.columbia.edu/pipermail/sip-implementors/2006-September.txt
I don't think either way is right or wrong, but it
would be extremely nice if pjsip was able to coup with
this. As, almost all phones I have used work by
reusing the callid for a redirection. Ciscos,
grandstreams, Resiprocate (iirc what xlite uses). As
it stands, this is a pretty big hurdle right now for
me, as supporting forwards in this manner is a must. I
could possibly hack the heck out of pjsip to support
this, but I would rather see a compromise that would
become part of pjsip.
Cheers
--- Klaus Darilion klaus.mailinglists@pernau.at
wrote:
Hi Benny,
The issue is the sip proxy server expects the
to be the same, so it can identify the forwarded
as being part of the previous call. Else, it would
a completely new transaction.
Terminology:
transaction: consists of a request, optional 0..n
provisional
responses and a final response.
Thus every new INVITE request is a new SIP
transaction.
Its even a new SIP dialog as the the first INVITE
transaction did not
created a dialog.
Thus, the relationship between the first INVITE and
the second INVITE is
only at application layer - not at SIP layer. A good
SIP client should
not automatically accept a 302 and make a new call
but it should ask the
user if it wants to make a new call to the provided
URI.
Maybe some clients reuse the call-id in the new call
attempt, but others
will not and IMO both is valid.
A SIP proxy (or the billing system) should never
rely on data provided
by the SIP client.
If you need full control over call setup and billing
it is better to do
the redirection in the proxy.
do not trust user provided data (like call-id, tags,
contact ...)
blindly as this are very easy to spoof.
For instance, a UserA dials UserB, but UserB is
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
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.
Again: never expect all clients to act like you
expect them. If you want
to charge to call to user B then make the
redirection in the proxy.
For reference, both Xlite & Grandstream SIP Phones
have used send the Invite in response to the
with the same CallID to maintain the transaction.
Though, they differ in how they send out the To
Sip URI fields.
It is pretty vital that this works by placing a
with the same call id. Is there no way to control
its pretty vital that you do not design your system
by expecting all
clients act the same way.
this? Perhaps it would be a simple matter to
pjsip? If so, where would you recommend
modifications... allow client to set the callid
I kinda agree with you both. :)
I agree with Klaus, as RFC 3261 says:
8.1.3.4 Processing 3xx Responses
...
It is RECOMMENDED that the UAC reuse the same To, From, and Call-ID
used in the original redirected request, but the UAC MAY also choose
to update the Call-ID header field value for new requests, for
example.
So since it only recommends (it's not even a SHOULD), it's seems like a bad
idea to design a feature based on the assumption that Call-ID stays the same
upon redirection.
On the other hand, I agree with P.J. that as a stack, pjsip should have the
flexibility to control the Call-ID in a dialog, so I'm willing to implement
this. It should be rather straightforward, just need to add a new function
to create dialog with the additional call-id parameter, and propagate this
function all the way to pjsua-lib level. I'll do this in the next few days,
and for now I've just added this ticket:
http://www.pjsip.org/trac/ticket/442. Flame me if I forget..
cheers,
-benny
On 1/8/08, P.J. Cast. <pjcast@yahoo.com> wrote:
>
> Of course everything is easy to spoof. So nothing is
> trusted blindly. That is really beyond the point of
> this disscussion IMHO.
>
> In regards to clients that automatically redirect, I
> did not state that pjsip should automatically do it.
> It would be nice if there was a method to call to
> reinvite with the same callid would be nice. This
> archive, top two posts, illustrates what I would like:
>
> https://lists.cs.columbia.edu/pipermail/sip-implementors/2006-September.txt
>
> I don't think either way is right or wrong, but it
> would be extremely nice if pjsip was able to coup with
> this. As, almost all phones I have used work by
> reusing the callid for a redirection. Ciscos,
> grandstreams, Resiprocate (iirc what xlite uses). As
> it stands, this is a pretty big hurdle right now for
> me, as supporting forwards in this manner is a must. I
> could possibly hack the heck out of pjsip to support
> this, but I would rather see a compromise that would
> become part of pjsip.
>
> Cheers
>
>
> --- Klaus Darilion <klaus.mailinglists@pernau.at>
> wrote:
>
> > P.J. Cast. wrote:
> > > 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.
> >
> > Terminology:
> > transaction: consists of a request, optional 0..n
> > provisional
> > responses and a final response.
> >
> > Thus every new INVITE request is a new SIP
> > transaction.
> > Its even a new SIP dialog as the the first INVITE
> > transaction did not
> > created a dialog.
> >
> > Thus, the relationship between the first INVITE and
> > the second INVITE is
> > only at application layer - not at SIP layer. A good
> > SIP client should
> > not automatically accept a 302 and make a new call
> > but it should ask the
> > user if it wants to make a new call to the provided
> > URI.
> >
> > Maybe some clients reuse the call-id in the new call
> > attempt, but others
> > will not and IMO both is valid.
> >
> > A SIP proxy (or the billing system) should never
> > rely on data provided
> > by the SIP client.
> >
> > If you need full control over call setup and billing
> > it is better to do
> > the redirection in the proxy.
> >
> > do not trust user provided data (like call-id, tags,
> > contact ...)
> > blindly as this are very easy to spoof.
> >
> > >
> > > 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.
> >
> > Again: never expect all clients to act like you
> > expect them. If you want
> > to charge to call to user B then make the
> > redirection in the proxy.
> > >
> > > 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
> >
> > its pretty vital that you do not design your system
> > by expecting all
> > clients act the same way.
> >
> > > 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.
> >
> > IMO you should fix the handling in your proxy.
> >
> > regards
> > klaus
> >
> > _______________________________________________
> > Visit our blog: http://blog.pjsip.org
> >
> > pjsip mailing list
> > pjsip@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
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
PC
P.J. Cast.
Wed, Jan 9, 2008 7:17 PM
Benny,
Thanks, that is really good news. I agree that relying
on a behavior possibly not present in some Sip
Implementations there could cause issues. However, the
main thing is really that the behavior is the same in
the majority of Sip Clients, and if pjsip gets this
ability by letting the client app fiddle with the
CallID when needed, that would be excellent.
Thanks again. I'll keep an eye for this in Svn.
--- Benny Prijono bennylp@pjsip.org wrote:
I kinda agree with you both. :)
I agree with Klaus, as RFC 3261 says:
8.1.3.4 Processing 3xx Responses
...
It is RECOMMENDED that the UAC reuse the same To,
From, and Call-ID
used in the original redirected request, but the
UAC MAY also choose
to update the Call-ID header field value for new
requests, for
example.
So since it only recommends (it's not even a
SHOULD), it's seems like a bad
idea to design a feature based on the assumption
that Call-ID stays the same
upon redirection.
On the other hand, I agree with P.J. that as a
stack, pjsip should have the
flexibility to control the Call-ID in a dialog, so
I'm willing to implement
this. It should be rather straightforward, just need
to add a new function
to create dialog with the additional call-id
parameter, and propagate this
function all the way to pjsua-lib level. I'll do
this in the next few days,
and for now I've just added this ticket:
http://www.pjsip.org/trac/ticket/442. Flame me if I
forget..
cheers,
-benny
On 1/8/08, P.J. Cast. pjcast@yahoo.com wrote:
Of course everything is easy to spoof. So nothing
trusted blindly. That is really beyond the point
this disscussion IMHO.
In regards to clients that automatically redirect,
did not state that pjsip should automatically do
It would be nice if there was a method to call to
reinvite with the same callid would be nice. This
archive, top two posts, illustrates what I would
I don't think either way is right or wrong, but it
would be extremely nice if pjsip was able to coup
this. As, almost all phones I have used work by
reusing the callid for a redirection. Ciscos,
grandstreams, Resiprocate (iirc what xlite uses).
it stands, this is a pretty big hurdle right now
me, as supporting forwards in this manner is a
could possibly hack the heck out of pjsip to
this, but I would rather see a compromise that
Hi Benny,
The issue is the sip proxy server expects the
to be the same, so it can identify the
as being part of the previous call. Else, it
a completely new transaction.
Terminology:
transaction: consists of a request, optional
provisional
responses and a final response.
Thus every new INVITE request is a new SIP
transaction.
Its even a new SIP dialog as the the first
transaction did not
created a dialog.
Thus, the relationship between the first INVITE
the second INVITE is
only at application layer - not at SIP layer. A
SIP client should
not automatically accept a 302 and make a new
but it should ask the
user if it wants to make a new call to the
URI.
Maybe some clients reuse the call-id in the new
attempt, but others
will not and IMO both is valid.
A SIP proxy (or the billing system) should never
rely on data provided
by the SIP client.
If you need full control over call setup and
it is better to do
the redirection in the proxy.
do not trust user provided data (like call-id,
contact ...)
blindly as this are very easy to spoof.
For instance, a UserA dials UserB, but UserB
available and he has setup a forward to some
number. Consequently, Proxy returns 302 with
number.
Now, with the callid, the proxy can recognize
was a forward from UserB, so UserB is the
responsible for it (and any billing/accounting
associated).
With a new CallID, UserA would have to pay to
forwarded. Not really optimal.
Again: never expect all clients to act like you
expect them. If you want
to charge to call to user B then make the
redirection in the proxy.
For reference, both Xlite & Grandstream SIP
have used send the Invite in response to the
with the same CallID to maintain the
Though, they differ in how they send out the
Sip URI fields.
It is pretty vital that this works by placing
with the same call id. Is there no way to
its pretty vital that you do not design your
by expecting all
clients act the same way.
this? Perhaps it would be a simple matter to
pjsip? If so, where would you recommend
modifications... allow client to set the
IMO you should fix the handling in your proxy.
regards
klaus
=== message truncated ===>
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
Benny,
Thanks, that is really good news. I agree that relying
on a behavior possibly not present in some Sip
Implementations there could cause issues. However, the
main thing is really that the behavior is the same in
the majority of Sip Clients, and if pjsip gets this
ability by letting the client app fiddle with the
CallID when needed, that would be excellent.
Thanks again. I'll keep an eye for this in Svn.
- Phillip
--- Benny Prijono <bennylp@pjsip.org> wrote:
> I kinda agree with you both. :)
>
> I agree with Klaus, as RFC 3261 says:
>
> 8.1.3.4 Processing 3xx Responses
> ...
> It is RECOMMENDED that the UAC reuse the same To,
> From, and Call-ID
> used in the original redirected request, but the
> UAC MAY also choose
> to update the Call-ID header field value for new
> requests, for
> example.
>
> So since it only recommends (it's not even a
> SHOULD), it's seems like a bad
> idea to design a feature based on the assumption
> that Call-ID stays the same
> upon redirection.
>
> On the other hand, I agree with P.J. that as a
> stack, pjsip should have the
> flexibility to control the Call-ID in a dialog, so
> I'm willing to implement
> this. It should be rather straightforward, just need
> to add a new function
> to create dialog with the additional call-id
> parameter, and propagate this
> function all the way to pjsua-lib level. I'll do
> this in the next few days,
> and for now I've just added this ticket:
> http://www.pjsip.org/trac/ticket/442. Flame me if I
> forget..
>
> cheers,
> -benny
>
>
> On 1/8/08, P.J. Cast. <pjcast@yahoo.com> wrote:
> >
> > Of course everything is easy to spoof. So nothing
> is
> > trusted blindly. That is really beyond the point
> of
> > this disscussion IMHO.
> >
> > In regards to clients that automatically redirect,
> I
> > did not state that pjsip should automatically do
> it.
> > It would be nice if there was a method to call to
> > reinvite with the same callid would be nice. This
> > archive, top two posts, illustrates what I would
> like:
> >
> >
>
https://lists.cs.columbia.edu/pipermail/sip-implementors/2006-September.txt
> >
> > I don't think either way is right or wrong, but it
> > would be extremely nice if pjsip was able to coup
> with
> > this. As, almost all phones I have used work by
> > reusing the callid for a redirection. Ciscos,
> > grandstreams, Resiprocate (iirc what xlite uses).
> As
> > it stands, this is a pretty big hurdle right now
> for
> > me, as supporting forwards in this manner is a
> must. I
> > could possibly hack the heck out of pjsip to
> support
> > this, but I would rather see a compromise that
> would
> > become part of pjsip.
> >
> > Cheers
> >
> >
> > --- Klaus Darilion <klaus.mailinglists@pernau.at>
> > wrote:
> >
> > > P.J. Cast. wrote:
> > > > 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.
> > >
> > > Terminology:
> > > transaction: consists of a request, optional
> 0..n
> > > provisional
> > > responses and a final response.
> > >
> > > Thus every new INVITE request is a new SIP
> > > transaction.
> > > Its even a new SIP dialog as the the first
> INVITE
> > > transaction did not
> > > created a dialog.
> > >
> > > Thus, the relationship between the first INVITE
> and
> > > the second INVITE is
> > > only at application layer - not at SIP layer. A
> good
> > > SIP client should
> > > not automatically accept a 302 and make a new
> call
> > > but it should ask the
> > > user if it wants to make a new call to the
> provided
> > > URI.
> > >
> > > Maybe some clients reuse the call-id in the new
> call
> > > attempt, but others
> > > will not and IMO both is valid.
> > >
> > > A SIP proxy (or the billing system) should never
> > > rely on data provided
> > > by the SIP client.
> > >
> > > If you need full control over call setup and
> billing
> > > it is better to do
> > > the redirection in the proxy.
> > >
> > > do not trust user provided data (like call-id,
> tags,
> > > contact ...)
> > > blindly as this are very easy to spoof.
> > >
> > > >
> > > > 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.
> > >
> > > Again: never expect all clients to act like you
> > > expect them. If you want
> > > to charge to call to user B then make the
> > > redirection in the proxy.
> > > >
> > > > 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
> > >
> > > its pretty vital that you do not design your
> system
> > > by expecting all
> > > clients act the same way.
> > >
> > > > 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.
> > >
> > > IMO you should fix the handling in your proxy.
> > >
> > > regards
> > > klaus
>
=== message truncated ===>
_______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
>
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
PC
P.J. Cast.
Thu, Jan 17, 2008 12:08 AM
Hi again,
Well, I think I found a way to do this without relying
on CallId changing... But, the ability to change
CallID would still be nice, but is not urgent.
However, how do i go about getting the contact header?
From the on_call_state callback, when state is
disconnected, and last_status is 302, I check the
remote_contact string of pjsua_call_info, but it
contains only the original contact of the first few
signaling messages, but not the new destination
location. Am I doing something wrong? Is there another
method I should be using to get access to fields
(would probably help with receiving other custom
headers)? I'll look through the doc's some more, but a
quick hint would be awesome ;-)
Thanks
--- "P.J. Cast." pjcast@yahoo.com wrote:
Benny,
Thanks, that is really good news. I agree that
relying
on a behavior possibly not present in some Sip
Implementations there could cause issues. However,
the
main thing is really that the behavior is the same
in
the majority of Sip Clients, and if pjsip gets this
ability by letting the client app fiddle with the
CallID when needed, that would be excellent.
Thanks again. I'll keep an eye for this in Svn.
--- Benny Prijono bennylp@pjsip.org wrote:
I kinda agree with you both. :)
I agree with Klaus, as RFC 3261 says:
8.1.3.4 Processing 3xx Responses
...
It is RECOMMENDED that the UAC reuse the same
From, and Call-ID
used in the original redirected request, but
UAC MAY also choose
to update the Call-ID header field value for
requests, for
example.
So since it only recommends (it's not even a
SHOULD), it's seems like a bad
idea to design a feature based on the assumption
that Call-ID stays the same
upon redirection.
On the other hand, I agree with P.J. that as a
stack, pjsip should have the
flexibility to control the Call-ID in a dialog, so
I'm willing to implement
this. It should be rather straightforward, just
to add a new function
to create dialog with the additional call-id
parameter, and propagate this
function all the way to pjsua-lib level. I'll do
this in the next few days,
and for now I've just added this ticket:
http://www.pjsip.org/trac/ticket/442. Flame me if
Of course everything is easy to spoof. So
trusted blindly. That is really beyond the point
this disscussion IMHO.
In regards to clients that automatically
did not state that pjsip should automatically do
It would be nice if there was a method to call
reinvite with the same callid would be nice.
archive, top two posts, illustrates what I would
I don't think either way is right or wrong, but
would be extremely nice if pjsip was able to
this. As, almost all phones I have used work by
reusing the callid for a redirection. Ciscos,
grandstreams, Resiprocate (iirc what xlite
it stands, this is a pretty big hurdle right now
me, as supporting forwards in this manner is a
could possibly hack the heck out of pjsip to
this, but I would rather see a compromise that
become part of pjsip.
Cheers
--- Klaus Darilion
Hi Benny,
The issue is the sip proxy server expects
to be the same, so it can identify the
as being part of the previous call. Else, it
a completely new transaction.
Terminology:
transaction: consists of a request, optional
provisional
responses and a final response.
Thus every new INVITE request is a new SIP
transaction.
Its even a new SIP dialog as the the first
transaction did not
created a dialog.
Thus, the relationship between the first
the second INVITE is
only at application layer - not at SIP layer.
SIP client should
not automatically accept a 302 and make a new
but it should ask the
user if it wants to make a new call to the
URI.
Maybe some clients reuse the call-id in the
attempt, but others
will not and IMO both is valid.
A SIP proxy (or the billing system) should
rely on data provided
by the SIP client.
If you need full control over call setup and
it is better to do
the redirection in the proxy.
do not trust user provided data (like call-id,
contact ...)
blindly as this are very easy to spoof.
For instance, a UserA dials UserB, but UserB
available and he has setup a forward to some
number. Consequently, Proxy returns 302 with
number.
Now, with the callid, the proxy can
was a forward from UserB, so UserB is the
responsible for it (and any
associated).
With a new CallID, UserA would have to pay
forwarded. Not really optimal.
Hi again,
Well, I think I found a way to do this without relying
on CallId changing... But, the ability to change
CallID would still be nice, but is not urgent.
However, how do i go about getting the contact header?
>From the on_call_state callback, when state is
disconnected, and last_status is 302, I check the
remote_contact string of pjsua_call_info, but it
contains only the original contact of the first few
signaling messages, but not the new destination
location. Am I doing something wrong? Is there another
method I should be using to get access to fields
(would probably help with receiving other custom
headers)? I'll look through the doc's some more, but a
quick hint would be awesome ;-)
Thanks
--- "P.J. Cast." <pjcast@yahoo.com> wrote:
> Benny,
>
> Thanks, that is really good news. I agree that
> relying
> on a behavior possibly not present in some Sip
> Implementations there could cause issues. However,
> the
> main thing is really that the behavior is the same
> in
> the majority of Sip Clients, and if pjsip gets this
> ability by letting the client app fiddle with the
> CallID when needed, that would be excellent.
>
> Thanks again. I'll keep an eye for this in Svn.
>
> - Phillip
>
> --- Benny Prijono <bennylp@pjsip.org> wrote:
>
> > I kinda agree with you both. :)
> >
> > I agree with Klaus, as RFC 3261 says:
> >
> > 8.1.3.4 Processing 3xx Responses
> > ...
> > It is RECOMMENDED that the UAC reuse the same
> To,
> > From, and Call-ID
> > used in the original redirected request, but
> the
> > UAC MAY also choose
> > to update the Call-ID header field value for
> new
> > requests, for
> > example.
> >
> > So since it only recommends (it's not even a
> > SHOULD), it's seems like a bad
> > idea to design a feature based on the assumption
> > that Call-ID stays the same
> > upon redirection.
> >
> > On the other hand, I agree with P.J. that as a
> > stack, pjsip should have the
> > flexibility to control the Call-ID in a dialog, so
> > I'm willing to implement
> > this. It should be rather straightforward, just
> need
> > to add a new function
> > to create dialog with the additional call-id
> > parameter, and propagate this
> > function all the way to pjsua-lib level. I'll do
> > this in the next few days,
> > and for now I've just added this ticket:
> > http://www.pjsip.org/trac/ticket/442. Flame me if
> I
> > forget..
> >
> > cheers,
> > -benny
> >
> >
> > On 1/8/08, P.J. Cast. <pjcast@yahoo.com> wrote:
> > >
> > > Of course everything is easy to spoof. So
> nothing
> > is
> > > trusted blindly. That is really beyond the point
> > of
> > > this disscussion IMHO.
> > >
> > > In regards to clients that automatically
> redirect,
> > I
> > > did not state that pjsip should automatically do
> > it.
> > > It would be nice if there was a method to call
> to
> > > reinvite with the same callid would be nice.
> This
> > > archive, top two posts, illustrates what I would
> > like:
> > >
> > >
> >
>
https://lists.cs.columbia.edu/pipermail/sip-implementors/2006-September.txt
> > >
> > > I don't think either way is right or wrong, but
> it
> > > would be extremely nice if pjsip was able to
> coup
> > with
> > > this. As, almost all phones I have used work by
> > > reusing the callid for a redirection. Ciscos,
> > > grandstreams, Resiprocate (iirc what xlite
> uses).
> > As
> > > it stands, this is a pretty big hurdle right now
> > for
> > > me, as supporting forwards in this manner is a
> > must. I
> > > could possibly hack the heck out of pjsip to
> > support
> > > this, but I would rather see a compromise that
> > would
> > > become part of pjsip.
> > >
> > > Cheers
> > >
> > >
> > > --- Klaus Darilion
> <klaus.mailinglists@pernau.at>
> > > wrote:
> > >
> > > > P.J. Cast. wrote:
> > > > > 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.
> > > >
> > > > Terminology:
> > > > transaction: consists of a request, optional
> > 0..n
> > > > provisional
> > > > responses and a final response.
> > > >
> > > > Thus every new INVITE request is a new SIP
> > > > transaction.
> > > > Its even a new SIP dialog as the the first
> > INVITE
> > > > transaction did not
> > > > created a dialog.
> > > >
> > > > Thus, the relationship between the first
> INVITE
> > and
> > > > the second INVITE is
> > > > only at application layer - not at SIP layer.
> A
> > good
> > > > SIP client should
> > > > not automatically accept a 302 and make a new
> > call
> > > > but it should ask the
> > > > user if it wants to make a new call to the
> > provided
> > > > URI.
> > > >
> > > > Maybe some clients reuse the call-id in the
> new
> > call
> > > > attempt, but others
> > > > will not and IMO both is valid.
> > > >
> > > > A SIP proxy (or the billing system) should
> never
> > > > rely on data provided
> > > > by the SIP client.
> > > >
> > > > If you need full control over call setup and
> > billing
> > > > it is better to do
> > > > the redirection in the proxy.
> > > >
> > > > do not trust user provided data (like call-id,
> > tags,
> > > > contact ...)
> > > > blindly as this are very easy to spoof.
> > > >
> > > > >
> > > > > 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.
>
=== message truncated ===
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
BP
Benny Prijono
Thu, Jan 17, 2008 10:16 AM
From the on_call_state callback, when state is
disconnected, and last_status is 302, I check the
remote_contact string of pjsua_call_info, but it
contains only the original contact of the first few
signaling messages, but not the new destination
location. Am I doing something wrong? Is there another
method I should be using to get access to fields
(would probably help with receiving other custom
headers)? I'll look through the doc's some more, but a
quick hint would be awesome ;-)
On 1/17/08, P.J. Cast. <pjcast@yahoo.com> wrote:
>
> >From the on_call_state callback, when state is
> disconnected, and last_status is 302, I check the
> remote_contact string of pjsua_call_info, but it
> contains only the original contact of the first few
> signaling messages, but not the new destination
> location. Am I doing something wrong? Is there another
> method I should be using to get access to fields
> (would probably help with receiving other custom
> headers)? I'll look through the doc's some more, but a
> quick hint would be awesome ;-)
I think this deserves a longer explanation, so I've just created a wiki page
to explain this. You can start from
http://trac.pjsip.org/repos/wiki/FAQ#pjsip_event
cheers,
-benny
Thanks
>