Marker for identifying call as follow-me loopback (#3977)
* Marker for identifying call as follow-me loopback We need a way of the dialplan identifying calls that are generated by follow-me using loopback. This setting couple with a dialplan statement allows us to identify and set proper caller-id-name/number. * Create 030_is_loopback.xml Are you a follow_me call that is using the loopback interface? Ok then, are you a user on the system? Yes, ok. Let's set your outbound_caller_id_name and outbound_caller_id_number so that you show up correctly. Thanks.
This commit is contained in:
parent
edb3300dff
commit
d8e1f249b6
|
|
@ -419,6 +419,7 @@ include "root.php";
|
|||
$variables[] = "originate_delay_start=".$row["follow_me_delay"];
|
||||
$variables[] = "sleep=".($row["follow_me_delay"] * 1000);
|
||||
$variables[] = "leg_timeout=".$row["follow_me_timeout"];
|
||||
$variables[] = "is_follow_me_loopback=true";
|
||||
|
||||
if (is_numeric($row["follow_me_destination"])) {
|
||||
if ($_SESSION['domain']['bridge']['text'] == "outbound" || $_SESSION['domain']['bridge']['text'] == "bridge") {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
<context name="${domain_name}">
|
||||
<extension name="is_loopback" number="" app_uuid="1dcf888f-c367-46b7-b809-f2de918c266c" global="true">
|
||||
<condition field="${is_follow_me_loopback}" expression="true">
|
||||
<action application="set" data="from_orig_user_exists=${user_exists id ${username} ${domain_name}}" inline="true"/>
|
||||
</condition>
|
||||
<condition field="${from_orig_user_exists}" expression="^true$">
|
||||
<action application="set" data="outbound_caller_id_number=${user_data ${username}@${domain} var outbound_caller_id_number}" inline="true"/>
|
||||
<action application="set" data="outbound_caller_id_name=${user_data ${username}@${domain} var outbound_caller_id_name}" inline="true"/>
|
||||
</condition>
|
||||
</extension>
|
||||
</context>
|
||||
Loading…
Reference in New Issue