blak3r / yaai

SugarCRM Asterisk integration
http://www.sugarforge.org/projects/yaai
GNU General Public License v3.0
81 stars 85 forks source link

Not a valid extension in Zoiper #165

Closed jotbe8 closed 10 years ago

jotbe8 commented 10 years ago

hi, i finish installation of yaai, and i have issue when make a call. When i click , zoiper popup with incoming call and when i accept i hear that is not a valid extension but when i type manual a number in zoiper everythings works ok. Also when i point a mouse on number then extension is exactly the same like setup in zoiper.

Log file;

\ Asterisk Logger Starting [2013-11-20 20:39:33]**** [Config Settings] Sugar root set to [/var/www/html/sugar/custom/modules/Asterisk/../../../] Main Log is logging to: C:\Users\Karol\Desktop\asterisklogi.txt Found Language file for en_us Callout prefix is [] Callin prefix is [] Match Internal Regex = /^(sip\/[1-9][0-9][0-9]?[0-9]?-|Local)/i [Database Connection] Selecting DB Name: sugarcrm PHP Deprecated: Function eregi() is deprecated in /var/www/html/sugar/custom/modules/Asterisk/asteriskLogger.php on line 2265 [SOAP Connection] Trying SOAP login endpoint=[http://87.204.168.233/sugar/soap.php] user=[admin] password=[e8e1f43740608b0cb242d52ac49036fa] PHP Warning: Attempt to modify property of non-object in /var/www/html/sugar/include/nusoap/nusoap.php on line 6166 PHP Warning: Attempt to modify property of non-object in /var/www/html/sugar/include/nusoap/nusoap.php on line 6166 PHP Warning: Attempt to modify property of non-object in /var/www/html/sugar/include/nusoap/nusoap.php on line 6166 PHP Warning: Attempt to modify property of non-object in /var/www/html/sugar/include/nusoap/nusoap.php on line 6166 Successfully logged into Sugar via SOAP! SessionId=gmpaev6ga13kptp6fqkcf4f2u7 user=admin GUID=1 [Asterisk Manager Interface (AMI) Connection] Successfully opened socket connection to xx.xxx.xxx.xxx:5038 AMI Version Info:

 Asterisk Call Manager/1.1

Supported AMI version: 1.1 Detected AMI Login action raw response:

 Response: Success
 Message: Authentication accepted

AMI Login was a success! Waiting for call events... [2013-11-20 20:40:17] ! --- Event ----------------------------------------------------------- ! Event --> Newchannel ! Privilege --> call,all ! Channel --> SIP/cc101-00000035 ! ChannelState --> 0 ! ChannelStateDesc --> Down ! CallerIDNum --> 0000000000 ! CallerIDName --> station 101 ! AccountCode --> cc101 ! Exten --> ! Context --> default ! Uniqueid --> 1384980017.125 ! --------------------------------------------------------------------- [2013-11-20 20:40:17] ! --- Event ----------------------------------------------------------- ! Event --> NewAccountCode ! Privilege --> call,all ! Channel --> SIP/cc101-00000035 ! Uniqueid --> 1384980017.125 ! AccountCode --> CLICKTODIAL-+xxxxxxxxx-Home- ! OldAccountCode --> cc101 ! --------------------------------------------------------------------- PHP Deprecated: Function eregi() is deprecated in /var/www/html/sugar/custom/modules/Asterisk/asteriskLogger.php on line 2265 The AccountCode isCLICKTODIAL-+xxxxxxxxx-Home- Account Code ID is: 1384980017.125 CLICKTODIAL-+xxxxxxxxx-Home- CLICKTODIAL-+xxxxxxxxx-Home- SELECT * FROM home WHERE id='CLICKTODIAL-+xxxxxxxxx-Home-' PHP Deprecated: Function eregi() is deprecated in /var/www/html/sugar/custom/modules/Asterisk/asteriskLogger.php on line 2265 INSERT INTO asterisk_log (asterisk_id, callstate, direction, callerID, channel, timestamp_call, bean_module, bean_id, bean_name, bean_link, user_extension) VALUES('1384980017.125', 'Connected', 'O', '', 'SIP/cc101-00000035', FROM_UNIXTIME('1384980017'), '', '', '', '', 'cc101') PHP Deprecated: Function eregi() is deprecated in /var/www/html/sugar/custom/modules/Asterisk/asteriskLogger.php on line 2265 [2013-11-20 20:40:17] ! --- Event ----------------------------------------------------------- ! Event --> NewCallerid ! Privilege --> call,all ! Channel --> SIP/cc101-00000035 ! CallerIDNum --> xxxxxxxxx ! CallerIDName --> station 101 ! Uniqueid --> 1384980017.125 ! CID-CallingPres --> 0 (Presentation Allowed, Not Screened) ! --------------------------------------------------------------------- CallerID Changed to: xxxxxxxxx PHP Deprecated: Function eregi() is deprecated in /var/www/html/sugar/custom/modules/Asterisk/asteriskLogger.php on line 2265 ! AMI Event 'Newstate suppressed. ! AMI Event 'Newstate suppressed. [2013-11-20 20:40:23] ! --- Event ----------------------------------------------------------- ! Event --> Hangup ! Privilege --> call,all ! Channel --> SIP/cc101-00000035 ! Uniqueid --> 1384980017.125 ! CallerIDNum --> xxxxxxxxx ! CallerIDName --> station 101 ! ConnectedLineNum --> xxxxxxxxx ! ConnectedLineName --> ! Cause --> 16 ! Cause-txt --> Normal Clearing ! --------------------------------------------------------------------- In DialEnd... 1384980017.125 PHP Deprecated: Function eregi() is deprecated in /var/www/html/sugar/custom/modules/Asterisk/asteriskLogger.php on line 2265

+++ findCallByAsteriskId(1384980017.125)

PHP Deprecated: Function eregi() is deprecated in /var/www/html/sugar/custom/modules/Asterisk/asteriskLogger.php on line 2265 ! Found entry in asterisk_log recordId= Array ( [bitter] => Array ( [id] => 67 [is_master] => 0 [call_record_id] => [asterisk_id] => 1384980017.125 [callstate] => Dial [uistate] => [callerID] => xxxxxxxxx [channel] => SIP/cc101-00000035 [remote_channel] => [timestamp_call] => 2013-11-20 20:40:17 [timestamp_link] => [timestamp_hangup] => [direction] => O [asterisk_dest_id] => [opencnam] => [answered] => 0 [user_extension] => cc101 [user_device] => [inbound_extension] => [bean_module] => [bean_id] => [bean_name] => [bean_link] => [bean_description] => [parent_module] => [parent_id] => [parent_name] => [parent_link] => [push_sent] => 0 )

[sweet] => Array
    (
        [warning] => Access to this object is denied since it has been deleted or does not exist
        [deleted] => 1
    )

)

[1384980017.125] FOUND outbound CALL

PHP Deprecated: Function eregi() is deprecated in /var/www/html/sugar/custom/modules/Asterisk/asteriskLogger.php on line 2265 Looking for user extension number in: SIP/cc101-00000035 PHP Deprecated: Function eregi() is deprecated in /var/www/html/sugar/custom/modules/Asterisk/asteriskLogger.php on line 2165 Channel Matched SIP/### style regex. Ext is:cc101

+++ findUserByAsteriskExtension(cc101)

PHP Deprecated: Function eregi() is deprecated in /var/www/html/sugar/custom/modules/Asterisk/asteriskLogger.php on line 2265 ! Assigned user id set to 1 [1384980017.125] Measured call duration is 0 seconds ! Call is not related to any record (no matches) ! Invalid Arguments passed to setRelationshipBetweenCallAndBean callRecordId=, beanId=, beanType= Call start was 2013-11-20 20:40:17 1384980017.125 Now updating record in /Calls/ id=... NAME: DESCRIPTION:

jotbe8 commented 10 years ago

I found that when i call from zoiper then i have field extension filled by the dialed phone number,when i use click to call there is a empty field.

AMI Login was a success! Waiting for call events... [2013-11-20 20:40:17] ! --- Event ----------------------------------------------------------- ! Event --> Newchannel ! Privilege --> call,all ! Channel --> SIP/cc101-00000035 ! ChannelState --> 0 ! ChannelStateDesc --> Down ! CallerIDNum --> 0000000000 ! CallerIDName --> station 101 ! AccountCode --> cc101 ! Exten --> THERE SHOULD BE A PHONE NUMBER ! Context --> default ! Uniqueid --> 1384980017.125

there was a wrong Dial Context