Summary: | ASTERISK-25986: chan_sip: Wrong request line with IMS and Proxy - Asterisk should be using loose routing, but it isn't? | ||||
Reporter: | Steve Akerman (stevenA) | Labels: | |||
Date Opened: | 2016-05-03 11:16:28 | Date Closed: | 2018-01-02 08:49:49.000-0600 | ||
Priority: | Major | Regression? | |||
Status: | Closed/Complete | Components: | Channels/chan_sip/General | ||
Versions: | 11.22.0-rc1 13.8.2 | Frequency of Occurrence | Constant | ||
Related Issues: |
| ||||
Environment: | RasPbx | Attachments: | ( 0) Issue_Log.txt | ||
Description: | Follow on from issue ASTERISK-24509
If setting up a trunk to an IMS where the registrar is behind a P-CSCF and not reachable directly, after initial registration, all INVITE and OPTION messages use the proxy domain and not the registrar domain. These are ignored by the P-CSCF and timeout after defined retransmits. FromDomain is set to REGISTRAR and used in FROM header, but proxy is used in Request-Line and To header. OutboundProxy cannot be set to REGISTRAR as DNS fails. Impact is that Outbound fails, and Inbound works until the registrar drops because of no keep-alives. Trunk is unusable. X-Lite, and Telephone can both be configured to work correctly (i.e. use the correct domain in RequestLine and To:Header. Registration is not an issue. Registrar: ims.mnc010.mcc208.3gppnetwork.org Proxy: internet.p-cscf.sfr.net {noformat} type=peer secret=MYPASS remotesecret=MYPASS port=5064 outboundproxy=internet.p-cscf.sfr.net:5064,force media_address=MYPUBLICIP insecure=invite,port host=ims.mnc010.mcc208.3gppnetwork.org fromuser=+3399XXXXXXXXXX fromdomain=ims.mnc010.mcc208.3gppnetwork.org defaultuser=+3399XXXXXXXXXX@ims.mnc010.mcc208.3gppnetwork.org context=from-trunk canreinvite=no auth=NDIXXXXXXXXXX.LIBERTALK@sfr.fr:MYPASS@ims.mnc010.mcc208.3gppnetwork.org {noformat} | ||||
Comments: | By: Asterisk Team (asteriskteam) 2016-05-03 11:16:28.886-0500 The severity of this issue has been automatically downgraded from "Blocker" to "Major". The "Blocker" severity is reserved for issues which have been determined to block the next release of Asterisk. This severity can only be set by privileged users. If this issue is deemed to block the next release it will be updated accordingly during the triage process. By: Asterisk Team (asteriskteam) 2016-05-03 11:16:29.108-0500 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: Steve Akerman (stevenA) 2016-05-03 12:39:22.972-0500 Sanitised Log files - data between end of call and registration deleted By: Steve Akerman (stevenA) 2016-05-04 01:28:52.056-0500 Is the issue actually that Asterisk stores the registration as the proxy and not as the registrar. See below registry entry. {noformat} Host dnsmgr Username Refresh State Reg.Time internet.p-cscf.sfr.net:5064 Y +3399XXXXXXXXXX 3585 Registered Wed, 04 May 2016 07:37:02 {noformat} It then uses this host in all subsequent messages? By: Rusty Newton (rnewton) 2016-05-09 18:08:23.061-0500 This does look like an issue, so I'm going to open it up. I'm not sure if the registration storage plays into or not. Whoever looks into this deeper will have to examine that. By: Walter Doekes (wdoekes) 2016-10-05 17:09:18.533-0500 The registration uses this: {noformat} snprintf(addr, sizeof(addr), "sip:%s:%d", S_OR(p->fromdomain,S_OR(r->regdomain, sip_sanitized_host(r->hostname))), portno); ... snprintf(to, sizeof(to), "<sip:%s@%s>", r->username, S_OR(r->regdomain, sip_sanitized_host(p->tohost))); {noformat} And tohost contains the host value ({{host=ims.mnc010.mcc208.3gppnetwork.org}}). As for the invite, it depends on a lot of factors. If I may venture a guess: I think Asterisk translates the Contact from the REGISTER-200 because the device is configured as behind NAT. Try {{nat=no}} (or {{never}}, I don't remember which) in your peer config. By: Walter Doekes (wdoekes) 2016-10-10 09:19:54.447-0500 [~stevenA]: Could you confirm whether disabling nat on your configured peer makes things work? By: Corey Farrell (coreyfarrell) 2017-12-14 16:37:06.246-0600 [~stevenA]: Are you able to test with nat disabled as Walter requested? By: Asterisk Team (asteriskteam) 2018-01-02 08:49:49.907-0600 Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1]. [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines |