1

I work on restcomm sip servlet. I use restcomm web sdk and restcomm tomcat as a server. when I want to get a password in the doRegister method its return null.

the server code is:

String password = ((SipURI) request.getFrom().getURI()).getUserPassword();

the client code is:

var parameters = {
            'debug': true,
            'username': 'alice',
            'password': '1234',
            'registrar': 'ws://192.168.1.3:5082',
            'domain': '192.168.1.3'
        };
RestCommClient.Device.setup(parameters);

is need some setting in dar file?

edit

I found this link. it's descript how to enable security for sip servlet but something incorrect for example there is no :

 <Realm className="org.apache.catalina.realm.MemoryRealm" />

to uncomment it but I insert it like below :

  <!--For clustering, please take a look at documentation at:
      /docs/cluster-howto.html  (simple how to)
      /docs/config/cluster.html (reference documentation) -->
  <!--
  <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
  -->

  <!-- Use the LockOutRealm to prevent attempts to guess user passwords
       via a brute-force attack -->
  <Realm className="org.apache.catalina.realm.LockOutRealm">
    <!-- This Realm uses the UserDatabase configured in the global JNDI
         resources under the key "UserDatabase".  Any edits
         that are performed against this UserDatabase are immediately
         available for use by the Realm.  -->
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
           resourceName="UserDatabase"/>
           <Realm className="org.apache.catalina.realm.MemoryRealm" />
  </Realm>

the second isuue is where to add step 3 in that tutorial(I use "To enable security in Tomcat" section)

this config too not work for me.

Another thing I found is you don't have any other object of SipUrI class except username maybe something wrong in library and not fill SipUrl

sadeghpro
  • 448
  • 2
  • 8
  • 24

0 Answers0