Multi server call pickup and remote extension updates
Hi all,
I have three Asterisk/Freepbx servers that I'm trying monitor with Fop2
I'm not using the automated scrips as there are only 14 users across the whole system but they are spread across the country (Australia)
My major issues is that call pickup from a queue for non agents does not work from remote sites
From a debug session it appears that fop2 is trying to pick up the right channel on the wrong server and therefore
failing. I've updated to the latest beta release since and now transfer to external / cell phone numbers is broken.
Also the remote server button status is either slow or fails to update extension status particularly ringing. Refreshing the browser helps but is not really a solution.
Can anyone shed any light on these issues please?
sample button config for extension
[SIP/207]
type=extension
extension=207
label=Test
mailbox=207@default
context=from-internal
queuecontext=from-internal
extenvoicemail=*207@default
external=042XXXXXXX
group=Sydney
server=0
extract from log
** MAIN AMI event received...
** MAIN Processing command received from flash clients...
192.168.11.81 <= <msg data="20|pickupActive|IAX2/ftel-12961|ce1a1a2f60d28fc4f81ed27601238cc3" />^M
-- PROCESS_FLASH_COMMAND origen 20 accion pickupActive destino IAX2/ftel-12961
-- PROCESS_FLASH_COMMAND password ce1a1a2f60d28fc4f81ed27601238cc3
VALIDAR USUARIO 305
VALIDAR USUARIO 305 OK con clave regular (192.168.11.81)
Validation ok, have all permissions
It's blessed into class Extension
PICKUP origin SIP/305 is defined!!!
192.168.11.2 -> Action: Redirect
192.168.11.2 -> Channel: IAX2/ftel-12961
192.168.11.2 -> Exten: 305
192.168.11.2 -> Context: from-internal
192.168.11.2 -> Priority: 1
192.168.11.2 -> Async: True
** MAIN AMI event received...
** MAIN Processing command received from flash clients...
192.168.11.83 <= <msg data="1|ping||" />^M
-- PROCESS_FLASH_COMMAND origen 1 accion ping destino
-- PROCESS_FLASH_COMMAND password
Cannot send command to (unauthenticated or connection failed)
192.168.11.83 => { 'btn': '0', 'cmd': 'pong', 'data': '0', 'slot': '' }
** MAIN End of block from 192.168.11.2
192.168.11.2 <- Response: Error
192.168.11.2 <- Message: Channel does not exist: IAX2/ftel-12961
192.168.11.2 <- Server: 1
** MAIN AMI event received...
** MAIN No 'Event' nor 'End'. Erasing block...
I have three Asterisk/Freepbx servers that I'm trying monitor with Fop2
I'm not using the automated scrips as there are only 14 users across the whole system but they are spread across the country (Australia)
My major issues is that call pickup from a queue for non agents does not work from remote sites
From a debug session it appears that fop2 is trying to pick up the right channel on the wrong server and therefore
failing. I've updated to the latest beta release since and now transfer to external / cell phone numbers is broken.
Also the remote server button status is either slow or fails to update extension status particularly ringing. Refreshing the browser helps but is not really a solution.
Can anyone shed any light on these issues please?
sample button config for extension
[SIP/207]
type=extension
extension=207
label=Test
mailbox=207@default
context=from-internal
queuecontext=from-internal
extenvoicemail=*207@default
external=042XXXXXXX
group=Sydney
server=0
extract from log
** MAIN AMI event received...
** MAIN Processing command received from flash clients...
192.168.11.81 <= <msg data="20|pickupActive|IAX2/ftel-12961|ce1a1a2f60d28fc4f81ed27601238cc3" />^M
-- PROCESS_FLASH_COMMAND origen 20 accion pickupActive destino IAX2/ftel-12961
-- PROCESS_FLASH_COMMAND password ce1a1a2f60d28fc4f81ed27601238cc3
VALIDAR USUARIO 305
VALIDAR USUARIO 305 OK con clave regular (192.168.11.81)
Validation ok, have all permissions
It's blessed into class Extension
PICKUP origin SIP/305 is defined!!!
192.168.11.2 -> Action: Redirect
192.168.11.2 -> Channel: IAX2/ftel-12961
192.168.11.2 -> Exten: 305
192.168.11.2 -> Context: from-internal
192.168.11.2 -> Priority: 1
192.168.11.2 -> Async: True
** MAIN AMI event received...
** MAIN Processing command received from flash clients...
192.168.11.83 <= <msg data="1|ping||" />^M
-- PROCESS_FLASH_COMMAND origen 1 accion ping destino
-- PROCESS_FLASH_COMMAND password
Cannot send command to (unauthenticated or connection failed)
192.168.11.83 => { 'btn': '0', 'cmd': 'pong', 'data': '0', 'slot': '' }
** MAIN End of block from 192.168.11.2
192.168.11.2 <- Response: Error
192.168.11.2 <- Message: Channel does not exist: IAX2/ftel-12961
192.168.11.2 <- Server: 1
** MAIN AMI event received...
** MAIN No 'Event' nor 'End'. Erasing block...
Comments
2.21 beta fixes the remote server pickup issue. About the failure to update status from remote servers, the most probable cause is that AMI is being disconnected due to a slow/lagged link. You can try to increase the writetimeout for the manager user in your manager.conf file in the remote servers, or play with event filters to reduce the traffic.
check the announcement forum for download links for the 2.21 beta if you want to try the remote server pickup.
Best regards,
I have installed the 2.21 beta and now the transfer to Mobile button that use to work results in the call being disconnected.
I'll stick with 2.21 since the feature I most need is in that version.
I was wondering if I needed to set
originatechannel and or queuecontext for things to work properly particulary with the extensions on remote servers?
I'm using Freepbx 2.8.1.4
Now to implement the suggestions and I'll post the results.
Thanks again
Kevin
the configuration. I'm just using a buttonfile and have the users defined in fop2.cfg.
I have the external numbers defined as external=xxxxxxx in each button definition the xxxxx being the users mobile number
once dialed each server routes the specific mobile number to a gsm gateway.
I'll set up the Originate channel and advise what happens.
Cheers
Kevin
external=xxxxxxx@context-for-your-gsm-gateway
** MAIN AMI event received...
** MAIN Processing command received from flash clients...
192.168.4.95 <= <msg data="23|pickupActive|SIP/topex-00000591|b0b6066b7798a2f1451e63e5d6beb4fd" />^M
-- PROCESS_FLASH_COMMAND origen 23 accion pickupActive destino SIP/topex-00000591 password b0b6066b7798a2f1451e63e5d6beb4fd
VALIDAR USUARIO 803
VALIDAR USUARIO 803 OK con clave regular (192.168.4.95)
Validation ok, have all permissions for all buttons (0) 23
It's blessed into class Extension
PICKUP origin SIP/803 is defined!!!
192.168.4.2 -> Action: Redirect
192.168.4.2 -> Channel: SIP/topex-00000591
192.168.4.2 -> Exten: 803
192.168.4.2 -> Context: from-internal
192.168.4.2 -> Priority: 1
192.168.4.2 -> Async: True
** MAIN End of block from 192.168.4.2
192.168.4.2 <- Response: Error
192.168.4.2 <- Message: Channel does not exist: SIP/topex-00000591
192.168.4.2 <- Server: 2
** MAIN AMI event received...
** MAIN No 'Event' nor 'End'. Erasing block...
** MAIN End of block from localhost
192.168.4.100 <= <msg data="22|xferxternal|15|b35a0f663b73caaa4bd1061d80f3d7f5" />^M
-- PROCESS_FLASH_COMMAND origen 22 accion xferxternal destino 15 password b35a0f663b73caaa4bd1061d80f3d7f5
VALIDAR USUARIO 800
VALIDAR USUARIO 800 OK con clave regular (192.168.4.100)
Validation ok, have all permissions for all buttons (0) 15
ATXFER a extension destino is (SIP/801-00000334) standard Redirect
192.168.4.2 -> Action: Redirect
192.168.4.2 -> Channel: SIP/801-00000334
192.168.4.2 -> Exten:
192.168.4.2 -> Context: from-internal
192.168.4.2 -> Priority: 1
192.168.4.2 -> Async: True
** MAIN End of block from 192.168.4.2
192.168.4.2 <- Response: Success
192.168.4.2 <- Message: Redirect successful
192.168.4.2 <- Server: 2
** MAIN AMI event received...
** MAIN No 'Event' nor 'End'. Erasing block...
** MAIN End of block from 192.168.4.2
192.168.4.2 <- Event: Unlink
192.168.4.2 <- Privilege: call,all
192.168.4.2 <- Channel1: SIP/801-00000334
192.168.4.2 <- Channel2: SIP/800-00000335
192.168.4.2 <- Uniqueid1: 1310078199.1829
192.168.4.2 <- Uniqueid2: 1310078199.1830
192.168.4.2 <- CallerID1: 801
192.168.4.2 <- CallerID2: 800
192.168.4.2 <- Server: 2
** MAIN AMI event received...
** MAIN There's an 'Event' in the event block
** MAIN Event detected block_count = 1 (Event: Unlink)
Sample of current button config
[SIP/207]
type=extension
extension=207
label=Test
mailbox=207@default
context=from-internal
queuecontext=from-internal
extenvoicemail=*207@default
external=0425700227@from-internal
originatechannel=Local/207@from-internal
group=Sydney
server=0
Please advise if there is any more information that would be useful?
I'm going to go back to 2.20 to see if transfer to mobiles works again.
Cheers
Kevin
As long as the server numbering starts at 0 I am see sample extract from configs
There is a vpn connection between all three servers thus the local addressing
[SIP/207]
type=extension
extension=207
label=Test
mailbox=207@default
context=from-internal
queuecontext=from-internal
extenvoicemail=*207@default
external=0425700227@from-internal
originatechannel=Local/207@from-internal
group=Sydney
server=0
;Melbourne Extensions
[SIP/300]
type=extension
extension=300
label=Jeff
mailbox=300@default
context=from-internal
queuecontext=from-internal
extenvoicemail=*300@default
external=040333xxxx@from-internal
originatechannel=Local/300@from-internal
group=Melbourne
server=1
[SIP/301]
type=extension
extension=301
label=Chris
mailbox=301@default
context=from-internal
queuecontext=from-internal
extenvoicemail=*301@default
external=043150xxxx@from-internal
originatechannel=Local/301@from-internal
group=Melbourne
server=1
[general]
; AMI definitions
;Local server Sydney
manager_host=localhost
manager_port=5038
manager_user=admin
manager_secret=amp111
;event_mask=agent,call,command,system,user,dialplan
; Melbourne Server
manager_host = 192.168.11.2
manager_port = 5038
manager_user = admin
manager_secret = amp111
;event_mask=agent,call,command,system,user,dialplan
; Adelaide Server
manager_host = 192.168.4.2
manager_port = 5038
manager_user = admin
manager_secret = amp111
;event_mask=agent,call,command,system,user,dialplan
At the moment I've gone back to 2.20 and transfer to external numbers works again.
I've been trying to pickup calls directly from a queue as the queue status updates much faster than the remote extensions
in fact some never show ringing as the call is answered before the update occurs.
Indeed the remote site that really needs the call pickup normally would not have any phones in the queue to ring thus
no ringing phone to pick up.
I will change this for the purpose of the test though.
Cheers
Kevin