New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restomm as an IMS GW - Support to proxy out SIP messages to IMS #1339

gvagenas opened this Issue Aug 30, 2016 · 1 comment


None yet
1 participant

gvagenas commented Aug 30, 2016

Provide new feature that will allow UserAgentManager to proxy out SIP REGISTER messages and the next hop will be responsible to authenticate the user agent.
In that case Restcomm will act as a B2BUA and will route messages between the external registrar and the user agent.

If the registration is successful the Restcomm DB should be updated by using the register() method, so later Restcomm will be able to dial a registered client.

An example of how the UserAgentManager will be:

    public void onReceive(final Object message) throws Exception {
        if (message instanceof ReceiveTimeout) {
        } else if (message instanceof SipServletRequest) {
            final SipServletRequest request = (SipServletRequest) message;
            final String method = request.getMethod();
            if ("REGISTER".equalsIgnoreCase(method)) {
                if (imsGW) {
                    proxyRegisterToIms(); //This method is a B2BUA between the WebRTC client and IMS
                if(authenticateUsers) { // Allow disabling of SIP authentication
                    final String authorization = request.getHeader("Proxy-Authorization");
                    if (authorization != null) {
                      if (permitted(authorization, method)) {
                      } else {
                          SipServletResponse response = ((SipServletRequest) message).createResponse(javax.servlet.sip.SipServletResponse.SC_FORBIDDEN); //Issue #935, Send 403 FORBIDDEN instead of issuing 407 again and again
                    } else {
                } else {
        } else if (message instanceof SipServletResponse) {
            SipServletResponse response = (SipServletResponse) message;
            if (response.getStatus()>400 && response.getMethod().equalsIgnoreCase("OPTIONS")) {
            } else {

    private void proxyRegisterToIms() {
        //Here proxy to IMS
        //When 200 OK then call register()
        if (imsResponseCode==200) {

@gvagenas gvagenas added this to the 8.0.0 milestone Aug 30, 2016

@gvagenas gvagenas modified the milestone: 8.0.0 Dec 23, 2016

@gvagenas gvagenas changed the title from Support to proxy out SIP REGISTER messages to Restomm as an IMS GW - Support to proxy out SIP messages to IMS Feb 3, 2017

gvagenas added a commit that referenced this issue Feb 3, 2017

@gvagenas gvagenas added the highlight label Feb 3, 2017

gvagenas added a commit that referenced this issue Feb 3, 2017

Merged with master
This refer to #1339

This comment has been minimized.


gvagenas commented Feb 3, 2017

This closed with PR #1724

@gvagenas gvagenas closed this Feb 3, 2017

maria-farooq added a commit that referenced this issue Feb 7, 2017

Merge branch 'master' into issue-1572
* master: (63 commits)
  Fix #1763 by changing the response code to 569
  Restcomm testsuite fixes
  Merged with master This refer to #1339
  Added documentation for IMS GW feature. This refer to #1339
  Automatically complete value extractor for ES 'value' properties
  Fix for maven checkstyle plugin
  Hide empty urls from number list in Dashboard
  Added ussd request url to numbers list
  fixed 'Voice Request' typo in Dashboard
  added exception msg in warn log
  changed logging level of AskTimeoutException while waiting for outbound call info
  Remove unnecessary rootUri parameter This refer to #1723
  Fix for init MySQL/MariaDB script
  Refurbished testsuite for having each HTTP test scenario into different methods as requested. Issue #637, PR #1717
  #1752 Fixing zipping of Media Server files during RC build.
  HTTP response from GMLC read via the response entity. Issue #637, PR #1717
  Fixes for testsuite with mocked GMLC stub, all tests passing again now. Issue #637, PR #1717
  Added Wiremock to mock GMLC for Geolocation testsuite. This refer to #637
  #1752 Made MS_HOME/.autoconfig scripts executable.
  Fixes for auto-config scripts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment