Comments (5)
@TheQue42 , your explanation makes sense.
Based on the above description, I have tried to create a PR to fix the issue in #3823.
from pjproject.
So I've been running some more tests; the issues are:
-
Service-Route headers previously added are not removed if a subsequent response doesn't contain Service-Route headers. That is because of the check here:
pjproject/pjsip/src/pjsua-lib/pjsua_acc.c
Line 2057 in ca0c440
I believe this check can be removed altogether? -
The other issue is: update_service_route() is only called if the request returns with a 2XX code, which means the Service-Route headers aren't cleared in case of an error response either; see:
pjproject/pjsip/src/pjsua-lib/pjsua_acc.c
Line 2421 in ca0c440
Also, thanks for your explanation @TheQue42
In my case the service provider seems to use the header to direct traffic towards certain proxies, but only under certain conditions which are out of my control.
from pjproject.
According to the RFC (https://datatracker.ietf.org/doc/html/rfc3608.html#section-6.1), you are correct:
If
the UA refreshes the registration, the stored value of the Service-
Route is updated according to the Service-Route header field of the
latest 200 class response. If there is no Service-Route header field
in the response, the UA clears any service route for that address-
of-record previously stored by the UA. If the re-registration
request is refused or if an existing registration expires and the UA
chooses not to re-register, the UA SHOULD discard any stored service
route for that address-of-record.
And we already did more or less the above, with the exception that we don't clear the outbound proxies:
https://github.com/pjsip/pjproject/blob/master/pjsip/src/pjsua-lib/pjsua_acc.c#L1993
- /* Find and parse Service-Route headers */
- /* Update account's route set
- /* First remove all routes which are not the outbound proxies */
- /* Then append the Service-Route URIs */
Not sure if we should remove the outbound proxies here.
from pjproject.
IMHO, since the Service-Route and outbound proxy config are two separate functions, I don't see why you would want to clear the outbound routes. At least since the original purpose of the service-route was to find the S-CSCF in an IMS network, and that shouldn't mean that you should all-of-sudden disregard the configuration on how to get "out of the local network", (since in IMS you must pass through the P-CSCF).
In my mind, if a "roaming" client received a "SIP default route" from a local/roaming network via DHCP, then that is the local network saying "you have to use this to get out of this network", and then having the home network(which shouldnt be able to know to much about a roaming network) override this with a service-route, seems counter-intuitive.
from pjproject.
Thank you @andreas-wehrmann . I have updated the PR based on your findings.
from pjproject.
Related Issues (20)
- Build android error HOT 1
- Loading the so file crashed in android5.1 HOT 4
- Crash in ioqueue_common_abs.c pj_ioqueue_sendto when checking IPv6 address length
- can't build ok in ubuntu16 HOT 1
- Failed to call the makeCall method(-560705187) HOT 1
- Crash in PjCamera2 PushFrame2 HOT 5
- send Dtmf does not work in pjsip 2.14.1 HOT 4
- sip parser memory overflow HOT 3
- ip to ip.NullPointerException: null upcall object in pj::Call::onCallState , java.lang.NullPointerException: null upcall object in pj::Call::onCallTsxState and resend old msg 180 rinding HOT 3
- NullPointerException: null upcall object in pj::Call::onCallState (also in pj::Call::onCallTsxState) HOT 2
- When I connect to a network that doesn't have WAN access. If PIJSIP performs domain name login, it will be blocked in the DNS resolution function getaddrinfo. This will last about 40 seconds. During the blocking period, calls between IP and IP cannot be received, and calls cannot be made. HOT 2
- When you call stopTransmit, rtp data is sent all the time HOT 10
- misalignedI pointer when deallocating address in android12 HOT 1
- Possibility to support stereo wav player HOT 1
- Hangup inside a DTMF callback causes assertion
- i am not able to install pjsua for python in windows HOT 6
- Default for PJMEDIA_AUD_DEV_INFO_NAME_LEN on linux systems is too small HOT 3
- AudioDevInfos returned by enumDev2() / portaudio all have a zero id
- Swig errors on python build HOT 2
- ../src/pj/lock.c:178: pj_lock_acquire: Assertion `lock != ((void *)0)' failed. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pjproject.