Skip to content

Commit 54d1704

Browse files
author
Maria Farooq
committed
fixed the sbc tests
1 parent da4971b commit 54d1704

2 files changed

Lines changed: 4 additions & 12 deletions

File tree

restcomm/restcomm.commons/src/main/java/org/restcomm/connect/commons/util/DigestAuthentication.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,4 @@ public static String HA1(String username, String realm, String password){
144144
ha1 = DigestAuthentication.H(username+":"+realm+":"+password, algorithm);
145145
return ha1;
146146
}
147-
148-
public static void main(String [] str){
149-
String username="alice";
150-
String realm="127.0.0.1";
151-
String password="1234";
152-
System.out.println(DigestAuthentication.HA1(username, realm, password));
153-
}
154147
}

restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/telephony/DialActionOrganizationSBCTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ public void testDialNumberExistingInMultipleOrganizationCase1() throws ParseExce
471471

472472
SipURI uri = bobSipStackOrg2.getAddressFactory().createSipURI(null, "127.0.0.1:5080");
473473
assertTrue(bobPhoneOrg2.register(uri, "bob", clientPassword, "sip:bob@127.0.0.1:5090", 3600, 3600));
474-
Credential c = new Credential("org3.restcomm.com", "bob", clientPassword);
474+
Credential c = new Credential("org2.restcomm.com", "bob", clientPassword);
475475
bobPhoneOrg2.addUpdateCredential(c);
476476

477477
//register as alice@org2.restcomm.com
@@ -524,7 +524,7 @@ public void testDialNumberExistingInMultipleOrganizationCase2() throws ParseExce
524524

525525
SipURI uri = bobSipStackOrg2.getAddressFactory().createSipURI(null, "127.0.0.1:5080");
526526
assertTrue(bobPhoneOrg2.register(uri, "bob", clientPassword, "sip:bob@127.0.0.1:5090", 3600, 3600));
527-
Credential c = new Credential("127.0.0.1", "bob", clientPassword);
527+
Credential c = new Credential("org2.restcomm.com", "bob", clientPassword);
528528
bobPhoneOrg2.addUpdateCredential(c);
529529

530530
//register as alice@org2.restcomm.com
@@ -580,7 +580,7 @@ public void testDialNumberExistingInMultipleOrganizationJoinConferenceOfDifferen
580580

581581
SipURI uri = bobSipStackOrg3.getAddressFactory().createSipURI(null, "127.0.0.1:5080");
582582
assertTrue(bobPhoneOrg3.register(uri, "bob", clientPassword, "sip:bob@127.0.0.1:5092", 3600, 3600));
583-
Credential c = new Credential("org2.restcomm.com", "bob", clientPassword);
583+
Credential c = new Credential("org3.restcomm.com", "bob", clientPassword);
584584
bobPhoneOrg3.addUpdateCredential(c);
585585

586586
final SipCall bobCallOrg3 = bobPhoneOrg3.createSipCall();
@@ -787,8 +787,7 @@ public void testClientsCallEachOtherDifferentOrganization() throws ParseExceptio
787787
SipURI uri = mariaSipStackOrg2.getAddressFactory().createSipURI(null, "127.0.0.1:5080");
788788
assertTrue(mariaPhoneOrg2.register(uri, "maria", clientPassword, "sip:maria@127.0.0.1:5093", 3600, 3600));
789789
assertTrue(alicePhoneOrg3.register(uri, "alice", "1234", "sip:alice@127.0.0.1:5095", 3600, 3600));
790-
//following realm is a cheat/hack to get through authorization and test organization related p2p logic.
791-
Credential c = new Credential("org3.restcomm.com", "maria", clientPassword);
790+
Credential c = new Credential("org2.restcomm.com", "maria", clientPassword);
792791
mariaPhoneOrg2.addUpdateCredential(c);
793792

794793
final SipCall aliceCallOrg3 = alicePhoneOrg3.createSipCall();

0 commit comments

Comments
 (0)