Forward the call to FreePBX successfully
This commit is contained in:
@@ -49,12 +49,11 @@
|
||||
<permission name="extended-data" value="false"/>
|
||||
<permission name="execute-apps" value="true">
|
||||
<!-- default to "deny" or "allow" -->
|
||||
<application-list default="allow">
|
||||
<application-list default="deny">
|
||||
<!-- type attr can be "deny" or "allow" nothing defaults to opposite of the list default so allow in this case -->
|
||||
<!--
|
||||
<application name="info"/>
|
||||
<application name="hangup"/>
|
||||
-->
|
||||
<application name="bridge"/>
|
||||
</application-list>
|
||||
</permission>
|
||||
<permission name="expand-vars-in-tag-body" value="false">
|
||||
|
||||
@@ -2,8 +2,16 @@ use xml_builder::{XMLBuilder, XMLElement, XMLVersion};
|
||||
use super::database as db;
|
||||
use super::database::{DidTargetType, Did};
|
||||
|
||||
pub fn url(_did: Did) -> XMLElement {
|
||||
let work = XMLElement::new("work");
|
||||
pub fn url(did: Did) -> XMLElement {
|
||||
let mut work = XMLElement::new("work");
|
||||
let mut bridge = XMLElement::new("execute");
|
||||
let target = did.target.unwrap();
|
||||
|
||||
bridge.add_attribute("application", "bridge");
|
||||
bridge.add_attribute("data", format!("sofia/internal/{}", target).as_str());
|
||||
|
||||
work.add_child(bridge).unwrap();
|
||||
|
||||
work
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user