Compare commits
2 Commits
e45f067021
...
e5acb2b435
| Author | SHA1 | Date | |
|---|---|---|---|
| e5acb2b435 | |||
| fc9ea660de |
@@ -1,18 +1,8 @@
|
||||
<include>
|
||||
<extension name="public_did">
|
||||
<condition field="destination_number" expression="^(5551212)$">
|
||||
<!--
|
||||
If you're hosting multiple domains you will want to set the
|
||||
target_domain on these calls so they hit the proper domain after you
|
||||
transfer the caller into the default context.
|
||||
|
||||
$${domain} is the default domain set from vars.xml but you can set it
|
||||
to any domain you have setup in your user directory.
|
||||
|
||||
-->
|
||||
<condition field="destination_number" expression="^1\d{10}$">
|
||||
<action application="set" data="domain_name=$${domain}"/>
|
||||
<!-- This example maps the DID 5551212 to ring 1000 in the default context -->
|
||||
<action application="transfer" data="1000 XML default"/>
|
||||
<action application="transfer" data="$${destination_number} XML default"/>
|
||||
</condition>
|
||||
</extension>
|
||||
</include>
|
||||
|
||||
@@ -27,8 +27,16 @@ pub fn moh(_did: Did) -> XMLElement {
|
||||
work
|
||||
}
|
||||
|
||||
pub fn external_number(_did: Did) -> XMLElement {
|
||||
let work = XMLElement::new("work");
|
||||
pub fn external_number(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/gateway/powernet_1/{}", target).as_str());
|
||||
|
||||
work.add_child(bridge).unwrap();
|
||||
|
||||
work
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user