A number of additional ports have been opened on Kamailio – the relevant one here is TCP 443. An INVITE comes in from a UA whose from URI is suffixed with :443. PUA generates a PUBLISH out of this. Log is at https://gist.githubusercontent.com/phil-lavin/c381d556c22fd29b4fde/raw/77c5b....
The relevant bit to the issue is the last line. PUA is trying to send the PUBLISH to the address and port taken from the from URI… however it sends it over UDP. Because Kamailio is not bound to UDP 443, the PUBLISH is not received.
A hacky “fix” is to make Kamailio bind to UDP 443 as well as TCP 443. I will dig into this deeper today in an attempt to find a better fix.
Suggestions around what is the best solution would be appreciated. I’m thinking that sending this over TCP is not desirable in most instances – unless perhaps Kamailio is only bound to TCP ports?
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/509
Couldnt you just force the sending socket? Also is the client using TLS as 443 is traditionally the https binding, in which case could you not just append ;transport=tcp or ;transport=tls; on to the $ru or $du pseudo variables?
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/509#issuecomment-184598942
Sending socket isn't the issue here, it's the destination address/port. The destination can be forced by setting the outbound_proxy setting of PUA - http://www.kamailio.org/docs/modules/4.3.x/modules/pua.html#idp15445640. This works in my usecase but probably not in others.
The client isn't using TLS in this instance but this is the next step to implement. Appending to the pseudo variables may work but it seems like a hack rather than a bug fix.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/509#issuecomment-184654700
Closed #509.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/509#event-573888188
The port is part of the SIP address and when existing, SRV DNS query should not be done. If the identity of the user is not with the port, then it should not put it in the From/To headers. The address with port should be used only as outbound proxy in phone settings.
I am not sure what would be another good workaround here, besides the outbound proxy address in pua. Eventually an option to say ignore the port in sip identity address, controlled by modparam -- if you make a pull request, then it will be considered for merge.
Given it is not related to development, if you want to continue the discussion on this topic, the best is to use sr-users mailing list and get opinions from other users.
I am closing this issue here for now.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/509#issuecomment-190970306