Comments (10)
The comment pertained to the Srf#createUAC
method, where you can have opts.proxy
set to a proxy, e.g.
srf.createUAC(uri, {
proxy: anOutboundProxy,
localSdp: anSdp
})
However, what you have should work as well..are you testing with the latest version (4.2.17)? If not can you try that?
from drachtio-srf.
Also, the issue may be caused if you are using an older version of drachtio-server? If you are using the docker image can you make sure to test with (and docker pull) the latest
tag? If you are building your own, can you build the latest on the 'develop' branch?
You can also check the version of your docker image by doing this
MacBook-Pro-2:~ dhorton$ docker run -ti drachtio/drachtio-server:latest drachtio --version
v0.7.2-rc4-2-g58ab55a
from drachtio-srf.
I also thought of one other thing. In your example, you are sending a NOTIFY request. Often, a NOTIFY is sent within a SIP Dialog that was established by a preceeding SUBSCRIBE message. When that is the case, I am ignoring any outbound proxy setting since the route set was established as part of dialog creation. In other words, this proxy option only applies to requests outside of a dialog.
from drachtio-srf.
Hi Dave,
Thanks for your help again! My use case might be a bit complicated now, so maybe I can look at other ways to do it. I am not sure if there is a solution you can provide. In any case, in my situation, I have this:
UE (172.25.0.10) -> Proxy (172.25.0.5) -> Host (*.1, 192.168.1.1) -> IMS (172.29.0.4)
- UE and Proxy are in one Docker network.
- IMS is in another Docker network.
- The Host is just the common host in this case with all the Docker gateway addresses (172.25.0.1 & 172.29.0.1) and the actual public IP.
Of course, Proxy and IMS are drachtio-server. UE issues a SUBSCRIBE, it goes through Proxy, which points it to 192.168.1.1:5060, which is mapped by Docker to 172.29.0.4:5060.
I want the IMS server to issue a NOTIFY back to UE when it gets the SUBSCRIBE. I do this by making a srf.request() with the method set to NOTIFY and use the Call-ID from the SUBSCRIBE. But, it tries to send directly to 172.25.0.5 which isn't known to the 172.29.0.* subnet.
I have tried to set the outbound proxy, but it doesn't have an effect. I tried even to set the Record-Route at the Proxy to point to 192.168.1.1:65060 (this is the port it listens to) but drachtio seems to be overriding that back to 172.25.0.5.
As a workaround, I can put the IMS in the same subnet as the other entities, or, maybe I can host the IMS server on the host directly (but I prefer to keep all in Docker). At some point, I want to run the IMS part on a separate dedicated Host but still in Docker there.
I confirmed that I am using the latest version of drachtio-server. I rebuilt a few days ago from develop.
Thanks,
James
from drachtio-srf.
OK, I see. The SUBSCRIBE is basically being routed by a non-SIP element, so the Route set it constructs for the dialog ends up having an unreachable first hop.
Hmm..not sure I have a quick solution. I will think about it.
When you mentioned the Proxy is listening on 192.168.1.1:65060, I thought maybe you could use the external-ip property property to have it advertise that IP:port in its messaging -- but then I remembered that this only works with an IP address currently, not an IP and port. Maybe that is something I need to think about adding..
from drachtio-srf.
BTW, in case it is of interest (not that it will solve this problem, but to see other related code), I am working on simple presence agent of my own at: https://github.com/davehorton/drachtio-simple-server
from drachtio-srf.
actually, just for yucks, I would be interested to see what happens if you assign '192.168.1.1:65060' to the external-ip property of the drachtio server running the proxy app. If you are starting it via docker you should be able to do it via a command line argument like so:
docker exec drachtio/drachtio-server:latest drachtio --contact "sip:*;udp" --external-ip "192.168.1.1:65060"
Not sure this will work but it might. If it does not I'd be interested to see the server logging from the proxy.
It doesnt look like it would be too hard for me to get this to work, and it seems like it might be generally useful in Docker-type scenarios..
See here for details on command line arguments
from drachtio-srf.
Hi Dave,
I will try some of the testing with the external-ip and let you know. Your drachtio-simple-server looks good, but we are focused on working with clients using MSRP IM at the moment!
I also have a few other scenarios to test and may have additional questions. For now, I am running with the IMS server in the same Docker network without a Proxy. Even without a proxy, the previous network layout didn't work:
UE (172.25.0.10) -> Host (*.1, 192.168.1.1) -> IMS (172.29.0.4)
The NOTIFY could not get back to the UE via the Host. If the request comes from another machine on the Host network, it works and can be routed:
UE2 (192.168.1.10) -> Host (*.1, 192.168.1.1) -> IMS (172.29.0.4)
I think if the IMS server is on its own Host it will work well. It just isn't convenient for testing.
Thanks!
from drachtio-srf.
from drachtio-srf.
It was mainly for testing purposes to keep the deployments separated and was trying to simulate the case with the Proxy in between. But as a workaround, I am running with the IMS server in the same Docker network without a Proxy in the middle, and it is working. I still need to bring in the Proxy, which I will do and open a new issue if there are any other issues with that flow.
I will close this issue, I think the problem is my use case not really being compatible with Docker networking.
Thanks for all the help and clarifications.
from drachtio-srf.
Related Issues (20)
- PRACK interoperability not working HOT 3
- B2BUA 200 response missing SDP HOT 4
- OPTIONS request that causes a problem HOT 4
- Upgrade UUID to version 8 to avoid warnings for 3.4.0 HOT 2
- 407 response with re-Invite HOT 1
- ON Bye message in UAC/UAS , URl is replaced as placeholder and i am not getting bye message on the client HOT 1
- How can Srf client know about the loss of TCP/WS connection from SIP client to Drachtio server HOT 26
- how to place a call with asterisk HOT 3
- How to set SIP transport for createUac HOT 8
- SipError: Sip non-success response: 408 HOT 4
- createB2BUA can forward UAS Cancel request to UAC Cancel request.
- Can I get the headers of received CANCEL? HOT 17
- Do both Drachtio and SRF support SIP REPLACE?
- Public IP in Contact Header in #createUAS HOT 2
- Request-Line change request in SRF HOT 3
- Server error: unable to find dialog for dialog id provided HOT 1
- Getting periodic 486 and 503 errors HOT 3
- Srf types not updated correctly sometime after 4.5.23 HOT 3
- Capture all SIP messages in SIP Dialogs HOT 2
- "destroy" event not triggered if dialog.destroy() 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 drachtio-srf.