xyj70 / fusionpbx

Automatically exported from code.google.com/p/fusionpbx
0 stars 0 forks source link

Follow-Me via app/calls/v_call_edit has some issues #283

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a new follow me for an extension with 1st number: extension number, 2nd 
number, something else, with 1st number 20s, 2nd number 30s

What is the expected output? What do you see instead?

I'd expect it to maintain the order of numbers, at least when using sequential 
routing, but it doesn't.

What version of the product are you using? On what operating system?

SVN 2703

Please provide any additional information below.

Patch for this behavior:

Index: v_call_edit.php
===================================================================
--- v_call_edit.php (revision 2703)
+++ v_call_edit.php (working copy)
@@ -439,6 +439,7 @@
        if ($row["hunt_group_type"] == 'call_forward' || $row["hunt_group_type"] == 'follow_me_sequence' || $row["hunt_group_type"] == 'follow_me_simultaneous') {
            $sql = "select * from v_hunt_group_destinations ";
            $sql .= "where hunt_group_uuid = '$hunt_group_uuid' ";
+           $sql .= "order by destination_order ";
            $prep_statement_2 = $db->prepare(check_sql($sql));
            $prep_statement_2->execute();
            $result2 = $prep_statement_2->fetchAll(PDO::FETCH_NAMED);
@@ -748,4 +749,4 @@
    echo "</div>";

 require_once "includes/footer.php";
-?>
\ No newline at end of file
+?>

An other problem is, that this app doesn't consider ring-Groups and such as 
local extensions:

I created a ring-group with extension 9000, but since extension_exists() 
doesn't consider non-extension local numbers:

if (extension_exists($destination_data_2)) {
 $destination_type_2 = 'extension';
}
else {
  $destination_type_2 = 'sip uri';
}

fails on me and creates a DB entry of type sip uri.

Since 9000 isn't a valid sip uri (and sofia/internal/9000@${domain} doesn't 
survive the post processing of this app), it writes defect hunt_group_lua 
scripts like this:

[...]
if session:ready() then
    session:execute("bridge", "[leg_timeout=20]user/10@"..domain_name);
    session:execute("bridge", "[leg_timeout=30,origination_caller_id_name="..caller_id_name..",origination_caller_id_number="..caller_id_number.."]");

    --timeout
[...]

which cause freeswitch to misbehave badly.

Thanks for looking at his!

 Johannes

Original issue reported on code.google.com by j...@3js.de on 27 Jul 2012 at 12:35

GoogleCodeExporter commented 9 years ago
I fixed destination_order. 

Question on the second problem you reported. You are referring to a huntgroup 
to sending a call to a ring group 9000?

Original comment by markjcrane@gmail.com on 31 Jul 2012 at 4:58

GoogleCodeExporter commented 9 years ago
Hi Mark,
Sorry for my confusing english.

You are correct, I want to add a hunt group for lots of users to forward 
unanswered calls to ring groups.

Since I'm dealing with ~50 extensions that should be redirected to three ring 
groups after being unanswered for 20 seconds, I thought the most effective way 
would be via the extensions' follow-me settings because

1) It's a lot quicker to click on follow-me and add those two numbers (the 
extension itself and the local ring-group number)
2) The extension's owner, if provided with user credentials, could change this 
setting at will
3) This wouldn't interfere with future follow-me settings, which would be the 
case with official "huntgroups" via apps->hunt groups

But since the follow-me tool (v_call_edit) only differentiates between real 
"extensions" and "sip uri" as a destination type _and_ it doesn't accept 
entered real sip uris like "sofia/internal/9002@${domain}" (if entered, saved 
and reopened the edit form, this gets changed to 9002, which as a result and 
with type "sip uri" will write those defect follow-me huntgroup lua scripts 
without a second destination at all).

I hope I've been a bit more understandable this time? ;-)

Thanks for fixing the order of destinations!

Best Regards,

  Johannes

Original comment by j...@3js.de on 31 Jul 2012 at 10:20

GoogleCodeExporter commented 9 years ago
Hi Mark,

any news, insights or tips on this one?

Thanks and regards,

 Johannes

Original comment by j...@3js.de on 10 Aug 2012 at 8:38

GoogleCodeExporter commented 9 years ago
oh well... it looks like even though I was able to add sip uri: 
sofia/internal/9002@${domain} to hunt_group config, it doesn't work at all.

So what I really seem to need, would be the option to add "transfer 9002 XML 
${domain_name}" as a destination for follow-me.

I'm really running out of time here. Is there any quick way to get this kind of 
scenario working in a manageable way?

Thanks and Regards, Johannes

Original comment by j...@3js.de on 17 Aug 2012 at 12:43

GoogleCodeExporter commented 9 years ago
"transfer 9002 XML ${domain_name}" not possible in this way within a bridge 
statement.
Take a look at loopback it makes call detail records look a bit messy but it 
can send the call through the dialplan like a transfer.
http://wiki.freeswitch.org/wiki/Loopback

A simple example
loopback/9002

Original comment by markjcrane@gmail.com on 18 Aug 2012 at 1:35

GoogleCodeExporter commented 9 years ago
Follow Me no longer uses hunt groups it is now done with the dial string from 
version FusionPBX 3.2 and higher and improved a bit more in the upcoming 3.3 
release that will be available soon.

Original comment by markjcrane@gmail.com on 24 Apr 2013 at 6:08