-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bbef17c
commit 09b166d
Showing
19 changed files
with
654 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...restcomm.extension.api/src/main/java/org/restcomm/connect/extension/api/CallResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.restcomm.connect.extension.api; | ||
|
||
import java.util.Map; | ||
|
||
public class CallResponse extends ExtensionResponse{ | ||
//expose all expected properties | ||
// "outbound-proxy": [ | ||
// { | ||
// "outbound-proxy": "outbound.proxy.com:5060", | ||
// "username": "myusername", | ||
// "password": "mypassword", | ||
// "additional-headers": [ | ||
// { | ||
// "header-name": "Route", | ||
// "header-value": "sip:10.10.10.10:5080;transport=UDP;lr" | ||
// }, | ||
// { | ||
// "header-name": "X-Custom-Header1", | ||
// "header-value": "ID-X-12345" | ||
// } | ||
// ] | ||
// } | ||
// ], | ||
// username:{ | ||
// }, | ||
// password:{ | ||
// }, | ||
// proxy:{ | ||
// //proxy info here | ||
// }, | ||
|
||
Map<String,String> additionalHeaders; | ||
String outboundProxy; | ||
String outboundProxyUsername; | ||
String outboundProxyPassword; | ||
} |
73 changes: 46 additions & 27 deletions
73
...comm.extension.api/src/main/java/org/restcomm/connect/extension/api/ExtensionRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,46 @@ | ||
package org.restcomm.connect.extension.api; | ||
import org.apache.commons.configuration.Configuration; | ||
|
||
public class ExtensionRequest { | ||
private Object payload; | ||
private Configuration configuration; | ||
|
||
public ExtensionRequest() {} | ||
|
||
public Object getObject() { | ||
return payload; | ||
} | ||
|
||
public void setObject(Object object) { | ||
this.payload = object; | ||
} | ||
|
||
public void setConfiguration(Configuration configuration) { | ||
// TODO Auto-generated method stub | ||
this.configuration = configuration; | ||
} | ||
public Configuration getConfiguration() { | ||
// TODO Auto-generated method stub | ||
return this.configuration; | ||
} | ||
|
||
} | ||
/* | ||
* TeleStax, Open Source Cloud Communications | ||
* Copyright 2011-2013, Telestax Inc and individual contributors | ||
* by the @authors tag. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
package org.restcomm.connect.extension.api; | ||
import org.apache.commons.configuration.Configuration; | ||
|
||
public class ExtensionRequest { | ||
private Object payload; | ||
private Configuration configuration; | ||
|
||
public ExtensionRequest() {} | ||
|
||
public Object getObject() { | ||
return payload; | ||
} | ||
|
||
public void setObject(Object object) { | ||
this.payload = object; | ||
} | ||
|
||
public void setConfiguration(Configuration configuration) { | ||
this.configuration = configuration; | ||
} | ||
|
||
public Configuration getConfiguration() { | ||
return this.configuration; | ||
} | ||
|
||
} |
30 changes: 27 additions & 3 deletions
30
...ension.api/src/main/java/org/restcomm/connect/extension/api/MessageExtensionResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
package org.restcomm.connect.extension.api; | ||
public class MessageExtensionResponse extends ExtensionResponse { | ||
} | ||
/* | ||
* TeleStax, Open Source Cloud Communications | ||
* Copyright 2011-2013, Telestax Inc and individual contributors | ||
* by the @authors tag. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
/** | ||
* When an Extension returns a MessageReponse, RC will reconfigure the message it will send | ||
*/ | ||
package org.restcomm.connect.extension.api; | ||
public class MessageExtensionResponse extends ExtensionResponse { | ||
//TODO: needs discussion, definition | ||
} |
30 changes: 27 additions & 3 deletions
30
...extension.api/src/main/java/org/restcomm/connect/extension/api/NodeExtensionResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
package org.restcomm.connect.extension.api; | ||
public class NodeExtensionResponse extends ExtensionResponse { | ||
} | ||
/* | ||
* TeleStax, Open Source Cloud Communications | ||
* Copyright 2011-2013, Telestax Inc and individual contributors | ||
* by the @authors tag. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
/** | ||
* When an Extension returns a NodeReponse, RC will reconfigure the specific RC node it is in | ||
*/ | ||
package org.restcomm.connect.extension.api; | ||
public class NodeExtensionResponse extends ExtensionResponse { | ||
//TODO: needs discussion, definition | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 44 additions & 11 deletions
55
...ension.api/src/main/java/org/restcomm/connect/extension/api/SessionExtensionResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,44 @@ | ||
package org.restcomm.connect.extension.api; | ||
import org.apache.commons.configuration.Configuration; | ||
public class SessionExtensionResponse extends ExtensionResponse { | ||
|
||
public void setConfiguration(Configuration configuration){ | ||
super.setObject(configuration); | ||
} | ||
public Configuration getConfiguration(){ | ||
return (Configuration) super.getObject(); | ||
} | ||
} | ||
/* | ||
* TeleStax, Open Source Cloud Communications | ||
* Copyright 2011-2013, Telestax Inc and individual contributors | ||
* by the @authors tag. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
/** | ||
* When an Extension returns a SessionReponse, RC will reconfigure the session it is in | ||
*/ | ||
package org.restcomm.connect.extension.api; | ||
import org.apache.commons.configuration.Configuration; | ||
public class SessionExtensionResponse extends ExtensionResponse { | ||
//TODO: needs discussion, definition | ||
/** | ||
* The Extension is expected to populate the session specific | ||
* Configuration | ||
*/ | ||
public void setConfiguration(Configuration configuration){ | ||
super.setObject(configuration); | ||
} | ||
|
||
/** | ||
* RC expects an Extension to populate Configuration when it returns | ||
* this SessionResponse | ||
* @return Configuration object | ||
*/ | ||
public Configuration getConfiguration(){ | ||
return (Configuration) super.getObject(); | ||
} | ||
} |
30 changes: 27 additions & 3 deletions
30
...tension.api/src/main/java/org/restcomm/connect/extension/api/SystemExtensionResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
package org.restcomm.connect.extension.api; | ||
public class SystemExtensionResponse extends ExtensionResponse { | ||
} | ||
/* | ||
* TeleStax, Open Source Cloud Communications | ||
* Copyright 2011-2013, Telestax Inc and individual contributors | ||
* by the @authors tag. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
/** | ||
* When an Extension returns a SystemReponse, RC will reconfigure itself systemwide | ||
*/ | ||
package org.restcomm.connect.extension.api; | ||
public class SystemExtensionResponse extends ExtensionResponse { | ||
//TODO: needs discussion, definition | ||
} |
Oops, something went wrong.