asterisk2billing.org
http://forum.asterisk2billing.org/

Getting Connection failed in asterisk CLI
http://forum.asterisk2billing.org/viewtopic.php?f=18&t=11102
Page 1 of 1

Author:  jagruti123 [ Wed Dec 31, 2014 7:39 am ]
Post subject:  Getting Connection failed in asterisk CLI

php version: 5.3.10
Asterisk version: 1.8.22.0
System: Ubuntu
A2billing: 2.0.4

I am registering one customer of a2billing in softphone and dialing one number. In asterisk i am getting below result:
Quote:
-- Executing [XXXXXXXXXXXX@a2billing:1] NoOp("SIP/XXXXXXXXXXXX-00000003", "A2Billing Start") in new stack
-- Executing [XXXXXXXXXXXX@a2billing:2] AGI("SIP/XXXXXXXXXXXX-00000003", "a2billing.php,1") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_request: a2billing.php
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_channel: SIP/XXXXXXXXXXXX-00000003
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_language: en
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_type: SIP
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_uniqueid: 1420010215.3
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_version: 1.8.22.0
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_callerid: XXXXXXXXXXXX
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_calleridname: unknown
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_callingpres: 0
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_callingani2: 0
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_callington: 0
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_callingtns: 0
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_dnid: XXXXXXXXXXXX
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_rdnis: unknown
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_context: a2billing
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_extension: XXXXXXXXXXXX
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_priority: 2
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_enhanced: 0.0
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_accountcode: XXXXXXXXXXXX
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_threadid: XXXXXXXXXXXX
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> agi_arg_1: 1
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >>
<SIP/XXXXXXXXXXXX-00000003>AGI Rx << VERBOSE "Directory name****/usr/share/a2billing/current/stable/AGI" 1
a2billing.php,1: Directory name****/usr/share/a2billing/current/stable/AGI
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> 200 result=1
<SIP/XXXXXXXXXXXX-00000003>AGI Rx << GET VARIABLE IDCONF
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> 200 result=0
<SIP/XXXXXXXXXXXX-00000003>AGI Rx << Connection failed
<SIP/XXXXXXXXXXXX-00000003>AGI Tx >> 510 Invalid or unknown command
[Dec 31 02:16:55] ERROR[18677]: utils.c:1232 ast_carefulwrite: write() returned error: Broken pipe
[Dec 31 02:16:55] ERROR[18677]: utils.c:1232 ast_carefulwrite: write() returned error: Broken pipe
-- <SIP/XXXXXXXXXXXX-00000003>AGI Script a2billing.php completed, returning 0
-- Auto fallthrough, channel 'SIP/XXXXXXXXXXXX-00000003' status is 'UNKNOWN'

My /etc/asterisk/extconfig.conf have below data:

Quote:
sipusers => mysql,a2billing14,cc_sip_buddies
sippeers => mysql,a2billing14,cc_sip_buddies
iaxusers => mysql,a2billing14,cc_iax_buddies
iaxpeers => mysql,a2billing14,cc_iax_buddies
voicemail => mysql,a2billing14,voicemail_users


My /etc/asterisk/res_config_mysql.conf have below data:

Quote:
[a2billing14]
dbhost = localhost
dbname = a2billing14
dbuser = a2bdbuser
dbpass = a2bdbpassw
dbport = 3306
dbsock = /var/run/mysqld/mysqld.sock


My asterisk showing the below result on executing "realtime mysql status" command:
Quote:
a2billing14 connected to a2billing14@localhost, port 3306 with username a2bdbuser for 31 minutes.


Does anyone know what is i am missing or what is the exact issue?

I am getting correct credential in AGI when it is trying to connect and using those credential i can connect in mysql but from CLI> i am getting connection failed error.

Thanks in advance.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/