Bonjour Quintana,

Alors j'ai commencer à me creuser la tête :


Sur Xivo, j'ai bien passé les commandes suivantes :

apt-get install git
mkdir /usr/share/asterisk/agi-bin
cd /usr/share/asterisk/agi-bin
git config --global http.sslverify false
git clone https://github.com/sboily/xivo-sugarcrm.git
cd xivo-sugarcrm
cp sugarcrm.conf /etc/asterisk/extensions_extra.d
chown www-data.www-data /etc/asterisk/extensions_extra.d/sugarcrm.conf




J'ai ensuite editer les 2 fichiers (pour etre sur) de sugarcrm.conf, qui se trouve à " /usr/share/asterisk/agi-bin" et "/etc/asterisk/extensions_extra.d"

Je l'ai éditer de cette facon :

[sub-sugarcrm]
exten = s,1,NoOp("Get information from SUGARCRM")
same = n,Set(SUGARCRM_URL=http://37.187.41.114/service/v4_1/rest.php)
same = n,Set(SUGARCRM_USERNAME=admin)
same = n,Set(SUGARCRM_PASSWD=*****)
same = n,Agi(xivo-sugarcrm/for_xivo)
same = n,UserEvent(dialplan2cti,UNIQUEID: ${UNIQUEID},CHANNEL: ${CHANNEL},VARIABLE: sugarcrm-firstname,VALUE: ${SUGARCRM-FIRSTNAME})
same = n,UserEvent(dialplan2cti,UNIQUEID: ${UNIQUEID},CHANNEL: ${CHANNEL},VARIABLE: sugarcrm-lastname,VALUE: ${SUGARCRM-LASTNAME})
same = n,Return()




Jai ensuite taper :
asterisk -r
xivo*CLI> dialplan reload
xivo*CLI> dialplan show sub-sugarcrm

Comme résultat j'ai eu :

xivo*CLI> dialplan show sub-sugarcrm
[ Context 'sub-sugarcrm' created by 'pbx_config' ]
's' => 1. NoOp("Get information from SUGARCRM") [pbx_config]
2. Set(SUGARCRM_URL=http://37.187.41.114/service/v4_1/rest.php) [pbx_config]
3. Set(SUGARCRM_USERNAME=admin) [pbx_config]
4. Set(SUGARCRM_PASSWD=****) [pbx_config]
5. Agi(xivo-sugarcrm/for_xivo) [pbx_config]
6. UserEvent(dialplan2cti,UNIQUEID: ${UNIQUEID},CHANNEL: ${CHANNEL},VARIABLE: sugarcrm-firstname,VALUE: ${SUGARCRM-FIRSTNAME}) [pbx_config]
7. UserEvent(dialplan2cti,UNIQUEID: ${UNIQUEID},CHANNEL: ${CHANNEL},VARIABLE: sugarcrm-lastname,VALUE: ${SUGARCRM-LASTNAME}) [pbx_config]
8. Return() [pbx_config]

-= 1 extension (8 priorities) in 1 context. =-




You need to add this subroutine in your DID for exemple on the webi.
Pour cela (je pense que c'est bien ici), j'ai été dans Service - IPBX - Gestion des Appels - Appels Entrants
J'ai editer mon numéro et dans "Sous-routine de prétraitement " j'ai mis : sub-sugarcrm

Service - IPBX - Gestion des Appels - Appels Entrants.jpg




CTI config
Adding on your sheet model the variables :
{dp-sugarcrm-lastname}
{dp-sugarcrm-firstname}
La (j'ai un petit doute), j'ai été dans Service - Serveur CTI - Fiche - Modele
J'ai éditer "XIVO" et dans l'onglet "Fiche" ajouter les variables {dp-sugarcrm-lastname} et {dp-sugarcrm-firstname}.

Service - Serveur CTI - Fiche - Modele.jpg




Adding on sheet model action the value :
http://crm/index.php?module=Contacts&action=DetailView&record ={dp-sugarcrm-id}
La je bloque, je sais pas ou mettre cette URL...




And authorize the popup url in xivo client.
La je pense que c'est bon
url in xivo client.jpg



Si l'ensemble est correct il me manque juste l'url à placer, mais je ne sais pas ou...

je voulais savoir quel est le résultat attendu, une fois l'ensemble des paramatres renté.
Je veux dire de quel manière la fiche va remonté ou s'affiché.

Merci encore et bon week end