Changes

m
Line 1: Line 1: −
[[Category:ClickToDial]]
+
<!-- BEGIN origin interlang links -->
 +
<!-- You can edit this section but do NOT remove these comments
 +
    Links below will be automatically replicated on translated pages by PolyglotBot -->
 +
[[fr:Module_ClickToDial]]
 +
[[es:Módulo_ClickToDial_Es]]
 +
<!-- END interlang links -->
 +
 
 +
[[Category:CTI]]
 
{{TemplateDocUser}}
 
{{TemplateDocUser}}
 
{{TemplateModEN}}
 
{{TemplateModEN}}
Line 10: Line 17:  
= Introduction =
 
= Introduction =
 
This module allows you to trigger a phone call with a simple mouse click on a phone number in Dolibarr.
 
This module allows you to trigger a phone call with a simple mouse click on a phone number in Dolibarr.
Any SIP server with an URL interface for the ClickToCall can be used.
+
This module is designed to work with:
There is also information for setup with Asterisk.
+
* Any SIP server with an URL interface for the ClickToCall
 +
* or with Asterisk (Asterisk is a server that does not provide such URL but a wrapper is included in Dolibarr to provide such service)
 +
* or with local software able to manage "tel:" urls from web browsers clicks
 +
* or with a locally installed softphone (like LinPhone).
    
= Installation =
 
= Installation =
Line 19: Line 29:  
{{ActivationModuleEn}}
 
{{ActivationModuleEn}}
   −
== With Asterisk ==
+
== Solutions with no need to install client components ==
 +
 
 +
=== With Asterisk ===
 
'''This is how to fill the specific setup for Asterisk:'''
 
'''This is how to fill the specific setup for Asterisk:'''
 
* First, make sure you have an Asterisk server that works for SIP. This unfortunately is not relevant to module or Dolibarr, so we can only refer you to the Asterisk documentation.
 
* First, make sure you have an Asterisk server that works for SIP. This unfortunately is not relevant to module or Dolibarr, so we can only refer you to the Asterisk documentation.
Line 29: Line 41:  
  ASTERISK_INDICATIF with prefix to add in phone number (ie: 0 or NONE)
 
  ASTERISK_INDICATIF with prefix to add in phone number (ie: 0 or NONE)
 
  ASTERISK_PORT with port of Asterisk sever (ie: 5038)
 
  ASTERISK_PORT with port of Asterisk sever (ie: 5038)
* Create a new console user on your Asterisk server ( File /etc/asterisk/manager.conf )
+
ASTERISK_CONTEXT with context of call (ex: from-internal)
<source lang="ini">
+
CLICKTODIAL_FORCENEWTARGET with value 0 or 1. If this value is set to 0 or not defined, then calling will open a new window/tab in the browser.
 +
* Create a new console user on your Asterisk server ( File '''/etc/asterisk/manager.conf''' )
 +
<syntaxhighlight lang="ini">
 
[dolibarruser]
 
[dolibarruser]
 
secret = dolibarrpass
 
secret = dolibarrpass
deny=0.0.0.0/0.0.0.0
+
deny = 0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
+
permit = 127.0.0.1/255.255.255.0
 
read = system,call,log,verbose,command,agent,user
 
read = system,call,log,verbose,command,agent,user
 +
#read = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan
 
write = system,call,log,verbose,command,agent,user,originate
 
write = system,call,log,verbose,command,agent,user,originate
</source>
+
#write = system,call,log,verbose,command,agent,user,originate,reporting
 +
</syntaxhighlight>
 +
'''permit''' must contains IP viewed by Asterisk where Dolibarr is installed.
 +
* You may also need to edit file '''/etc/asterisk/extension.conf''' to define contact from-internal.
 +
<syntaxhighlight lang="ini">
 +
[from-internal]
 +
exten => _00XX.,1,NoOp(Call Dolibarr)
 +
same => n,Dial(SIP/providervoip/${EXTEN},30)
 +
same => n,hangup
 +
</syntaxhighlight>
 +
Change providervoip with SIP provider.
 +
 
 +
Validate change with
 +
<syntaxhighlight lang="ini">
 +
asterisk -rvvvvvvvvvvvvvvvvvv
 +
CLI> manager reload
 +
CLI> dialplan reload
 +
</syntaxhighlight>
 +
 
 
* Enter Asterisk informations on your Dolibarr user card, tab ClickToDial
 
* Enter Asterisk informations on your Dolibarr user card, tab ClickToDial
  ClickToDial Login : dolibarruser
+
  ClickToDial Login : dolibarruser (use same entry than added into manager.conf file)
  ClickToDial Password : dolibarrpass
+
  ClickToDial Password : dolibarrpass (use same pass than added into manager.conf file)
 
  ClickToDial Id caller (phone) : your phone
 
  ClickToDial Id caller (phone) : your phone
   −
== With a SIP softare (Ekiga), Linux and Firefox ==
+
=== Using the phoning service of OVH ===
* First, be sure, a SIP software (like Ekiga) is installed and working correctly (you can phone using it).  
+
See page of [[Module OVH (SMS, ClickToDial, ...)]] required for that.
* Then, login to Dolibarr, go into ClickToDial module setup page. Into URL field, type  
+
 
 +
 
 +
== Solutions with client component installation ==
 +
 
 +
 
 +
=== With with local software able to manage "tel:" url ===
 +
If you have installe software able to manage link with syntax "tel:" from a web browser click (for example, the *Xivo client*), from Dolibarr 3.9, just go on the clicktodial setup page and set option *Use just a link "tel:" on phone numbers* to Yes. That's all.
 +
 
 +
 
 +
=== With SIP phone software (Ekiga or LinPhone) + Linux + Firefox or Chrome ===
 +
* First, be sure, a SIP software (like Ekiga or Linphone) is installed and working correctly (you can phone using it) without using Dolibarr.  
 +
* Once this is done, login to Dolibarr, go into ClickToDial module setup page. Into URL field, type  
 
  sip:__PHONETO__@yoursipdomain
 
  sip:__PHONETO__@yoursipdomain
 
For example, when using freephonie, the SIP system of the french ISP Free, URL would be
 
For example, when using freephonie, the SIP system of the french ISP Free, URL would be
Line 52: Line 96:     
'''With Firefox'''
 
'''With Firefox'''
# Launch Firefox
+
 
# Type about:config in the address bar and press ‘Enter’
+
- Launch Firefox
# Accept the warning
+
 
# Right click somewhere on the page and select New –> Boolean from the menu
+
- Type about:config in the address bar and press ‘Enter’
# Set the name to “network.protocol-handler.expose.sip” without the quotes
+
 
# Set the value to “false”
+
- Accept the warning
# Close the about:config window (or tab)
+
 
# Go on a card with a phone number (a third party or contact page for example). Click on phone link. When prompted, select the path to the launch script to run your SIP software (With Ekiga, you can set here path of script provided with Dolibarr 3.3+: '''yourdolibarrpath/scripts/clicktodial/ekiga.sh''').
+
- Right click somewhere on the page and select New –> Boolean from the menu
Your browser should launch your SIP software and dial the number provided into URI each tie you click on a phone number. That’s it!
+
 
 +
- Set the name to “network.protocol-handler.expose.sip” without the quotes
 +
 
 +
- Set the value to “false”
 +
 
 +
- Close the about:config window (or tab)
 +
 
 +
- Copy launcher script file .sh (provided with dolibarr into '''scripts/clicktodial/ekiga.sh''' or '''scripts/clicktodial/linphone.sh''' with linphone) into your home directory. For example into '''/home/yourlogin'''
 +
 
 +
- Go on a card with a phone number (a third party or contact page for example). Click on phone link. When prompted, select the path to the launch script to run your SIP software you have copied previously (so '''/home/yourlogin/ekiga.sh''' or '''/home/yourlogin/linphone.sh''').
 +
 
 +
Your browser should launch your SIP software and dial the number provided into URI each time you click on a phone number. That’s it!
    
'''With Chrome and Ubuntu'''
 
'''With Chrome and Ubuntu'''
   −
Create a file '''/usr/share/applications/dolibarr_clicktodial.desktop''' to describe the SIP software to launch
+
- Copy launcher script file .sh (provided with dolibarr into '''scripts/clicktodial/ekiga.sh''' for Ekiga or '''scripts/clicktodial/linphone.sh''' for Linphone) into your home directory. For example into '''/home/yourlogin'''
 +
 
 +
- Create a file '''/usr/share/applications/dolibarr_clicktodial.desktop''' to describe the SIP software to launch
 
<pre>
 
<pre>
 
[Desktop Entry]
 
[Desktop Entry]
Line 70: Line 127:  
Comment=SIP phone
 
Comment=SIP phone
 
Type=Application
 
Type=Application
Exec=/pathtodolibarr/scripts/clicktodial/linphone.sh %U
+
Exec=/home/yourlogin/linphone.sh %U
 
Icon=/usr/share/pixmaps/linphone/linphone.png
 
Icon=/usr/share/pixmaps/linphone/linphone.png
 
Terminal=false
 
Terminal=false
 
Categories=Network;Telephony;
 
Categories=Network;Telephony;
 
</pre>
 
</pre>
Replace path into line Exec= with your script or your SIP software.
+
Replace path into line Exec= with the path and name of script or your SIP software.
   −
Add a ligne into file '''/usr/share/applications/defaults.list''' to tell to use this descriptor when we need to handle SIP urls.
+
- Add a ligne into file '''/usr/share/applications/defaults.list''' to tell to use this descriptor when we need to handle SIP urls.
 
<pre>
 
<pre>
 
x-scheme-handler/sip=dolibarr_clicktodial.desktop
 
x-scheme-handler/sip=dolibarr_clicktodial.desktop
 
</pre>
 
</pre>
 +
 +
Your browser should launch your SIP software and dial the number provided into URI each time you click on a phone number. That’s it!
    
= Usage =
 
= Usage =
 
Once setup is finished, all phone number in Dolibarr screens are now links you can click. If you do so, Dolibarr will call the defined page/URL, that should make the calling.
 
Once setup is finished, all phone number in Dolibarr screens are now links you can click. If you do so, Dolibarr will call the defined page/URL, that should make the calling.