4 api calls to make a full extension so that we can make a call
This commit is contained in:
parent
ab41e16bb2
commit
b1921bef4f
@ -13,7 +13,7 @@
|
|||||||
"header": [],
|
"header": [],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\n \"id\": \"1005\",\n \"transport\": \"transport-udp\",\n \"aors\": \"1005\",\n \"auth\": \"1005\",\n \"context\": \"default\",\n \"disallow\": \"all\",\n \"allow\": \"ulaw,alaw\",\n \"directMedia\": \"no\",\n \"connectedLineMethod\": \"invite\",\n \"callerid\": \"User <1005>\",\n \"dtmfMode\": \"rfc4733\",\n \"mohsuggest\": \"default\",\n \"mailboxes\": \"1005@default\"\n}\n\n// {\n// \"id\": \"1004\",\n// \"transport\": \"transport-udp\",\n// \"aors\": \"1004\",\n// \"auth\": \"1004\",\n// \"context\": \"default\",\n// \"disallow\": \"all\",\n// \"allow\": \"ulaw,alaw\",\n// \"directMedia\": \"no\",\n// \"connectedLineMethod\": null,\n// \"callerid\": \"User <1004>\",\n// \"dtmfMode\": null,\n// \"mohsuggest\": \"default\",\n// \"mailboxes\": \"1004@default\"\n// }",
|
"raw": "{\n \"id\": \"1005\",\n \"transport\": \"transport-udp\",\n \"aors\": \"1005\",\n \"auth\": \"1005\",\n \"context\": \"default\",\n \"disallow\": \"all\",\n \"allow\": \"ulaw,alaw\",\n \"directMedia\": \"no\",\n \"connectedLineMethod\": null,\n \"callerid\": null,\n \"dtmfMode\": null,\n \"mohsuggest\": \"default\",\n \"mailboxes\": null\n}\n\n// {\n// \"id\": \"1004\",\n// \"transport\": \"transport-udp\",\n// \"aors\": \"1004\",\n// \"auth\": \"1004\",\n// \"context\": \"default\",\n// \"disallow\": \"all\",\n// \"allow\": \"ulaw,alaw\",\n// \"directMedia\": \"no\",\n// \"connectedLineMethod\": null,\n// \"callerid\": \"User <1004>\",\n// \"dtmfMode\": null,\n// \"mohsuggest\": \"default\",\n// \"mailboxes\": \"1004@default\"\n// }",
|
||||||
"options": {
|
"options": {
|
||||||
"raw": {
|
"raw": {
|
||||||
"language": "json"
|
"language": "json"
|
||||||
@ -42,7 +42,7 @@
|
|||||||
"header": [],
|
"header": [],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\n \"context\": \"default\",\n \"extension\": \"1005\",\n \"priority\": 2,\n \"app\": \"Dial\",\n \"appdata\": \"PJSIP/1005,20,m(default)\"\n}\n",
|
"raw": "{\n \"context\": \"default\",\n \"extension\": \"1005\",\n \"priority\": 1,\n \"app\": \"Dial\",\n \"appdata\": \"PJSIP/1005,20,m(default)\"\n}\n",
|
||||||
"options": {
|
"options": {
|
||||||
"raw": {
|
"raw": {
|
||||||
"language": "json"
|
"language": "json"
|
||||||
@ -92,6 +92,35 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"response": []
|
"response": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "New Request",
|
||||||
|
"request": {
|
||||||
|
"method": "POST",
|
||||||
|
"header": [],
|
||||||
|
"body": {
|
||||||
|
"mode": "raw",
|
||||||
|
"raw": "{\n \"id\": \"1005\",\n \"maxContacts\": 1\n}",
|
||||||
|
"options": {
|
||||||
|
"raw": {
|
||||||
|
"language": "json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"raw": "http://localhost:8081/cezen/set_aors",
|
||||||
|
"protocol": "http",
|
||||||
|
"host": [
|
||||||
|
"localhost"
|
||||||
|
],
|
||||||
|
"port": "8081",
|
||||||
|
"path": [
|
||||||
|
"cezen",
|
||||||
|
"set_aors"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"response": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -27,6 +27,7 @@ DELETE FROM `extensions_table` WHERE priority = 4 and exten = "1005" ;
|
|||||||
DELETE FROM `extensions_table` WHERE exten = "1005" OR exten = "1004";
|
DELETE FROM `extensions_table` WHERE exten = "1005" OR exten = "1004";
|
||||||
|
|
||||||
DELETE FROM `ps_endpoints` WHERE id = "1004" OR id = "1005";
|
DELETE FROM `ps_endpoints` WHERE id = "1004" OR id = "1005";
|
||||||
|
DELETE FROM `extensions_table` WHERE exten = "1004" OR exten = "1005";
|
||||||
|
|
||||||
|
|
||||||
SELECT * FROM `extensions_table` WHERE app = "Dial";
|
SELECT * FROM `extensions_table` WHERE app = "Dial";
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -113,16 +113,13 @@
|
|||||||
2,18
|
2,18
|
||||||
1,18
|
1,18
|
||||||
3,17
|
3,17
|
||||||
2,48
|
|
||||||
2,17
|
2,17
|
||||||
1,17
|
1,17
|
||||||
3,16
|
3,16
|
||||||
2,16
|
2,16
|
||||||
1,49
|
|
||||||
1,16
|
1,16
|
||||||
3,45
|
3,45
|
||||||
3,15
|
3,15
|
||||||
2,47
|
|
||||||
2,15
|
2,15
|
||||||
1,48
|
1,48
|
||||||
1,15
|
1,15
|
||||||
@ -137,9 +134,7 @@
|
|||||||
2,12
|
2,12
|
||||||
1,12
|
1,12
|
||||||
3,11
|
3,11
|
||||||
2,45
|
|
||||||
2,11
|
2,11
|
||||||
1,47
|
|
||||||
1,11
|
1,11
|
||||||
3,10
|
3,10
|
||||||
2,10
|
2,10
|
||||||
@ -154,6 +149,7 @@
|
|||||||
3,7
|
3,7
|
||||||
2,7
|
2,7
|
||||||
1,7
|
1,7
|
||||||
|
3,46
|
||||||
3,6
|
3,6
|
||||||
2,6
|
2,6
|
||||||
1,6
|
1,6
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1744092445.4.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1744092445.4.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1744099477.6.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1744099477.6.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1744104023.9.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1744104023.9.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1744092280.0.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1744092280.0.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1744097713.8.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1744097713.8.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1744099037.0.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1744099037.0.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1744099426.3.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1744099426.3.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1744105361.16.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1744105361.16.wav
Normal file
Binary file not shown.
@ -1,9 +1,7 @@
|
|||||||
package com.example.cezenPBX.DAO;
|
package com.example.cezenPBX.DAO;
|
||||||
|
|
||||||
import com.example.cezenPBX.DTO.ReturnStatus;
|
import com.example.cezenPBX.DTO.ReturnStatus;
|
||||||
import com.example.cezenPBX.entity.ExtensionsTable;
|
import com.example.cezenPBX.entity.*;
|
||||||
import com.example.cezenPBX.entity.PsAuths;
|
|
||||||
import com.example.cezenPBX.entity.PsEndPoints;
|
|
||||||
import jakarta.persistence.EntityManager;
|
import jakarta.persistence.EntityManager;
|
||||||
import jakarta.transaction.Transactional;
|
import jakarta.transaction.Transactional;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -17,8 +15,7 @@ public class BasicAsteriskOpsDAO implements CezenPbxOpsDAO {
|
|||||||
private EntityManager entityManager;
|
private EntityManager entityManager;
|
||||||
|
|
||||||
// find end point details by id
|
// find end point details by id
|
||||||
@Override
|
private PsEndPoints findEndPontById(String id) {
|
||||||
public PsEndPoints findEndPontById(String id) {
|
|
||||||
|
|
||||||
return this.entityManager.find(PsEndPoints.class, id);
|
return this.entityManager.find(PsEndPoints.class, id);
|
||||||
}
|
}
|
||||||
@ -38,19 +35,13 @@ public class BasicAsteriskOpsDAO implements CezenPbxOpsDAO {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Save an extension
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public ReturnStatus saveAnExtension(ExtensionsTable extensionsTable) {
|
public ReturnStatus saveAnExtension(ExtensionsTable extensionsTable) {
|
||||||
// check if endpoint exists
|
|
||||||
try{
|
|
||||||
System.out.println("End point ID is " + findEndPontById(extensionsTable.getExtension()).getId());
|
|
||||||
}catch (Exception e){
|
|
||||||
return new ReturnStatus(false, "Create Endpoint for " + extensionsTable.getExtension(),e.toString() + " First");
|
|
||||||
}
|
|
||||||
|
|
||||||
this.entityManager.persist(extensionsTable);
|
|
||||||
return new ReturnStatus(true, extensionsTable.getExtension() + " Persisted ", "");
|
|
||||||
|
|
||||||
|
//save only if endpoint exists
|
||||||
|
return persistOnlyIfEndpointExists(extensionsTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
// the method persists
|
// the method persists
|
||||||
@ -58,16 +49,29 @@ public class BasicAsteriskOpsDAO implements CezenPbxOpsDAO {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public ReturnStatus setThePasswordForSipEndpoint(PsAuths psAuths) {
|
public ReturnStatus setThePasswordForSipEndpoint(PsAuths psAuths) {
|
||||||
|
|
||||||
//check if endpoint exists
|
//save only if endpoint exists
|
||||||
try{
|
return persistOnlyIfEndpointExists(psAuths);
|
||||||
System.out.println("End point ID is " + findEndPontById(psAuths.getId()));
|
|
||||||
}catch (Exception e){
|
|
||||||
return new ReturnStatus(false, "Create Endpoint for " + findEndPontById(psAuths.getId()),e.toString() + " First");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.entityManager.persist(psAuths);
|
@Override
|
||||||
return new ReturnStatus(true, psAuths.getId() + " Persisted ", "");
|
@Transactional
|
||||||
|
public ReturnStatus setTheAorsForTheEndPoint(PsAors psAors) {
|
||||||
|
|
||||||
|
//save only if endpoint exists
|
||||||
|
return persistOnlyIfEndpointExists(psAors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ReturnStatus persistOnlyIfEndpointExists(PBXentiry pbXentiry){
|
||||||
|
|
||||||
|
String endpoint = pbXentiry.getExtension();
|
||||||
|
|
||||||
|
// check if the endpoint exists
|
||||||
|
if(findEndPontById(endpoint) == null){
|
||||||
|
return new ReturnStatus(false, "Create Endpoint for " + endpoint, " ");
|
||||||
|
}
|
||||||
|
// then persist
|
||||||
|
this.entityManager.persist(pbXentiry);
|
||||||
|
return new ReturnStatus(true, endpoint + " Persisted ", "");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,16 +2,17 @@ package com.example.cezenPBX.DAO;
|
|||||||
|
|
||||||
import com.example.cezenPBX.DTO.ReturnStatus;
|
import com.example.cezenPBX.DTO.ReturnStatus;
|
||||||
import com.example.cezenPBX.entity.ExtensionsTable;
|
import com.example.cezenPBX.entity.ExtensionsTable;
|
||||||
|
import com.example.cezenPBX.entity.PsAors;
|
||||||
import com.example.cezenPBX.entity.PsAuths;
|
import com.example.cezenPBX.entity.PsAuths;
|
||||||
import com.example.cezenPBX.entity.PsEndPoints;
|
import com.example.cezenPBX.entity.PsEndPoints;
|
||||||
|
|
||||||
public interface CezenPbxOpsDAO {
|
public interface CezenPbxOpsDAO {
|
||||||
|
|
||||||
PsEndPoints findEndPontById(String id);
|
|
||||||
|
|
||||||
boolean addNewEndPoint(PsEndPoints psEndPoints);
|
boolean addNewEndPoint(PsEndPoints psEndPoints);
|
||||||
|
|
||||||
ReturnStatus saveAnExtension(ExtensionsTable extensionsTable);
|
ReturnStatus saveAnExtension(ExtensionsTable extensionsTable);
|
||||||
|
|
||||||
ReturnStatus setThePasswordForSipEndpoint(PsAuths psAuths);
|
ReturnStatus setThePasswordForSipEndpoint(PsAuths psAuths);
|
||||||
|
|
||||||
|
ReturnStatus setTheAorsForTheEndPoint(PsAors psAors);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,4 @@
|
|||||||
|
package com.example.cezenPBX.DTO;
|
||||||
|
|
||||||
|
public record PsAorsDTO(String id, int maxContacts) {
|
||||||
|
}
|
||||||
@ -1,8 +1,5 @@
|
|||||||
package com.example.cezenPBX.controller;
|
package com.example.cezenPBX.controller;
|
||||||
import com.example.cezenPBX.DTO.ExtensionsDTO;
|
import com.example.cezenPBX.DTO.*;
|
||||||
import com.example.cezenPBX.DTO.PsEndPointsDTO;
|
|
||||||
import com.example.cezenPBX.DTO.ReturnStatus;
|
|
||||||
import com.example.cezenPBX.DTO.SipPasswordDTO;
|
|
||||||
import com.example.cezenPBX.service.BasicPbxServiceInterface;
|
import com.example.cezenPBX.service.BasicPbxServiceInterface;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@ -68,4 +65,13 @@ public class CezenPbxController {
|
|||||||
sipPasswordDTO.realm()
|
sipPasswordDTO.realm()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/set_aors")
|
||||||
|
public ReturnStatus setAorsForSipEndpoint(@RequestBody PsAorsDTO psAorsDTO){
|
||||||
|
|
||||||
|
return this.basicPbxServiceInterface.setAors(
|
||||||
|
psAorsDTO.id(),
|
||||||
|
psAorsDTO.maxContacts()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import jdk.jfr.Name;
|
|||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "extensions_table")
|
@Table(name = "extensions_table")
|
||||||
public class ExtensionsTable {
|
public class ExtensionsTable implements PBXentiry{
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
package com.example.cezenPBX.entity;
|
||||||
|
|
||||||
|
public interface PBXentiry {
|
||||||
|
|
||||||
|
public String getExtension();
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package com.example.cezenPBX.entity;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "ps_aors")
|
||||||
|
@Entity
|
||||||
|
public class PsAors implements PBXentiry{
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "id")
|
||||||
|
private String extension;
|
||||||
|
|
||||||
|
@Column(name = "max_contacts")
|
||||||
|
private int maxContacts;
|
||||||
|
|
||||||
|
public PsAors(String extension, int maxContacts) {
|
||||||
|
this.extension = extension;
|
||||||
|
this.maxContacts = maxContacts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PsAors() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExtension() {
|
||||||
|
return extension;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExtension(String extension) {
|
||||||
|
this.extension = extension;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxContacts() {
|
||||||
|
return maxContacts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxContacts(int maxContacts) {
|
||||||
|
this.maxContacts = maxContacts;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7,11 +7,11 @@ import jakarta.persistence.Table;
|
|||||||
|
|
||||||
@Table(name = "ps_auths")
|
@Table(name = "ps_auths")
|
||||||
@Entity
|
@Entity
|
||||||
public class PsAuths {
|
public class PsAuths implements PBXentiry{
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "id")
|
@Column(name = "id")
|
||||||
private String id;
|
private String extension;
|
||||||
|
|
||||||
@Column(name = "auth_type")
|
@Column(name = "auth_type")
|
||||||
private String authType;
|
private String authType;
|
||||||
@ -29,8 +29,8 @@ public class PsAuths {
|
|||||||
private String realm;
|
private String realm;
|
||||||
|
|
||||||
|
|
||||||
public PsAuths(String id, String authType, String userName, String password, String md5Cred, String realm) {
|
public PsAuths(String extension, String authType, String userName, String password, String md5Cred, String realm) {
|
||||||
this.id = id;
|
this.extension = extension;
|
||||||
this.authType = authType;
|
this.authType = authType;
|
||||||
this.userName = userName;
|
this.userName = userName;
|
||||||
this.password = password;
|
this.password = password;
|
||||||
@ -38,12 +38,12 @@ public class PsAuths {
|
|||||||
this.realm = realm;
|
this.realm = realm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getExtension() {
|
||||||
return id;
|
return extension;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(String id) {
|
public void setExtension(String extension) {
|
||||||
this.id = id;
|
this.extension = extension;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAuthType() {
|
public String getAuthType() {
|
||||||
|
|||||||
@ -7,11 +7,11 @@ import jakarta.persistence.Table;
|
|||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "ps_endpoints")
|
@Table(name = "ps_endpoints")
|
||||||
public class PsEndPoints {
|
public class PsEndPoints implements PBXentiry{
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "id")
|
@Column(name = "id")
|
||||||
private String id;
|
private String extension;
|
||||||
|
|
||||||
@Column(name = "transport")
|
@Column(name = "transport")
|
||||||
private String transport;
|
private String transport;
|
||||||
@ -49,10 +49,10 @@ public class PsEndPoints {
|
|||||||
@Column(name = "mailboxes")
|
@Column(name = "mailboxes")
|
||||||
private String mailboxes;
|
private String mailboxes;
|
||||||
|
|
||||||
public PsEndPoints(String id, String transport, String aors, String auth, String context,
|
public PsEndPoints(String extension, String transport, String aors, String auth, String context,
|
||||||
String disallow, String allow, String directMedia, String connectedLineMethod,
|
String disallow, String allow, String directMedia, String connectedLineMethod,
|
||||||
String callerid, String dtmfMode, String mohsuggest, String mailboxes) {
|
String callerid, String dtmfMode, String mohsuggest, String mailboxes) {
|
||||||
this.id = id;
|
this.extension = extension;
|
||||||
this.transport = transport;
|
this.transport = transport;
|
||||||
this.aors = aors;
|
this.aors = aors;
|
||||||
this.auth = auth;
|
this.auth = auth;
|
||||||
@ -70,8 +70,8 @@ public class PsEndPoints {
|
|||||||
public PsEndPoints() {
|
public PsEndPoints() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getExtension() {
|
||||||
return id;
|
return extension;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTransport() {
|
public String getTransport() {
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.example.cezenPBX.service;
|
|||||||
import com.example.cezenPBX.DAO.CezenPbxOpsDAO;
|
import com.example.cezenPBX.DAO.CezenPbxOpsDAO;
|
||||||
import com.example.cezenPBX.DTO.ReturnStatus;
|
import com.example.cezenPBX.DTO.ReturnStatus;
|
||||||
import com.example.cezenPBX.entity.ExtensionsTable;
|
import com.example.cezenPBX.entity.ExtensionsTable;
|
||||||
|
import com.example.cezenPBX.entity.PsAors;
|
||||||
import com.example.cezenPBX.entity.PsAuths;
|
import com.example.cezenPBX.entity.PsAuths;
|
||||||
import com.example.cezenPBX.entity.PsEndPoints;
|
import com.example.cezenPBX.entity.PsEndPoints;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -81,4 +82,16 @@ public class BasicPbxService implements BasicPbxServiceInterface {
|
|||||||
return new ReturnStatus(false, "Endpoint and password already set ",e.getMessage());
|
return new ReturnStatus(false, "Endpoint and password already set ",e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReturnStatus setAors(String id, int maxContacts) {
|
||||||
|
|
||||||
|
PsAors psAors = new PsAors(id, maxContacts);
|
||||||
|
|
||||||
|
try{
|
||||||
|
return this.cezenPbxOpsDAO.setTheAorsForTheEndPoint(psAors);
|
||||||
|
}catch (Exception e){
|
||||||
|
return new ReturnStatus(false, "Endpoint and password already set ",e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,4 +14,6 @@ public interface BasicPbxServiceInterface {
|
|||||||
public ReturnStatus addExtensionForUser(String context, String extension, int priority, String app, String appdata);
|
public ReturnStatus addExtensionForUser(String context, String extension, int priority, String app, String appdata);
|
||||||
|
|
||||||
public ReturnStatus addAPasswordForEndpoint(String id, String authType, String userName, String password, String md5Cred, String realm);
|
public ReturnStatus addAPasswordForEndpoint(String id, String authType, String userName, String password, String md5Cred, String realm);
|
||||||
|
|
||||||
|
public ReturnStatus setAors(String id, int maxContacts);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,18 @@
|
|||||||
|
;
|
||||||
|
; Message Information file
|
||||||
|
;
|
||||||
|
[message]
|
||||||
|
origmailbox=1002
|
||||||
|
context=default
|
||||||
|
macrocontext=
|
||||||
|
exten=1002
|
||||||
|
rdnis=unknown
|
||||||
|
priority=30
|
||||||
|
callerchan=PJSIP/1003-00000002
|
||||||
|
callerid="mat@1003" <1003>
|
||||||
|
origdate=Tue Apr 8 06:07:42 AM UTC 2025
|
||||||
|
origtime=1744092462
|
||||||
|
category=
|
||||||
|
msg_id=1744092462-00000000
|
||||||
|
flag=
|
||||||
|
duration=0
|
||||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user