Vc6 compile pjproject-1.12 and generate Python pjsua

Source: Internet
Author: User

I. Environment
1. Windows XP
2. platformsdk: 5.2.20.0.2075.51.platformsdk _ svr2003r2_rtm.img
3. DirectX: dxsdk_jun10.exe
4. OpenSSL: openssl-0.9.8e
5. Python: python2.7
Add the VC directory
Ii. Compilation
Set the pjsua project as an active project and compile it.
If the following error occurs:
"OS. OBJ: Error lnk2001: unresolved external symbol _ pj_get_sys_info"
Then, add OS _info.c under pjlib \ SRC \ PJ to the pjlib project and comment out the following lines (218 lines without comments if no errors occur ):

 
CaseProcessor_ubunture_amd64:
Si. Machine = pj_str ("X86_64");
Break;

Recompile and generate pjsua_vc6.exe under pjsip-apps \ bin.
Use of Tri-producer pjsua_vc6.exe
Create a file pj.txt with the following content:

 
-- Id SIP: 1001@192.168.1.100
-- Registrar SIP: 192.168.1.100
-- Realm *
-- User Name 1001
-- Password 1001

Go to the directory and execute the following command:
Pj.exe -- config-file pj.txt
Or write the following command to the BAT file:
Pj.exe -- config-file pj.txt
After registration is successful, enter m and press enter, enter the URI (for example: SIP: 1002@192.168.1.100) of the number to call.

4. Install pjsua in python2.7:
1. Enter the pjsip-apps \ build directory, open the pjsip-apps.dsw;
2. Select python_pjsua and compile it;
3. The _ pjsua. PYD is generated in the pjsip-apps \ lib directory.

Method 1:
Open the command line, go to the pjsip-apps \ SRC \ Python directory, and run the "Python setup-vc.py install" command to install;
Method 2:
Find _ pjsua. pyd in the pjsip-apps \ lib directory.
Find pjsua. py in the pjsip-apps \ SRC \ Python directory
Copy _ pjsua. PYD and pjsua. py to the C: \ python27 \ Lib \ Site-packages directory (reference directory ).

TIPS: The above is compiled in vc6 under xp. Copy _ pjsua. PYD and pjsua. py to the python27 \ Lib \ Site-packages directory under win7 (reference directory.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.