Challenge of Day

Monday, December 29, 2008

SDK For Developing VoIP Application

Hello,
Still I am looking for a SDK that I can develop VoIP application in .NET Framework which has capability connection to ordinary PSTN phone line.
I have tried some other as well:

>>>> SIP .NET by independentsoft.com : The evaluation compiles and run but since it is SIP based, you cannot call an ordinary phone line. I have sent them an email and waiting for their reply. This is their explanation about SIP .NET:
SIP .NET is Session Initiation Protocol API for .NET Framework and .NET Compact Framework. Features includes: Digest authentication, Supports TCP and UDP protocols, Supports call holds, waiting, transfer, forward, Supports methods: REGISTER, INVITE, OPTIONS, PRACK, ACK, BYE, CANCEL, MESSAGE, SUBSCRIBE, NOTIFY, UPDATE, INFO, FEFER, PUBLISH. Create SDP message, Parse SDP message, Register, Unregister, Invite to session, Cancel session, End session, Send message, Send Info, Update session, Subscribe, Refresh, Notify, Presence, Instant messaging, Logging

>>>> VaxVoIP SIP SDK from vaxvoip.com: I downloaded the trial version. It installs easily and runs without problem. I could not test it because I do not have any SIP server! I have sent them an email and still waiting for reply.

Be a winner in your daily challenges

Ali Khademi

Wednesday, December 24, 2008

VoIP Application in .NET

Hello,
I am desperatly looking for a SDK which I can develop a VoIP application that can make call from PC to (PSTN) phone line. This SDK should be able to connect SIP protocol to ordinary phone line.
If you search on the web, you will find a lot of people who claim have the best SDK but according to my experience, they do not do what I am looking for.
Here are some samples:

>>>> Conaito VoIP EVO Enterprise SDK: do not support PSTN. It is only a voice messenger and it is channel oriented which means you cannot wake up other party. Other party should be on-line already!
Here is Conaito's explanation: The Conaito VoIP SDK contains a hight performance VoIP conferencing client capable of delivering crystal clear sound even for both low and high-bandwidth users. The enlarged version of the Conaito VoIP EVO SDK enables to record calls and this can be very use full for recalling discussions with....

>>>> SIP VoIP SoftPhone by abtollc.com: Their trial version does not work and they even did not bother to reply to my emails.
Here is their explanation: Our brand-new VoIP SIP SDK provides a powerfull and highly customizable solution to quickly add SIP based dial and receive phone calls features in your software applications. It accelerates the development of SIP compliant soft phone with a fully-customizable user interface and brand anme. The Abto LLC VoIP SIP SDK contains a high performance VoIP conferencing client capable fo delivering crystal clear sound even for both low and high-bandwidth users and SIP compatible devices. It supports STMF, adaptive silence detection, adaptive jitter buffer....

>>>> VoIP H323DLL v1.1 by Research-Lab.com: It claims some capabilities but the trial version does nothing important. It tried .NET sample and even I could not compile it in the first place. After a tricky compile, sample throws exceptions at time of showing main form! I have sent them an email. Still I have not received reply....

>>>> VoIP SIP Phone DLL by Research-Lab.com: It claims allows to make PC-PC, PC-Phone or Phone-Phone calls or create Instant Messaging (IM) sessions over the internet and SDK brings protocol support for ActiveX and it eases implmentation of a customized VOIP solution eliminating PSTN lines. In practice when I downloaded this SDK and installed, I found it very similar to VoIP H323DLL v1.1 (see above) and although .NET Sample compiled, it did not work at all! Again I sent an email to vendor and I have not received a reply yet.

>>>> SIPEK SoftPhone: This is an open source but either it was too professional for me or it did not work. Still I am not sure if it supports connection to PSTN. This SDK works based on SIP and demo did not worked for me. Sample C# application also does not work as it assumes some default port/host/uid/pwd/proxy.

At the end, somebody please give me a clue about where to look for a SDK.

Be a winner in your daily challenges
Ali Khademi
علي خادمي

Looking for ViewSat eXtreme 2000

Hello
Looking for ViewSat eXtreme 2000, follow the light.

Be a winner in your daily challenges.
Ali Khademi

Tuesday, December 23, 2008

ORA-28575: unable to open RPC connection to external procedure agent

Hello,
If you are in the middle of process of calling a COM+ object from within Oracle PL/SQL, you might receive this error message:

ORA-28575: unable to open RPC connection to external procedure agent

Most probably the reason for this error message is the misconfiguration of Oracle Listener. To configure Oracle Listener properly, you need to modify two fondamental files in your Oracle Home sub-folder, something like this:
c:\oracle\product\10.2.0\db_1\network\admin

First file is LISTENER.ORA. Here is the typical content you need to have for calling COM Object:
LISTENER =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = qmos)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(SID_NAME = qmos)
)
)

Remember you should replace your SID (here qmos) and HOST (here localhost) with your specific DB information.

Second file is TNSNAMES.ORA:
Typically you will need to add this entry as first entry in this file:
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)


According to my experience, if you encountered this problem, use TNSPING command to make sure that EXTPROC_CONNECTION_DATA is accessible. Sometimes, changes in the setting of SQLNET.ORA file causes you need a qualified name (e.g .WORLD) at the end of EXTPROC_CONNECTION_DATA.


I have an extended document on calling COM objects within PL/SQL. You can reach it at http://www.khademi.com/document/docs.htm

Be a winner in your daily challenges
Ali Khademi
علي خادمي

Monday, December 22, 2008

ORDCOM Functions Returns 0x80004005

Hello,
In the journey of calling a COM+ component from within Oracle PL/SQL using ORDCOM package, I noticed that return value of functions is -2147467259. Here is the code snippet to see the error number:
In SQLPlus, type this command:
SQL>set serveroutput on;
In your stored procedure:

CREATE OR REPLACE PROCEDURE CALL_MY_COM IS
HRESULT BINARY_INTEGER;
ApplicationHandle BINARY_INTEGER;
BEGIN
HRESULT =:=ORDCOM.CREATEOBJECT('MY_COM_OBJ',0,'',ApplicationHandle);
if (HRESULT !=0) THEN
DBMS_OUTPUT.PUT_LINE(HRESULT);
END IF;
HRESULT := ORDCOM.INVOKE(ApplicationHandle, 'method_name');
END;

The error number -2147467259 which is equal to 0x80004005 means that you are lacking of DCOM security privilages. I have an extended document showing how to use DCOMCNFG.EXE to resolve this problem. To find out more, go to: http://www.khademi.com/document/docs.htm

Be a winner in your daily challenges
Ali Khademi

Friday, December 12, 2008

The component or application containing the component has been disabled

Hello,
In continuing our journey to deploy COM+ object developed under PowerBuilder 10.5 we encountered anouther problem.
Problem: The COM proxy is on S1. The COM is deployed on S2. When we try to access the COM from S1 we get this error message:
Code 80004027 The Component or Application Containing the Component has been Disabled

Remedy:
1 - The server may has not been setup correctly because COM+ is not enabled. To Enable Network COM+ Access do the followings:
o Click on Start, go to Control Panel -> Add Remove Programs -> Widnows Compnents
o Select Application Server and click on the Details
o Click Enable Network COM+ Access and the click OK.
Remember you might need Windows Installation CDs

2 - Make sure that by using DCOMCNFG you give enough permision to applications.

Be a winner in your daily challenges
Ali Khademi
Technical Documents: http://www.khademi.com/document/docs.htm


OraMTS Error 1002 Obtaining Releasing Connection

Hello,
In the adventure of deploying a COM component developed under PowerBuilder 10.5, after installing Oracle MTS for Oracle 9.2, we encountered another problem:
OraMTS Error 1002 Obtaining Releasing Connection
To resolve this problem, we decided to use ODBC connection instead of PowerBuilder native connection to Oracle. Here is sample:
DBMS="ODBC"
DBParm="ConnectString='DNS=yourDNS;uid=yourUID;pwd=yourPWD'"

Be a winner in your daily challenges
Ali Khademi

Hell of PowerBuilder 10.5 / Windows 2003 64x / Oracle 10g 64x

Hello,
Today I wanted to deploy a COM object which is developed in PowerBuilder 10.5 on Windows 2003 64x. This COM object is called within a PL/SQL code and will write back some data to database.
When I tried to test the COM object with VB script, I noticed that first of all COM object cannot read the Windows registry. The next (most important problem) was this error:
Error 999, PowerBuilder Could not load OCI.DLL
I thought maybe this is because of my COM object. To test this, I developed an ordinary PB program that connects to the Oracle 10g database. Interestingly the same error message happned. I believe PowerBuilder 10.5 native Oracle connectivity does not support Oracle Client 10g 64x and it does not matter which DBMS you pick. ("O84 Oracle8/8i (8.x.4+)" or "O90 Oracle9i (9.0.1)" or "O10 Oracle10g (10.1.0)")

The other irony is the difficulty of fining clues on official Sybase or Oracle sites for this issue. In the Information Age which every body is the Information Company! you will have to spend some time to find a proper clue.

The other problem in PowerBuilder COM object is that for the reason that I do not know, you have to install Oracle MTS. Up to here is somehow understandable. But the problem is that you need proper version of Oracle MTS for the same Oracle client you have. Installing a new Oracle product is another nightmare. New products might go to a new home or might be installed on the top of the current Oracle home. In both cases dealing with Oracle Homes is a disaster!

Be a winner in your daily challenges
Ali Khademi
http://www.khademi.com/
http://www.baridsoft.ca/
More technical documents at http://www.khademi.com/document/docs.htm



Every Oracle product that you want to install, it should be

Monday, December 8, 2008

Looking for ViewSat eXtreme 2000

Hello
Looking for ViewSat eXtreme 2000, follow the light.

Be a winner in your daily challenges.
Ali Khademi

Wednesday, December 3, 2008

Using SYS_CONTEXT function for Auditing Purposes in Oracle Database

Using SYS_CONTEXT function for Auditing Purposes in Oracle

Problem: You might need to develop some simple auditing process that for example whenever somebody updates a record, you capture some information about WHO and FROM WHERE it is done.

Answer: By looking carefully at Oracle documents (www.oracle.com), you will find the SYS_CONTEXT function as your quick solution.

Here is general syntax of this function:
SELECT sys_context('USERENV', '');FROM DUAL;

At first glance you might say this function is the perfect solution for auditing purposes because it provides session related information like user name or host name but I would remind you that most of return values from this function are meaningless unless the application program sets some specific values for them by using special packages
which I will cover it later and as you know in the case of security you cannot expect the intruder or culprit to set those values. Still this function is better than nothing for handy quick database level auditing.

Here are list of the most popular parameters to this function:
Name
Description
Example
ACTION
Returns current action set by application using dbms_application_info package
Select sys_context(‘USERENV’, ‘ACTION’) from dual;
CLIENT_IDENTIFIER
Returns currently assigned client ID by the application program using dbms_session package
Select sys_context(‘USERENV’,’CLIENT_IDENTIFIER’) from dual;
CURRENT_SCHEMA
Returns current schema
Select sys_context(‘USERENV’,’CURRENT_SCHEMA’) from dual;
CURRENT_SQL
Returns first 4KB block of SQL statement
Select sys_context(‘USERENV’,’CURRENT_SQL’) from dual;
HOST
Returns name of the computer which is connected to the DB
Select sys_context(‘USERENV’,’HOSt’) from dual;
MODULE
Returns name of the current program which should be set by dbms_application_package
Select sys_context(‘USERENV’,’MODULE’) from dual;
OS_USER
Returns name of current OS user connected to this session
Select sys_context(‘USERENV’,’OS_USER’) from dual;
SESSIONID
Returns session ID
Select sys_context(‘USERENV’,’SESSIONID’) from dual;





List of all valid parameters:

ACTION, AUDITED_CURSORID, AUTHENTICATED_IDENTITY, AUTHENTICATION_DATA, AUTHENTICATION_METHOD, BG_JOB_ID, CLIENT_IDENTIFIER, CLIENT_INFO, CURRENT_BIND, CURRENT_EDITION_ID, CURRENT_EDITION_NAME, CURRENT_SCHEMA, CURRENT_SCHEMAID, CURRENT_SQL, CURRENT_SQLn, CURRENT_SQL_LENGTH, DB_DOMAIN, DB_NAME, DB_UNIQUE NAME, ENTRYID, ENTERPRISE_IDENTITY, FG_JOB_ID, GLOBAL_CONTEXT_MEMORY, GLOBAL_UID, HOST, IDENTIFICATION_TYPE, INSTANCE, INSTANCE_NAME, IP_ADDRESS, ISDBA, LANG, LANGUAGE, MODULE, NETWORK_PROTOCOL, NLS_CALENDAR, NLS_CURRENCY, NLS_DATE_FORMAT, NLS_DATE_LANGUAGE, NLS_SORT, NLS_TERRITORY, OS_USER, POLICY_INVOKER, PROXY_ENTERPRISE_IDENTITY, PROXY_GLOBAL_UID, PROXY_USER, PROXY_USERID, SERVER_HOST, SERVICE_NAME, SESSION_USER, SESSION_USERID, SESSIONID, SID, STATEMENTID, TERMINAL,


Special Packages – Functions:
DBMS_APPLICATION_INFO.SET_ACTION
DBMS_SESSION.SET_IDENTIFIER


Here is a sample of auditing trigger for auditing purposes. This trigger logs successful and unsuccessful logon attempts. This trigger dumps data to V$LIGHT_AUDIT_LOGON which is defined at the end.

create or replace trigger tal_logon_success after logon on database
begin
begin -- insert block
insert into v$light_audit_logon (
audit_date,
db_user_name,
os_user_name,
computer_name,
ip_address,
module,
comments
)
values (
sysdate,
user,
sys_context('userenv','os_user'),
sys_context('userenv','host'),
sys_context('userenv','ip_address'),
sys_context('userenv','module'),
'Successful Logon'
);
exception when others then
null;
end; -- insert block
end;
/

create or replace trigger tal_logon_failure
after servererror
on database
begin
if (is_servererror(1017)) then
begin
insert into v$light_audit_logon (
audit_date,
db_user_name,
os_user_name,
computer_name,
ip_address,
module,
comments
)
values (
sysdate,
sys_context('userenv','session_user'),
sys_context('userenv','os_user'),
sys_context('userenv','host'),
sys_context('userenv','ip_address'),
sys_context('userenv','module'),
'UnSuccessful Logon'
);
end; -- insert block
end if;
end logon_failures;
/

create table v$light_audit_logon (
audit_date date,
db_user_name varchar2(30),
os_user_name varchar2(30),
computer_name varchar2(50),
ip_address varchar2(20),
module varchar2(30),
comments varchar2(500)
);


You can also develop a stored procedure and call it in INSERT/ UPDATE/ DELETE triggers to log who modified data.

Be a winner in your daily challenges

Provided by Ali Khademi (www.khademi.com)
Do not hesitate to share your comments with Ali Khademi : ali at khademi dot com

Tuesday, December 2, 2008

PowerBuilder Reports Again!

Hello,
Since my company has fired couple of PowerBuilder programmers, I have been asked to take over the maintenance of MSP's very ugly reports in PowerBuilder. Since in this economical situation, best strategy is to keep your job, I accepted it. For sure this acceptance was a huge challenge for me and touching those reports is a much more huger challenge.

Be a winner in your daily challenges.
Ali Khademi