diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/include/nusoap/class.soapclient.php sugarcrm/include/nusoap/class.soapclient.php --- org/sugarcrm/include/nusoap/class.soapclient.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/include/nusoap/class.soapclient.php 2006-03-19 09:04:34.000000000 -0600 @@ -436,6 +436,7 @@ */ function parseResponse($headers, $data) { $this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' and type ' . $headers['content-type']); + if (!strstr($headers['content-type'], 'text/xml')) { $this->setError('Response not of type text/xml'); return false; diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Administration/Administration.php sugarcrm/modules/Administration/Administration.php --- org/sugarcrm/modules/Administration/Administration.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Administration/Administration.php 2006-03-18 21:42:24.000000000 -0600 @@ -44,12 +44,9 @@ 'system', 'portal', 'proxy', - - - ); - var $checkbox_fields = Array("notify_send_by_default", "mail_smtpauth_req", "notify_on", 'portal_on', 'skypeout_on', 'system_mailmerge_on', 'proxy_auth', 'proxy_on'); + var $checkbox_fields = Array("notify_send_by_default", "mail_smtpauth_req", "notify_on", 'portal_on', 'skypeout_on', 'scopserv_on', 'system_mailmerge_on', 'proxy_auth', 'proxy_on'); function Administration() { parent::SugarBean(); diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Administration/ConfigureSettings.html sugarcrm/modules/Administration/ConfigureSettings.html --- org/sugarcrm/modules/Administration/ConfigureSettings.html 2006-03-06 19:15:20.000000000 -0600 +++ sugarcrm/modules/Administration/ConfigureSettings.html 2006-03-18 21:43:20.000000000 -0600 @@ -157,6 +157,42 @@
+ + + + + +

{MOD.LBL_SCOPSERV_TITLE}

{MOD.LBL_SCOPSERV_ON} {MOD.LBL_SCOPSERV_ON_DESC}
+
+ + + + + + +
{MOD.LBL_SCOPSERV_HOST}{APP.LBL_REQUIRED_SYMBOL}{MOD.LBL_SCOPSERV_PORT}{APP.LBL_REQUIRED_SYMBOL}
+ + + + + + + +
{MOD.LBL_SCOPSERV_USERNAME}{APP.LBL_REQUIRED_SYMBOL}{MOD.LBL_SCOPSERV_PASSWORD}{APP.LBL_REQUIRED_SYMBOL}
+
+
+
+ + + + + + + +
+ +
+ diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Administration/ConfigureSettings.php sugarcrm/modules/Administration/ConfigureSettings.php --- org/sugarcrm/modules/Administration/ConfigureSettings.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Administration/ConfigureSettings.php 2006-03-18 21:44:16.000000000 -0600 @@ -109,9 +109,29 @@ } if(isset($focus->settings['system_skypeout_on'])){ - -$xtpl->assign("SKYPEOUT_ON", ($focus->settings['system_skypeout_on']) ? "checked='checked'" : ""); + $xtpl->assign("SKYPEOUT_ON", ($focus->settings['system_skypeout_on']) ? "checked='checked'" : ""); } + +if(isset($focus->settings['system_scopserv_on'])){ + $xtpl->assign("SCOPSERV_ON", ($focus->settings['system_scopserv_on']) ? "checked='checked'" : ""); +} + +if(!empty($focus->settings['system_scopserv_on'])){ + $xtpl->assign("SCOPSERV_CONFIG_DISPLAY", 'inline'); +}else{ + $xtpl->assign("SCOPSERV_CONFIG_DISPLAY", 'none'); +} + +if(!empty($focus->settings['system_scopserv_port'])){ + $xtpl->assign("SCOPSERV_PORT", $focus->settings['system_scopserv_port']); +}else{ + $xtpl->assign("SCOPSERV_PORT", '5555'); +} + +if(!empty($focus->settings['system_scopserv_host']))$xtpl->assign("SCOPSERV_HOST", $focus->settings['system_scopserv_host']); +if(!empty($focus->settings['system_scopserv_username']))$xtpl->assign("SCOPSERV_USERNAME", $focus->settings['system_scopserv_username']); +if(!empty($focus->settings['system_scopserv_password']))$xtpl->assign("SCOPSERV_PASSWORD", $focus->settings['system_scopserv_password']); + if(isset($focus->settings['system_mailmerge_on'])){ $xtpl->assign("MAILMERGE_ON", ($focus->settings['system_mailmerge_on']) ? "checked='checked'" : ""); } @@ -129,6 +149,10 @@ $javascript->addFieldGeneric("proxy_port", "int", $mod_strings['LBL_PROXY_PORT'], TRUE, ""); $javascript->addFieldGeneric("proxy_password", "varchar", $mod_strings['LBL_PROXY_PASSWORD'], TRUE, ""); $javascript->addFieldGeneric("proxy_username", "varchar", $mod_strings['LBL_PROXY_USERNAME'], TRUE, ""); +$javascript->addFieldGeneric("system_scopserv_host", "varchar", $mod_strings['LBL_SCOPSERV_HOST'], TRUE, ""); +$javascript->addFieldGeneric("system_scopserv_port", "int", $mod_strings['LBL_SCOPSERV_PORT'], TRUE, ""); +$javascript->addFieldGeneric("system_scopserv_password", "varchar", $mod_strings['LBL_SCOPSERV_PASSWORD'], TRUE, ""); +$javascript->addFieldGeneric("system_scopserv_username", "varchar", $mod_strings['LBL_SCOPSERV_USERNAME'], TRUE, ""); echo $javascript->getScript(); ?> diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Administration/Forms.php sugarcrm/modules/Administration/Forms.php --- org/sugarcrm/modules/Administration/Forms.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Administration/Forms.php 2006-03-18 21:45:40.000000000 -0600 @@ -59,7 +59,12 @@ removeFromValidate('ConfigureSettings', 'proxy_host'); removeFromValidate('ConfigureSettings', 'proxy_username'); removeFromValidate('ConfigureSettings', 'proxy_password'); - + + removeFromValidate('ConfigureSettings', 'system_scopserv_port'); + removeFromValidate('ConfigureSettings', 'system_scopserv_host'); + removeFromValidate('ConfigureSettings', 'system_scopserv_username'); + removeFromValidate('ConfigureSettings', 'system_scopserv_password'); + if (f.mail_sendtype.value == "SMTP") { addToValidate('ConfigureSettings', 'mail_smtpserver', 'varchar', 'true', '{$mod_strings['LBL_MAIL_SMTPSERVER']}'); addToValidate('ConfigureSettings', 'mail_smtpport', 'int', 'true', '{$mod_strings['LBL_MAIL_SMTPPORT']}'); @@ -77,6 +82,13 @@ addToValidate('ConfigureSettings', 'proxy_password', 'varchar', 'true', '{$mod_strings['LBL_PROXY_PASSWORD']}'); } } + + if (f.scopserv_on.checked ) { + addToValidate('ConfigureSettings', 'system_scopserv_port', 'int', 'true', '{$mod_strings['LBL_SCOPSERV_PORT']}'); + addToValidate('ConfigureSettings', 'system_scopserv_host', 'varchar', 'true', '{$mod_strings['LBL_SCOPSERV_HOST']}'); + addToValidate('ConfigureSettings', 'system_scopserv_username', 'varchar', 'true', '{$mod_strings['LBL_SCOPSERV_USERNAME']}'); + addToValidate('ConfigureSettings', 'system_scopserv_password', 'varchar', 'true', '{$mod_strings['LBL_SCOPSERV_PASSWORD']}'); + } return true; } diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Administration/language/en_us.lang.php sugarcrm/modules/Administration/language/en_us.lang.php --- org/sugarcrm/modules/Administration/language/en_us.lang.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Administration/language/en_us.lang.php 2006-03-15 21:07:25.000000000 -0600 @@ -90,6 +90,13 @@ 'LBL_SKYPEOUT_TITLE' => 'SkypeOut®', 'LBL_SKYPEOUT_ON' => 'Enable SkypeOut® Integration?', 'LBL_SKYPEOUT_ON_DESC' => 'Allows users to click on phone numbers to call using SkypeOut®. The numbers must be formatted properly to make use of this feature. This is it must be "+" "The Country Code" "The Number" for more information on formatting see the skype® faq ', + 'LBL_SCOPSERV_TITLE' => 'ScopServ®', + 'LBL_SCOPSERV_ON' => 'Enable ScopServ Telephony Server Integration?', + 'LBL_SCOPSERV_ON_DESC' => 'Allows users to click on phone numbers to call using ScopServ Telephony Server. The numbers must be formatted properly to make use of this feature.', + 'LBL_SCOPSERV_HOST'=>'Host', + 'LBL_SCOPSERV_PORT'=>'Port', + 'LBL_SCOPSERV_USERNAME'=>'User Name', + 'LBL_SCOPSERV_PASSWORD'=>'Password', 'LBL_NOTIFICATION_ON_DESC' => 'Sends notification emails when records are assigned.', 'LBL_UPGRADE_WIZARD' => 'Upgrade Wizard to manage upgrades', 'LBL_UPGRADE_WIZARD_TITLE' => 'Upgrade Wizard', diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Administration/Save.php sugarcrm/modules/Administration/Save.php --- org/sugarcrm/modules/Administration/Save.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Administration/Save.php 2006-03-15 21:41:14.000000000 -0600 @@ -59,7 +59,7 @@ $val = $timedate->swap_formats( $val, $timedate->get_date_format(), $timedate->dbDayFormat ); } - $focus->saveSetting($prefix[0], $prefix[1], $val); + $focus->saveSetting($prefix[0], $prefix[1], $val); } } @@ -72,10 +72,12 @@ if(isset($_POST['skypeout_on'])){ - $focus->saveSetting('system', 'skypeout_on', $_POST['skypeout_on']); } +if(isset($_POST['scopserv_on'])){ + $focus->saveSetting('system', 'scopserv_on', $_POST['scopserv_on']); +} diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Contacts/Contact.php sugarcrm/modules/Contacts/Contact.php --- org/sugarcrm/modules/Contacts/Contact.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Contacts/Contact.php 2006-03-18 22:57:26.000000000 -0600 @@ -479,7 +479,19 @@ . $temp_array['PHONE_WORK']. '' ; } } - + + if(isset($system_config->settings['system_scopserv_on']) + && $system_config->settings['system_scopserv_on'] == 1) + { + if(!empty($temp_array['PHONE_WORK'])) + { + + $temp_array['PHONE_WORK'] = '' . + $temp_array['PHONE_WORK'] . ''; + } + } + return $temp_array; } diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Contacts/DetailView.html sugarcrm/modules/Contacts/DetailView.html --- org/sugarcrm/modules/Contacts/DetailView.html 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Contacts/DetailView.html 2006-03-15 21:19:14.000000000 -0600 @@ -70,21 +70,22 @@ - + - + - + + diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Contacts/DetailView.php sugarcrm/modules/Contacts/DetailView.php --- org/sugarcrm/modules/Contacts/DetailView.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Contacts/DetailView.php 2006-03-18 23:05:57.000000000 -0600 @@ -98,9 +98,15 @@ if(isset($system_config->settings['system_skypeout_on']) && $system_config->settings['system_skypeout_on'] == 1){ if(!empty($focus->phone_home) && skype_formatted($focus->phone_home)) $focus->phone_home = ''.$focus->phone_home. '' ; if(!empty($focus->phone_work) && skype_formatted($focus->phone_work)) $focus->phone_work = ''.$focus->phone_work. '' ; - if(!empty($focus->phone_mobile)&& skype_formatted($focus->phone_mobile)) $focus->phone_mobile = ''.$focus->phone_mobile. '' ; - if(!empty($focus->phone_mobile)&& skype_formatted($focus->phone_other)) $focus->phone_mobile = ''.$focus->phone_other. '' ; - + if(!empty($focus->phone_mobile)&& skype_formatted($focus->phone_mobile)) $focus->phone_mobile = ''.$focus->phone_mobile. '' ; + if(!empty($focus->phone_other)&& skype_formatted($focus->phone_other)) $focus->phone_other = ''.$focus->phone_other. '' ; +} + +if(isset($system_config->settings['system_scopserv_on']) && $system_config->settings['system_scopserv_on'] == 1){ + if(!empty($focus->phone_home)) $focus->phone_home = 'id . '&type=phone_home", "new", "width=325,height=100,resizable=0,scrollbars=0")\'>' . $focus->phone_home . ''; + if(!empty($focus->phone_work)) $focus->phone_work = 'id . '&type=phone_work", "new", "width=325,height=100,resizable=0,scrollbars=0")\'>' . $focus->phone_work . ''; + if(!empty($focus->phone_mobile)) $focus->phone_mobile = 'id . '&type=phone_mobile", "new", "width=325,height=100,resizable=0,scrollbars=0")\'>' . $focus->phone_mobile . ''; + if(!empty($focus->phone_other)) $focus->phone_other = 'id . '&type=phone_other", "new", "width=325,height=100,resizable=0,scrollbars=0")\'>' . $focus->phone_other . ''; } $xtpl->assign("PHONE_HOME", $focus->phone_home); diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Contacts/ListView.html sugarcrm/modules/Contacts/ListView.html --- org/sugarcrm/modules/Contacts/ListView.html 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Contacts/ListView.html 2006-03-18 22:07:25.000000000 -0600 @@ -52,7 +52,7 @@ - + diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Leads/DetailView.php sugarcrm/modules/Leads/DetailView.php --- org/sugarcrm/modules/Leads/DetailView.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Leads/DetailView.php 2006-03-15 21:25:38.000000000 -0600 @@ -98,6 +98,14 @@ if(!empty($focus->phone_mobile)&& skype_formatted($focus->phone_other)) $focus->phone_mobile = ''.$focus->phone_other. '' ; } + +if(isset($system_config->settings['system_scopserv_on']) && $system_config->settings['system_scopserv_on'] == 1){ + if(!empty($focus->phone_home)) $focus->phone_home = ''.$focus->phone_home. '' ; + if(!empty($focus->phone_work)) $focus->phone_work = ''.$focus->phone_work. '' ; + if(!empty($focus->phone_mobile)) $focus->phone_mobile = ''.$focus->phone_mobile. '' ; + if(!empty($focus->phone_mobile)) $focus->phone_mobile = ''.$focus->phone_other. '' ; + +} $xtpl->assign("PHONE_HOME", $focus->phone_home); $xtpl->assign("PHONE_MOBILE", $focus->phone_mobile); $xtpl->assign("PHONE_WORK", $focus->phone_work); diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Users/DetailView.html sugarcrm/modules/Users/DetailView.html --- org/sugarcrm/modules/Users/DetailView.html 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Users/DetailView.html 2006-03-14 20:12:55.000000000 -0600 @@ -191,8 +191,8 @@ - - + + - - + + diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Users/EditView.php sugarcrm/modules/Users/EditView.php --- org/sugarcrm/modules/Users/EditView.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Users/EditView.php 2006-03-14 20:14:07.000000000 -0600 @@ -94,6 +94,7 @@ $xtpl->assign("PHONE_WORK", $focus->phone_work); $xtpl->assign("PHONE_OTHER", $focus->phone_other); $xtpl->assign("PHONE_FAX", $focus->phone_fax); +$xtpl->assign("EXTENSION", $focus->extension); $xtpl->assign("EMAIL1", $focus->email1); $xtpl->assign("EMAIL2", $focus->email2); $xtpl->assign("ADDRESS_STREET", $focus->address_street); diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Users/field_arrays.php sugarcrm/modules/Users/field_arrays.php --- org/sugarcrm/modules/Users/field_arrays.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Users/field_arrays.php 2006-03-14 20:14:28.000000000 -0600 @@ -47,6 +47,7 @@ ,"phone_work" ,"phone_other" ,"phone_fax" + ,"extension" ,"email1" ,"email2" ,"address_street" diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Users/language/en_us.lang.php sugarcrm/modules/Users/language/en_us.lang.php --- org/sugarcrm/modules/Users/language/en_us.lang.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Users/language/en_us.lang.php 2006-03-14 20:17:39.000000000 -0600 @@ -174,6 +174,7 @@ 'LBL_ADDRESS_POSTALCODE' => 'Address Postal Code:', 'LBL_OFFICE_PHONE' => 'Office Phone:', 'LBL_ANY_PHONE' => 'Any Phone:', + 'LBL_EXTENSION' => 'Extension:', 'LBL_PHONE' => 'Phone:', 'LBL_MOBILE_PHONE' => 'Mobile Phone:', 'LBL_WORK_PHONE' => 'Work Phone:', diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Users/language/en_us.lang.php.rej sugarcrm/modules/Users/language/en_us.lang.php.rej --- org/sugarcrm/modules/Users/language/en_us.lang.php.rej 1969-12-31 18:00:00.000000000 -0600 +++ sugarcrm/modules/Users/language/en_us.lang.php.rej 2006-03-14 20:10:18.000000000 -0600 @@ -0,0 +1,16 @@ +*************** +*** 87,92 **** + 'LBL_FAX' => 'Fax:', + 'LBL_EMAIL' => 'Email:', + 'LBL_EMAIL_OTHER' => 'Email 2:', + 'LBL_HOME_PHONE' => 'Home Phone:', + 'LBL_ADDRESS_INFORMATION' => 'Address Information', + 'LBL_PRIMARY_ADDRESS' => 'Primary Address:', +--- 87,93 ---- + 'LBL_FAX' => 'Fax:', + 'LBL_EMAIL' => 'Email:', + 'LBL_EMAIL_OTHER' => 'Email 2:', ++ 'LBL_EXTENSION' => 'Extension:', + 'LBL_HOME_PHONE' => 'Home Phone:', + 'LBL_ADDRESS_INFORMATION' => 'Address Information', + 'LBL_PRIMARY_ADDRESS' => 'Primary Address:', diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Users/User.php sugarcrm/modules/Users/User.php --- org/sugarcrm/modules/Users/User.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Users/User.php 2006-03-14 20:14:49.000000000 -0600 @@ -55,6 +55,7 @@ var $phone_work; var $phone_other; var $phone_fax; + var $extension; var $email1; var $email2; var $address_street; diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Users/vardefs.php sugarcrm/modules/Users/vardefs.php --- org/sugarcrm/modules/Users/vardefs.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Users/vardefs.php 2006-03-14 20:15:06.000000000 -0600 @@ -206,6 +206,13 @@ 'type' => 'varchar', 'len' => '50', ), + 'extension' => + array ( + 'name' => 'extension', + 'vname' => 'LBL_EXTENSION', + 'type' => 'varchar', + 'len' => '100', + ), 'email1' => array ( 'name' => 'email1', diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/scopserv.html sugarcrm/scopserv.html --- org/sugarcrm/scopserv.html 1969-12-31 18:00:00.000000000 -0600 +++ sugarcrm/scopserv.html 2006-03-19 08:26:56.000000000 -0600 @@ -0,0 +1,40 @@ + + + + +

Calling {NAME}

+
+

{MOD.LBL_MAILMERGE}

{MOD.LBL_ENABLE_MAILMERGE}{MOD.LBL_NAME}  {SALUTATION}{FIRST_NAME} {LAST_NAME}  {VCARD_LINK} {MOD.LBL_OFFICE_PHONE} {PHONE_WORK} {PHONE_WORK} {PHONE_WORK_CALL}
    {MOD.LBL_MOBILE_PHONE} {PHONE_MOBILE} {PHONE_MOBILE} {PHONE_MOBILE_CALL}
{MOD.LBL_ACCOUNT_NAME}  <{TAG.ACCOUNT} href="index.php?module=Accounts&action=DetailView&record={ACCOUNT_ID}" class="tabDetailViewDFLink">{ACCOUNT_NAME}  {MOD.LBL_HOME_PHONE} {PHONE_HOME} {PHONE_HOME} {PHONE_HOME_CALL}
{MOD.LBL_LEAD_SOURCE}  {LEAD_SOURCE} {MOD.LBL_OTHER_PHONE} {PHONE_OTHER} {PHONE_OTHER_CALL} {PHONE_OTHER} 
{MOD.LBL_TITLE} <{TAG.MAIN} href="{URL_PREFIX}index.php?action=DetailView&module=Contacts&record={CONTACT.ID}&offset={CONTACT.OFFSET}&stamp={CONTACT.STAMP}" class="listViewTdLinkS1">{CONTACT.NAME} {CONTACT.TITLE} <{TAG.ACCOUNT} href="{URL_PREFIX}index.php?action=DetailView&module=Accounts&record={CONTACT.ACCOUNT_ID}" class="listViewTdLinkS1">{CONTACT.ACCOUNT_NAME}{CONTACT.PHONE_WORK}{CONTACT.PHONE_WORK}
{MOD.LBL_MESSENGER_ID} {MESSENGER_ID}  {MOD.LBL_EXTENSION}{EXTENSION}
{MOD.LBL_ADDRESS} {ADDRESS_STREET}
diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Users/DetailView.php sugarcrm/modules/Users/DetailView.php --- org/sugarcrm/modules/Users/DetailView.php 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Users/DetailView.php 2006-03-14 20:13:25.000000000 -0600 @@ -252,6 +252,7 @@ $xtpl->assign("PHONE_WORK", $focus->phone_work); $xtpl->assign("PHONE_OTHER", $focus->phone_other); $xtpl->assign("PHONE_FAX", $focus->phone_fax); +$xtpl->assign("EXTENSION", $focus->extension); $xtpl->assign("EMAIL1", $focus->email1); $xtpl->assign("EMAIL2", $focus->email2); $xtpl->assign("EMPLOYEE_STATUS", $focus->employee_status); diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/modules/Users/EditView.html sugarcrm/modules/Users/EditView.html --- org/sugarcrm/modules/Users/EditView.html 2006-03-06 19:15:18.000000000 -0600 +++ sugarcrm/modules/Users/EditView.html 2006-03-14 20:13:49.000000000 -0600 @@ -206,8 +206,8 @@
{MOD.LBL_MESSENGER_ID}   {MOD.LBL_EXTENSION}
{MOD.LBL_NOTES}
+ + + + + + + + +
Destination{DEST}
From{FROM}
+ + + +

Error: {ERROR}

+ diff -urN -x cache -x config.php -x .htaccess -x log4php.properties -x sugarcrm.log org/sugarcrm/scopserv.php sugarcrm/scopserv.php --- org/sugarcrm/scopserv.php 1969-12-31 18:00:00.000000000 -0600 +++ sugarcrm/scopserv.php 2006-03-19 09:17:59.000000000 -0600 @@ -0,0 +1,115 @@ +retrieveSettings('system'); + +session_start(); + +/* Verify if the user is authenticated, else redirect to the index.php page */ +if(!isset($_SESSION["authenticated_user_id"])) +{ + header('Location:' . "index.php"); +} + +$current_user = new User(); +$current_user->retrieve($_SESSION["authenticated_user_id"]); + +/* Verify if the ScopServ Telephony Integration is enable in System Condif */ +if(!isset($system_config->settings['system_scopserv_on']) || $system_config->settings['system_scopserv_on'] != 1){ + echo "ScopServ Call for ContactsERROR: You need to enable the ScopServ Telephony Integration in your CRM administration panel."; + exit; +} + +/* Verify if the user have set an extension */ +if(!$current_user->extension) +{ + echo "ScopServ Call for ContactsERROR: You need to add an extension to your CRM user account so we know where to send the call."; + exit; +} + +if(isset($_SESSION['authenticated_user_theme']) && $_SESSION['authenticated_user_theme'] != '') { + $theme = $_SESSION['authenticated_user_theme']; +} else { + $theme = $sugar_config['default_theme']; +} + +$theme_path = "themes/".$theme."/"; +$image_path = $theme_path."images/"; + +require_once($theme_path.'layout_utils.php'); + +/* Get variables */ +$call = $_REQUEST['call']; +$type = $_REQUEST['type']; + +/* Retrieve Contact informations */ +$contact = new Contact(); +$contact->retrieve($call); + +$phone_call = ereg_replace("[ ()+-]+", "", $contact->$type); + +$call_name = sprintf("%s %s", $contact->first_name, $contact->last_name); + +/* Compose the URL of the server */ +$url = sprintf("http://%s:%d/rpc.php", $system_config->settings['system_scopserv_host'], $system_config->settings['system_scopserv_port']); +$sclient = new nusoapclient($url, false); + +$sclient->setCredentials($system_config->settings['system_scopserv_username'], + $system_config->settings['system_scopserv_password'], 'basic'); + + +/* Insert Popup header */ +insert_popup_header($theme); +$xtpl=new XTemplate ('scopserv.html'); +flush(); + +$GLOBALS['log']->debug('CONNECT TO SCOPSERV TELEPHONY SERVER TO DIAL ' . $contact->$type . '(' . $current_user->extension . ')'); + +$res = $sclient->call('telephony_makeCall', array('extension' => $current_user->extension, + 'phonenum' => $phone_call), + 'urn:horde'); + +if(empty($res) || $sclient->getError()){ + $sclient = ''; +} + +if ($res == 'OK') { + $xtpl->assign("NAME", $call_name); + $xtpl->assign("FROM", $current_user->extension); + $xtpl->assign("DEST", $contact->$type); + $xtpl->assign("IMAGE_PATH", $image_path); + $xtpl->parse("main"); + $xtpl->out("main"); +} else { + $xtpl->assign("ERROR", $res); + $xtpl->parse("error"); + $xtpl->out("error"); +} + +/* Insert Popup footer */ +insert_popup_footer(); +