<!-- Kamailio Pull Request Template -->
<!-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with 'git cherry-pick -x ...' - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -->
#### Pre-Submission Checklist <!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply --> <!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above--> <!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list --> - [x] Commit message has the format required by CONTRIBUTING guide - [x] Commits are split per component (core, individual modules, libs, utils, ...) - [x] Each component has a single commit (if not, squash them into one commit) - [x] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist: <!-- Go over all points below, and after creating the PR, tick the checkboxes that apply --> - [ ] PR should be backported to stable branches - [x] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description **Use origin-host of CCR response as destination-host of subsequent CCR requests** When connecting to a diameter node which using relay, it may load balance requests to multiple servers for handling. This change ensures that subsequent requests are sent to the same server.
**Honour AVP_Time_Quota_Threshold in CCR response** Charging server indicates it want an interim update X number of seconds before all quota has been used.
**Add new modparam «strip_plus_from_e164»** The existing formatitng routine check if it's a tel: or sip: uri, and sets E.164 or SIP according to that. If it's E.164, it strips "tel:" too. A subscription id with leading "+" is actually of type SIP.
I didn't want to make a breaking change here, so I introduced a new setting which fixes the behaviour.
**Moved subscription id formatting into a common function** For more clean code, and one place to make further adjustments.
**Handle CCR response without AVP_Validity_Time** If missing, various places in the module reported immediate expire.
**Handle IMS_RAR (Re-auth) request from charging server** Typical scenario is that there's a missing interim update, and the server want to check if the session is still alive. At reception we try a lookup and if found, schedule a new request.
**Handle IMS_ASR (Abort) request from charging server** Similar handling as for re-auth, but for server-initiated termination of the call.
**Fixed issue with signed/unsigned int related to check for Expires header** cscf_get_expires_hdr() returns signed (-1 for not found), while that value was added to the outgoing diameter request unsigned. That again resulted in an Expires AVP with a really large value, and was rejected by the charging server.
Most probably cscf_get_expires_hdr() should be changed to return unsigned since the value theoretical can be that big, but since that is a common function for the ims modules it would require more testing than I'm capable of right now.
**Use str_dup() and str_free() from ims_getters instead of locally defined** Those were needed more places.