Fall into a trouble when calling a dll from java in linux

Hi, experts:
I encountered a big trouble when using JNI to call a C++-compiled DLL from java in Linux: The DLL function didn't execute immediately after the invocation, and was deferred till the end of the Java execution. But all worked well after migrating to windows. This problem made me nearly crazy. Can somebody help me? Thanks in advance.
Linux: fedora core 8, jdk1.6.0_10,
compile options: g++ -fPIC -Wall -c
g++ -shared

It looks like the OP compiled the C source file and linked it into a Windows .dll, which would explain why it worked flawlessly in Windows. (Though I must say the usage of GCC would make someone think it was compiled in Linux for Linux, GCC also exists for Windows, so I'm not sure it's a Windows .dll either...)
@OP: Hello and welcome to the Sun Java forums! This situation requires you to make both a .dll and a .so, for Windows and Linux. You can then refer to the correct library for the operating system using System.loadLibrary("myLibrary"); without any extension.
s
Edited by: Looce on Nov 21, 2008 11:33 AM

Similar Messages

  • Problem when calling a report from java

    Hi all,
    i have created a report using ireport which contains arabic data.
    when i execute the report from ireport to generate a pdf file it works.
    however when i call this report from java i have an exception"
    Could not create the report Could not load the following font :
    pdfFontName : ARIAL.TTF
    pdfEncoding : Identity-H"
    the pdfFont i used it in ireport, also the pdfEncoding.
    did anyone passed with the same problem
    thanks for help

    Hello Oracle experts,
    The parameters are getting passed successfully in my report.
    But I want to know hous to use it in my query group.
    I just want the syntax.
    Thanks

  • Calling multiple DLL from Java and calling same native method

    i have two dll files named DLL_1.dll and DLL_2.dll .
    Both of them contain a native method which has a signature
    JNIEXPORT void JNICALL Java_Database_Notify
    (JNIEnv *, jclass);
    This method is common to both the DLL
    Now i load both of the DLL's using,
    System.loadLibrary("DLL_1");
    System.loadLibrary("DLL_2");
    Both of the DLL are loaded form same Java Application
    But the problem is that , whenever i try to call the Notify Method , it calls the Notify method of DLL_1 only.
    How do i call the Notify Methos of second DLL(i.e DLL_2).
    Is there any reference that i can get to all the DLL files when i load then , so that i can use that reference to invoke the Notify method of that particular DLL.

    i have two dll files named DLL_1.dll and DLL_2.dll .
    Both of them contain a native method which has a
    signature
    JNIEXPORT void JNICALL Java_Database_Notify
    (JNIEnv *, jclass);
    This method is common to both the DLL
    Now i load both of the DLL's using,
    System.loadLibrary("DLL_1");
    System.loadLibrary("DLL_2");
    Both of the DLL are loaded form same Java
    Application
    But the problem is that , whenever i try to call the
    Notify Method , it calls the Notify method of DLL_1
    only.
    How do i call the Notify Methos of second DLL(i.e
    DLL_2).
    Is there any reference that i can get to all the DLL
    files when i load then , so that i can use that
    reference to invoke the Notify method of that
    particular DLL.You need to explain exactly what you are trying to achieve.
    As per the description above it is impossible in java.
    And I didn't say JNI, I said java.
    Your above statement suggests that you think that you can have exactly the same java signature do two different things.
    Note again that I said java not JNI.
    A JNI method is just a tag that represents a java signature. Your description suggests that you are attempting to do it twice.
    There are three possibilities.
    1. Your explanation is incomplete.
    2. You are trying to do something that is impossible in java.
    3. You are trying to solve a problem and your description of your solution is not sufficient to determine what that is (and of course the solution is wrong.)

  • Array limitation when calling VB Dll?

    Today I encountered a problem when calling a Visual Basic DLL in Labview 8.2.1
    I had to pass a 3D Array, with one dimension exceeding 30 000. around that array size I ended up with error -2146828282 when calling the Dll.
    The dll was working fine for weeks. So, is there any limition to the array size, which could cause the error?

    Hi sthu,
    Having 30,000 elements in one dimension of an array should not cause any problems by itself.  The maximum number of elements per dimension in an array is (2^31) – 1 as described in the LabVIEW Help for Grouping Data with Arrays and Clusters.  However, this is also dependent upon the memory available in your computer.  If there is not enough memory available in RAM, you might receive an error when passing the array to the DLL.
    I have included a couple links to pages that discuss LabVIEW memory usage and managing large data sets in LabVIEW.  These might help get your application up and running with the larger array sizes.
    VI Memory Usage
    Managing Large Data Sets in LabVIEW
    Donovan

  • How to call labview DLL from C#, passing char, char[], float[], long, short

    Hi,
    I'm having trouble calling labview dll from C# to perform certain function.
    The function supposed to return the values in the float Analysis[] array. However, when I execute it it only returns zero values.
    It seems that some parameters are not properly passed to the dll.
    Below is the function in the header file:
    void __stdcall Optical_Center(char FileDirectory[], long ImagePtr,
        short int Height, short int Width, char ReadFromFile, float Analysis[],
        long lenAnalysis);
    and my corresponding dll import in c#:
    [DllImport(@"SMIA.dll", CharSet = CharSet.Ansi)]
            public static extern void Optical_Center([MarshalAs(UnmanagedType.LPStr)]string FileDirectory, long ImagePtr,
                short Height, short Width,char  ReadFromFile, IntPtr Analysis,
                long lenAnalysis);
    string str = @"C:\SMIA.raw";
    int len = 3;
    long m_lenAnalysis = 3;
    long m_ImagePtr = 0;
    short m_Height = 2464;
    short m_Width = 3280;
    IntPtr m_PtrArray = Marshal.AllocHGlobal(len * Marshal.SizeOf(typeof(float)));
    char m_ReadFromFile = '1';
    Optical_Center(str,m_ImagePtr,m_Height,m_Width,m_ReadFromFile,m_PtrArray,m_lenAnalysis);
    float[] m_Analysis = new float[len];
    Marshal.Copy(m_PtrArray, floatArray,0,len);
    Marshal.FreeHGlobal(m_PtrArray);
    string printstr = "";
    for (int i=0; i<len; i++)
        printstr = printstr + floatArray[i].ToString() + "\n";       
    MessageBox.Show(printstr);
    Appreciate if anyone can help, thanks.
    KL

    I was just about to post the header file of the DLL, when
    I noticed that there's a function called LVDLLStatus.
    This little thingie turned out to be a rather handy tool.
    With that function I found that in the DLL I had a problem
    with another function that prevented the DLL to be correctly
    loaded.
    This other function in the DLL is for generating digital output
    and it worked as it should, when tested from LV.
    Anyway if someone is interested, I got it working by using
    the LoadLibrary and GetProcAddress function, as in the
    source code thatI posted earlier.
    I will investigate what is wrong with that digital output, and
    post into a another thread if I have problems with that.

  • Calling back c++ method in an exe (not a dll) from java?

    Hi all,
    I have to make an hybrid C++/java from an existing C++
    application that compiled is a big single exe not a dll.
    I'm running under win32.
    The application consists of several windows. The hybrid
    will have widows in C++ and some in java. They have the
    same menu and tool bar. In the C++, there are some
    callbacks called when a button is pressed. How to call
    these callback from java given the fact that the JVM and
    the java classes are launched by the exe file.
    I know how, from C++, start JVM and call my java window.
    I also know how to call a C++ method that is in a dll from
    java. It's from the tutorial
    http://java.sun.com/docs/books/tutorial/native1.1/index.html
    But I don't know how to call a C++ method that is in in an
    exe which has launch a JVM from an object running in this
    JVM.
    Is there somewhere an example like this?
    Thanks,
    Xavier.

    Thanks this helped.
    For those who want a complete example, here it is:
    Tested on XP, java 1.4.2, VC++ 6.0.
    ************ File invoke.cpp *****************************
    #include <stdlib.h>
    #include <jni.h>
    #ifdef _WIN32
    #define PATH_SEPARATOR ';'
    #else /* UNIX */
    #define PATH_SEPARATOR ':'
    #endif
    #define USER_CLASSPATH "." /* where Prog.class is */
    void JNICALL displayHelloWorld(JNIEnv *env, jobject obj)
        printf("Hello world: made by printf from C++\n");
        return;
    void main() {
        JNIEnv *env;
        JavaVM *jvm;
        JavaVMInitArgs vm_args;
        jint res;
        jclass cls;
        jmethodID mid;
        jstring jstr;
        jobjectArray args;
        char classpath[1024];
         int result;
        /* IMPORTANT: specify vm_args version # if you use JDK1.1.2 and beyond */
         JavaVMOption options[3];
         options[0].optionString = "-verbose:gc";
         sprintf (classpath, "-Djava.class.path=%s", USER_CLASSPATH);
         options[1].optionString = classpath;
         options[2].optionString = "-Djava.compiler=NONE";
         vm_args.options = options;
         vm_args.nOptions = 3;
         vm_args.ignoreUnrecognized = JNI_TRUE;
            vm_args.version = JNI_VERSION_1_4;
         /* IMPORTANT: Note that in the Java 2 SDK, there is no longer any need to call
          * JNI_GetDefaultJavaVMInitArgs. It causes a bug
        /* Append USER_CLASSPATH to the end of default system class path */
        /* Create the Java VM */
        res = JNI_CreateJavaVM(&jvm,(void**)&env, &vm_args);
        if (res < 0) {
            fprintf(stderr, "Can't create Java VM\n");
            exit(1);
        cls = env->FindClass("mypackage/Prog");
        if (cls == 0) {
            fprintf(stderr, "Can't find mypackage/Prog class\n");
            exit(1);
       JNINativeMethod nm;
       nm.name = "displayHelloWorld";
       /* method descriptor assigned to signature field */
       nm.signature = "()V";
       nm.fnPtr = displayHelloWorld;
       env->RegisterNatives(cls, &nm, 1);
        mid = env->GetStaticMethodID(cls, "main", "([Ljava/lang/String;)V");
        if (mid == 0) {
            fprintf(stderr, "Can't find Prog.main\n");
            exit(1);
        jstr = env->NewStringUTF(" from C++! calleded by C++, using argument from C++ but java method");
        if (jstr == 0) {
            fprintf(stderr, "Out of memory\n");
            exit(1);
        args = env->NewObjectArray(1,
                            env->FindClass("java/lang/String"), jstr);
        if (args == 0) {
            fprintf(stderr, "Out of memory\n");
            exit(1);
        env->CallStaticVoidMethod(cls, mid, args);
        jvm->DestroyJavaVM();
    }********************* File ./mypackage/Prog.java **************************
    package mypackage;
    public class Prog {
           public native void displayHelloWorld();
        public static void main(String[] args) {
            System.out.println("Hello World" + args[0] +"\n");
            Prog prog = new Prog();
            prog.displayHelloWorld();
            System.out.println("(called from java)");
            System.out.println("\nSo to sumurize:");
            System.out.println(" -1 Starting point is an exe (not DLL, there is no DLL) so C++ code");
            System.out.println(" -2 From C++ call java method using argument from C++");
            System.out.println(" -3 From java, that was launched by the exe, call to");
            System.out.println("    a native using the RegisterNatives in C++\n");
            System.out.println("You got a bidirectional example with as starting point");
            System.out.println("a single exe, launching JVM, loading class call back C++!");
    }******************* Command line for all ****************************************
    javac mypackage/Prog
    cl -I"D:\Program Files\j2sdk1.4.2_03\include" -I"D:\Program Files\j2sdk1.4.2_03\include\win32" -MT
    invoke.cpp -link D:\PROGRA~1\j2sdk1.4.2_03\lib\jvm.lib
    (Remark, the last path is using the short name for "Program Files" because with the blank
    even adding double quotes result into an error)
    You must have jvm.dll in your path for me it's Path=D:\Program Files\j2sdk1.4.2_03\jre\bin\client;
    Then simply call invoke and see the result. :-)

  • Calling external dll from oracle 8i pl/sql

    Hi
    I am facing in calling extrenal dll from pl/sql.
    Steps followed by me are
    1.
    create library crc_lib as
    'D:\ORACLE\ORA81\RDBMS\EXTPROC\EXTPROC\my.DLL';
    2.
    CREATE OR REPLACE FUNCTION check_file_crc (f1 char)
    RETURN BOOLEAN AS
    EXTERNAL LIBRARY CRC_LIB
    NAME "Check_File_CRC"
    LANGUAGE C;
    3. CREATE OR REPLACE PROCEDURE CRC_TEST (f1 varchar2) AS
         RetValue varchar2(100);
    BEGIN
         if check_file_crc(f1) then
              RetValue := '0';
         else
              RetValue := '1';
         end if;
         DBMS_OUTPUT.PUT_LINE(RetValue);
    EXCEPTION
         when others then
         DBMS_OUTPUT.PUT_LINE(sqlerrm|| 'I am in exception');
    END;
    4.ET SERVEROUTPUT ON
    SQL> exec crc_test('C:\file.txt');
    ORA-28576: lost RPC connection to external procedure agent
    I am in exception
    I have tsnames.ora as
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    and listner.ora as
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = D:\Oracle\ora81)
    (PROGRAM = extproc)
    I am unable to resolve problem please help.
    Prashant
    Edited by: prashant13 on Jul 23, 2009 11:27 AM

    See if MOS note      468404.1 proves helpful here (though not meant for your version of Oracle).

  • Calling LV DLL from VB

    I have a vi that initializes, measures, and releases
    an OSA instrument. I want to call this routine from VB.
    I used Standard calling convention when making DLL from LV.
    Here is my VB declaration:
    Private Declare Sub OSAMeasurement Lib "C:\ADE\OSAMeasurement.dll" Alias "OSADFBMeasurement" _
    (ByVal GPIB As Long, _
    ByVal Serial_Number As String, _
    ByVal FileName As String, _
    ByVal File_Path As String, _
    ByVal Start_Wavelength_nm As Double, _
    ByVal Stop_Wavelength_nm As Double, _
    ByVal Level_Scale_dB As Double, _
    ByVal Res_nm As Double, _
    ByVal Peak_Wavelength As Double, _
    ByVal Peak_Level As Double, _
    ByVal SMSR As Double, _
    ByVal FWHM As Double, _
    ByVal Mode_Offset As Double, _
    ByRef Level_Array() As Double, _
    ByRef Wa
    velength_Array() As Double, _
    ByVal Array_Length As Long)
    Here is my VB call:
    Call OSAMeasurement(Form1.OSA.PrimaryAddress, _
    (strOXM & Form1!txtOPMNumber), _
    (CStr(CInt(dblSetVoltage)) & "v_Scan.txt"), _
    (txtDataStoragePath & strOXM & " " & Form1!txtOPMNumber & "\"), _
    1520, 1620, 5, 1, Peak_Wavelength, Peak_Level, _
    SMSR, FWHM, Mode_Offset, _
    Level_Array, Wavelength_Array, 1001)
    I get RunTime Error "49"
    Bad DLL calling convention
    What is wrong?
    Any suggestions/comments?
    Attachments:
    OSA.zip ‏703 KB

    Basically what i want to do is to call the microchip's dll called "mpusbapi.dll" from VB6. This dll is written in C++. This dll has some basic functions of usb like MPUSBRead() , MPUSBWrite , MPUSBOpen() etc.
    I have made a usb data acquisition card and i want to communicate with this card by means of VB 6. Please tell me or send a tutorial of calling a DLL from VB 6.
    Any help greatly appreciated
    Attachments:
    _mpusbapi.cpp ‏42 KB
    _mpusbapi.h ‏19 KB

  • How to call LabVIEW dll from ATL COM dll

    I have tried to call simple LabVIEW 8.6 Dll from win32 test application, class Library.
    I have include LabVIEW generated SharedLib.h file and SharedLib.lib file in the test application which I created as simple win32 console project and also from win32 class Library. I was sucessfully able to call my LabVIEW dll funtion. 
    But when I create ATL COM project and try to add SharedLib.h file and SharedLib.lib file I used to get following erors
    Error 1 error C2733: second C linkage of overloaded function 'StrCatW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 463 
    Error 2 error C2733: second C linkage of overloaded function 'StrCpyW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 464 
    Error 3 error C2733: second C linkage of overloaded function 'StrCpyNW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 465 
    Error 4 error C2733: second C linkage of overloaded function 'StrCmpW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 466 
    Error 5 error C2733: second C linkage of overloaded function 'StrCmpNW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 467 
    these many errors.
    Will some one explain me how to call LabVIEW dll from ATL COM dll.
    Thanks & Regards,
    Jay

    I also had this problem.  My application is unicode-aware, but I was attempting to link it to a library with primitive C-string arguments.  You could dynamically load the DLL as suggested (more work), modify the header files (really not recommended), or if you are feeling lucky you could try fooling the compiler, as I was successfully able to do in Visual Studio 2010, by steering the preprocessor around those functions (assuming you're not using them, of course -- otherwise this probably wouldn't work):
    // prepare for NI extcode.h inclusion. avoid linker errors for this project.
    #define StrCatW(a,b)     IgnoreLinkError_StrCatW(a,b);
    #define StrCpyW(a,b)     IgnoreLinkError_StrCpyW(a,b);
    #define StrCpyNW(a,b,c)  IgnoreLinkError_StrCpyNW(a,b,c);
    #define StrCmpW(a,b)     IgnoreLinkError_StrCmpW(a,b);
    #define StrCmpNW(a,b,c)  IgnoreLinkError_StrCmpNW(a,b,c);
    // header file for my LabView-built DLL (ASCII single-byte character arguments)
    #include <MyLibraryHeader.h>
    // clean up afterwards, put things back to 'normal'
    #undef StrCatW
    #undef StrCpyW
    #undef StrCpyNW
    #undef StrCmpW
    #undef StrCmpNW

  • Is it possible to call VB dll in Java

    Is it possible to call VB dll in Java?
    If yes then How?

    If you mean VB6 than you can call VB Module like a COM object with any Java-COM bridge.
    VB.NET could be called with my Object-Oriented JNI for .NET 1.1/2.0:
    http://www.simtel.net/product.php[id]95126[SiteID]simtel.net
    http://www.simtel.net/product.php[id]98653[SiteID]simtel.net

  • CallerPrincipal when calling one sessionbean from another

    Hi all,
    I have a little problem when calling one sessionbean from another sessionbean. The problem is, that in the method, which is called, is used SessionContext's getCallerPrincipal().getName(). This works great from client, but from other sessionbeans getCallerPrincipal() retuns an "ANONYMOUS" principal. How can I set the correct principal (the principal from the first sessionbean)?
    Thank you
    My env: Glassfish 2.1.1, Netbeans 6.8, Eclipselink 2.0.0, Java 1.6.0.18
    My code:
    @Stateless
    public class ABean implements ASessionRemote{
    @Resource
    SessionContext ctx;
    @Override
    public void aMethod(){
    String name = ctx.getCallerPrincipal().getName(); // the name is ANONYMOUS, when the call is done from other sessionbean
    @Stateless
    public class BBean implements BSessionRemote{
    @Resource
    SessionContext ctx;
    @EJB
    private ASessionRemote aSessionBean;
    @Override
    public void bMethod(){
    aSessionBean.aMethod();
    }

    "This works great from client"
    What do you mean by this, i.e what sort of client are you using (stand alone app, servlet) ?
    what shows up if you printout the caller principal in the calling bean ?
    are the two ejbs in the same ear ?
    what security meta-information are you using in ejb-jar.xml and sun-ejb-jar.xml, if any ?

  • Calling a dll from VB

    Hi all
    I have two questions
    1) I know about the visual Basic 6 but what is measurement studio for visual Basic 6?
    2) Can anyone tell me how to call a dll from Visual Basic 6? Any example for this ?
    Any help greatly appreciated :-)

    Basically what i want to do is to call the microchip's dll called "mpusbapi.dll" from VB6. This dll is written in C++. This dll has some basic functions of usb like MPUSBRead() , MPUSBWrite , MPUSBOpen() etc.
    I have made a usb data acquisition card and i want to communicate with this card by means of VB 6. Please tell me or send a tutorial of calling a DLL from VB 6.
    Any help greatly appreciated
    Attachments:
    _mpusbapi.cpp ‏42 KB
    _mpusbapi.h ‏19 KB

  • [svn:fx-trunk] 13201: Fix RTE when calling PopUpManager.createPopUp() from a module or sub-application.

    Revision: 13201
    Revision: 13201
    Author:   [email protected]
    Date:     2009-12-23 12:16:41 -0800 (Wed, 23 Dec 2009)
    Log Message:
    Fix RTE when calling PopUpManager.createPopUp() from a module or sub-application.
    This fix adds a moduleFactory parameter to PopUpManager.createPopUp() to allow a module or sub-application to specify the style manager to be used. Modules and sub-applications should always pass a moduleFactory to PopUpManager.createPopUp() or PopUpManager.addPopUp() to ensure the correct style manager is used when looking up styles. Otherwise the parent of the pop up is used to determine the style manager.
    QE notes: Please create a PerModuleStyles test that uses the new parameter to createPopUp().
    Doc notes: None.
    Bugs: SDK-24835.
    Reviewer: Alex
    Tests run: checkintests, Managers/PopUpManager
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24835
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IPopUpManager.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManager.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as

  • I have a new MacBook Pro Mid 2012 and it goes into deep sleep when I disconnect if from AC power.

    I have a new 13" MacBook Pro mid 2012 and it goes into deep sleep when it is disconnected from AC power.  I have to press the power button to wake it up.  Is this a known issue or is there something wrong with the MacBook Pro?

    There are a few threads about this around. Its a known issue for 2012 non retina users, not sure about Apple. It should not work this way and Apple has not put out an update to fix it yet. Check out these threads for some workarounds. I think I saw if you reinstall and don't update one of the updates you get normal functionality back. Otherwise there are some terminal changes you can make to make it operate mostly normally. I made some changes in terminal.
    https://discussions.apple.com/thread/4512384
    https://discussions.apple.com/message/20436126#20436126#20436126

  • Video only enabled when call is initiated from one direction across SIP Trunk

    wonder If anyone can shed some light on this.
    I have an issue between two cucm clusters, tied together with a SIP trunk. 
    If we dial from Australia to the US there is two way video and audio.  If the US calls Australia, there is only audio.   I have run a test call from the US through VLT and have found the following SDP's  (see below). When The US make a video enabled call to australia the message "Video is not available, Remote party has video off" on the US phone screen.
    Both clusters have the SIP trunk set up with the same codec settings and video bandwidth between reqions and locations.  the SIP trunk is configured pretty much stock standard and identical at both ends, yet the SDP seem to want to negotiate different Video Parameters  (again see SDP's below). CUCM in australia is 10.61.2.82.
    what other settings can I check to get video to work when calls get initiated from either direction,...................
    both phones are SIP 8941's, again audio is no problem in both directions.
    =======this is from the phone in Australia to the CUCM in australia phone IP 10.61.4.112======================================
    45870304.002 |09:02:07.941 |AppInfo  |SIPTcp - wait_SdlReadRsp: Incoming SIP TCP message from 10.61.4.112 on port 34271 index 53563 with 2089 bytes:
    [344530309,NET]
    SIP/2.0 200 OK
    Via: SIP/2.0/TCP 10.61.2.82:5060;branch=z9hG4bKe0103892bbb75
    From: "Anonymous" <sip:[email protected]>;tag=109791678~1b5af941-cea2-4a00-a0bd-15a532224d7d-59374526
    To: <sip:[email protected]>;tag=5057a887bfdd550c0d321a20-7f843426
    Call-ID: [email protected]
    Date: Wed, 29 Apr 2015 23:02:07 GMT
    CSeq: 101 INVITE
    Server: Cisco-CP8941/9.4.2
    Contact: <sip:[email protected]:34271;transport=tcp>;video
    Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE,SUBSCRIBE,INFO
    Remote-Party-ID: "Dennis Mink - 33935" <sip:[email protected]>;party=called;id-type=subscriber;privacy=off;screen=yes
    Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-7.0.0,X-cisco-xsi-8.5.1
    Allow-Events: kpml,dialog
    Recv-Info: conference
    Recv-Info: x-cisco-conference
    Content-Length: 966
    Content-Type: application/sdp
    Content-Disposition: session;handling=optional
    v=0
    o=Cisco-SIPUA 28123 0 IN IP4 10.61.4.112
    s=SIP Call
    t=0 0
    m=audio 16736 RTP/AVP 0 8 18 102 9 116 101
    c=IN IP4 10.61.4.112
    a=trafficclass:conversational.audio.avconf.aq:admitted
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=no
    a=rtpmap:102 L16/16000
    a=rtpmap:9 G722/8000
    a=rtpmap:116 iLBC/8000
    a=fmtp:116 mode=20
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-15
    a=sendrecv
    m=video 16738 RTP/AVP 126 97
    c=IN IP4 10.61.4.112
    b=TIAS:2000000 
    a=trafficclass:conversational.video.avconf.aq:admitted   <----this is missing from US SDP
    a=rtpmap:126 H264/90000
    a=fmtp:126 profile-level-id=428014;packetization-mode=1;level-asymmetry-allowed=1;max-mbps=36000;max-fs=1200;max-rcmd-nalu-size=1300
    a=imageattr:126 send * recv [x=640,y=480]
    a=rtpmap:97 H264/90000
    a=fmtp:97 profile-level-id=428014;packetization-mode=0;level-asymmetry-allowed=1;max-mbps=36000;max-fs=1200
    a=imageattr:97 send * recv [x=640,y=480]
    a=rtcp-fb:* ccm tmmbr
    a=sendrecv
    ============below is coming from the US (phone IP is 10.1.109.81)================
    04/30/2015 09:02:08.169 Send 10.61.4.112 SIP ACK bfa99a00-541162ed-71da57-52023d0a NotAvail
    SIPTcp - wait_SdlSPISignal: Outgoing SIP TCP message to 10.61.4.112 on port 34271 index 53563 
    [344530326,NET]
    ACK sip:[email protected]:34271;transport=tcp SIP/2.0
    Via: SIP/2.0/TCP 10.61.2.82:5060;branch=z9hG4bKe010481f320b08
    From: "Anonymous" <sip:[email protected]>;tag=109791678~1b5af941-cea2-4a00-a0bd-15a532224d7d-59374526
    To: <sip:[email protected]>;tag=5057a887bfdd550c0d321a20-7f843426
    Date: Wed, 29 Apr 2015 23:02:05 GMT
    Call-ID: [email protected]
    User-Agent: Cisco-CUCM10.0
    Max-Forwards: 70
    CSeq: 101 ACK
    Allow-Events: presence
    Content-Type: application/sdp
    Content-Length: 456
    SDP Message
    ====================================================
    v=0
    o=CiscoSystemsCCM-SIP 109791678 1 IN IP4 10.61.2.82
    s=SIP Call
    c=IN IP4 10.1.109.81
    b=TIAS:8000
    b=AS:8
    t=0 0
    m=audio 16412 RTP/AVP 18 101
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=no
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-15
    a=trafficclass:conversational.audio.aq:admitted   <---what does this do here, and how?
    m=video 0 RTP/SAVP 31 34 96 97      <-----------port 0. why?
    a=rtpmap:31 H261/90000
    a=rtpmap:34 H263/90000
    a=rtpmap:96 H263-1998/90000
    a=rtpmap:97 H264/90000
    a=content:main
    a=inactive

    Hi Dennis,
    On US phone SDP media attribute is inactive.
    a=rtpmap:97 H264/90000
    a=content:main
    a=inactive
    Are you sure that audio works ? Can you please share all the SIP messages of both the scenarios.
    Thanks
    Manish

Maybe you are looking for