Here are the softwares used in my server running on CentOS5.6
Elastix
Openerp v6.03
Asterisk 1.8.5
#vi /etc/asterisk/manager.conf
[neohs]
secret = elastix456
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.255
read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
[root@elastix bin]# vi /etc/asterisk/extensions.conf
…
…
;this is where the extension has been included for openerp
[callanthony]
exten => s,1,AGI(/usr/local/bin/get_cid_name_timeout.sh)
exten => s,n,Answer()
exten => s,n,Hangup()
Use telnet to get connected to asterisk server OK. The phone can ring.
[root@elastix bin]# telnet localhost 5038
Trying 127.0.0.1…
Connected to localhost.localdomain (127.0.0.1).
Escape character is ‘^]’.
Asterisk Call Manager/1.1
Action: login
Events: off
Username: neohs
Secret: elastix456
Response: Success
Message: Authentication accepted
Action: originate
Channel: SIP/105
Timeout: 15000
CallerId: device
Exten: 105
Context: callanthony
Port:
Variable: SIPAddHeader=Alert-Info:
Priority: 1
Response: Success
Message: Originate successfully queued
Use the above configuration under asterisk server module in openerp but when I click on the Dial button next to phone number, the phone does not ring.
I suspect that Asterisk does not listen to Openerp calls.
I had to check a log file and here is the below info given under /etc/asterisk/full
[root@elastix bin]# tail /var/log/asterisk/full
[Sep 23 16:55:43] ERROR[7433] utils.c: fwrite() returned error: Broken pipe
[Sep 23 16:55:43] ERROR[7433] utils.c: fwrite() returned error: Broken pipe
The callerID name retrieved from postgresql is correct.
[root@elastix bin]# echo “agi_callerid:90624847”| /usr/local/bin/get_cid_name.py -s localhost -d openerp -u 3 -w "demo"
full AGI environnement :
agi_callerid = 90624847
stdout encoding = UTF-8
VERBOSE "CallerID number = 90624847"
phone number sent to OpenERP = 90624847
VERBOSE "Starting XML-RPC request on OpenERP localhost:8069"
VERBOSE "End of XML-RPC request on OpenERP"
VERBOSE "CallerID Name = Joseph"
SET CALLERID “Joseph”<90624847>
Here is the asterisk server configuration in openerp.
Asterisk servers Help Asterisk server name : Mind Asterisk server
Company ? : Mind & Media
Asterisk server name ? : Mind Asterisk server Active ? : *
Asterisk IP addr. or DNS ? : localhost Port ? : 5038
AMI login ? : neohs AMI password ? : **********
Dialplan context ? : callanthony Extension priority ? : 1
Out prefix ? : 9 National prefix ? : 0
International prefix ? : 00 My country prefix ? : 65
National format allowed ? ? : Alert-Info SIP header ? :
Wait time (sec) ? : 15
How to get the asterisk server to listen to Openerp so that the phone can ring upon the clicking of the DIAL button provided by asterisk_click2dial? If you can integrate asterisk_click2dial with openerp successfully, please share with us. Thank you
From Robert Neo from Singapore