Index: pjproject/branches/projects/aps-direct/pjlib/include/pj/compat/os_symbian.h
===================================================================
--- pjproject/branches/projects/aps-direct/pjlib/include/pj/compat/os_symbian.h	(revision 2490)
+++ pjproject/branches/projects/aps-direct/pjlib/include/pj/compat/os_symbian.h	(revision 2491)
@@ -115,5 +115,5 @@
  * Override features.
  */
-#define PJ_HAS_FLOATING_POINT	    1
+#define PJ_HAS_FLOATING_POINT	    0
 #define PJ_HAS_MALLOC               0
 #define PJ_HAS_SEMAPHORE	    1
Index: pjproject/branches/projects/aps-direct/pjlib/include/pj/config_site_sample.h
===================================================================
--- pjproject/branches/projects/aps-direct/pjlib/include/pj/config_site_sample.h	(revision 2490)
+++ pjproject/branches/projects/aps-direct/pjlib/include/pj/config_site_sample.h	(revision 2491)
@@ -119,7 +119,12 @@
      */
 
+    /* Disable non-Symbian audio devices */
+    #define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO	0
+    #define PJMEDIA_AUDIO_DEV_HAS_WMME		0
+
     /* Select codecs to disable */
     #define PJMEDIA_HAS_L16_CODEC		0
     #define PJMEDIA_HAS_ILBC_CODEC		0
+    #define PJMEDIA_HAS_G722_CODEC		0
 
     /* Fine tune Speex's default settings for best performance/quality */
Index: pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia-codec/amr_helper.h
===================================================================
--- pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia-codec/amr_helper.h	(revision 2490)
+++ pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia-codec/amr_helper.h	(revision 2491)
@@ -823,5 +823,4 @@
 	out_info->mode = FT_;
 	out->size = 5;
-	PJ_ASSERT_RETURN(out->size <= in->size, PJMEDIA_CODEC_EFRMINLEN);
 
 	pj_bzero(out->buf, out->size);
Index: pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/s60_g729_bitstream.h
===================================================================
--- pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/s60_g729_bitstream.h	(revision 2491)
+++ pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/s60_g729_bitstream.h	(revision 2491)
@@ -0,0 +1,171 @@
+#ifndef __BITSTREAM_H_
+#define __BITSTREAM_H_
+
+#define KPackedFrameLen 10
+#define KUnpackedFrameLen 22
+
+// Below values are taken from the APS design document
+const TUint8 KG729FullPayloadBits[] = { 8, 10, 8, 1, 13, 4, 7, 5, 13, 4, 7 };
+const TUint  KNumFullFrameParams = 11;
+const TUint8 KG729SIDPayloadBits[] = { 1, 5, 4, 5 };
+const TUint  KNumSIDFrameParams = 4;
+
+/*! 
+  @class TBitStream
+  
+  @discussion Provides compression from 16-bit-word-aligned G.729 audio frames
+  (used in S60 G.729 DSP codec) to 8-bit stream, and vice versa.
+  */
+class TBitStream
+  {        
+public:
+    /*!
+      @function TBitStream
+      
+      @discussion Constructor
+      */   
+    TBitStream():iDes(iData,KUnpackedFrameLen){}
+    /*!
+      @function CompressG729Frame
+      
+      @discussion Compress either a 22-byte G.729 full rate frame to 10 bytes
+      or a 8-byte G.729 Annex.B SID frame to 2 bytes.
+      @param aSrc Reference to the uncompressed source frame data
+      @param aIsSIDFrame True if the source is a SID frame
+      @result a reference to the compressed frame
+      */
+    const TDesC8& CompressG729Frame( const TDesC8& aSrc, TBool aIsSIDFrame = EFalse );
+    
+    /*!
+      @function ExpandG729Frame
+            
+      @discussion Expand a 10-byte G.729 full rate frame to 22 bytes
+      or a 2-byte G.729 Annex.B SID frame to 8(22) bytes.
+      @param aSrc Reference to the compressed source frame data
+      @param aIsSIDFrame True if the source is a SID frame
+      @result a reference to a descriptor representing the uncompressed frame.
+      Note that SID frames are zero-padded to 22 bytes as well.
+      */
+    const TDesC8& ExpandG729Frame( const TDesC8& aSrc, TBool aIsSIDFrame = EFalse );
+
+private:
+    void Compress( TUint8 aValue, TUint8 aNumOfBits );
+    void Expand( const TUint8* aSrc, TInt aDstIdx, TUint8 aNumOfBits );
+
+private:
+    TUint8      iData[KUnpackedFrameLen];
+    TPtr8       iDes;
+    TInt        iIdx;
+    TInt        iBitOffset;
+    };
+    
+
+const TDesC8& TBitStream::CompressG729Frame( const TDesC8& aSrc, TBool aIsSIDFrame )
+    {
+    // reset data
+    iDes.FillZ(iDes.MaxLength());
+    iIdx = iBitOffset = 0;
+    
+    TInt numParams = (aIsSIDFrame) ? KNumSIDFrameParams : KNumFullFrameParams;
+    const TUint8* p = const_cast<TUint8*>(aSrc.Ptr());
+    
+    for(TInt i = 0, pIdx = 0; i < numParams; i++, pIdx += 2) 
+        {
+        TUint8 paramBits = (aIsSIDFrame) ? KG729SIDPayloadBits[i] : KG729FullPayloadBits[i];        
+        if(paramBits > 8)
+            {
+            Compress(p[pIdx+1], paramBits - 8); // msb
+            paramBits = 8;
+            }            
+        Compress(p[pIdx], paramBits); // lsb    
+        }
+
+    if( iBitOffset )
+        iIdx++;
+        
+    iDes.SetLength(iIdx);
+    return iDes;
+    }
+
+ 
+const TDesC8& TBitStream::ExpandG729Frame( const TDesC8& aSrc, TBool aIsSIDFrame )
+    {
+    // reset data
+    iDes.FillZ(iDes.MaxLength());
+    iIdx = iBitOffset = 0;
+    
+    TInt numParams = (aIsSIDFrame) ? KNumSIDFrameParams : KNumFullFrameParams;
+    const TUint8* p = const_cast<TUint8*>(aSrc.Ptr());
+    
+    for(TInt i = 0, dIdx = 0; i < numParams; i++, dIdx += 2) 
+        {
+        TUint8 paramBits = (aIsSIDFrame) ? KG729SIDPayloadBits[i] : KG729FullPayloadBits[i];
+        if(paramBits > 8)
+          {
+          Expand(p, dIdx+1, paramBits - 8); // msb
+          paramBits = 8;
+          }    
+        Expand(p, dIdx, paramBits); // lsb 
+        }
+        
+    iDes.SetLength(KUnpackedFrameLen);
+    return iDes;
+    }
+
+
+void TBitStream::Compress( TUint8 aValue, TUint8 aNumOfBits )
+  {
+    // clear bits that will be discarded
+    aValue &= (0xff >> (8 - aNumOfBits));
+    
+    // calculate required bitwise left shift
+    TInt shl = 8 - (iBitOffset + aNumOfBits);
+    
+    if (shl == 0) // no shift required
+        { 
+        iData[iIdx++] |= aValue;
+        iBitOffset = 0;
+        }
+    else if (shl > 0) // bits fit into current byte
+        { 
+        iData[iIdx] |= (aValue << shl);
+        iBitOffset += aNumOfBits;
+        }        
+    else        
+        { 
+        iBitOffset = -shl;
+        iData[iIdx] |= (aValue >> iBitOffset); // right shift
+        iData[++iIdx] |= (aValue << (8-iBitOffset)); // push remaining bits to next byte
+        }
+  }
+    
+
+void TBitStream::Expand( const TUint8* aSrc, TInt aDstIdx, TUint8 aNumOfBits )
+  {    
+    TUint8 aValue = aSrc[iIdx] & (0xff >> iBitOffset);
+       
+    // calculate required bitwise right shift
+    TInt shr = 8 - (iBitOffset + aNumOfBits);
+    
+    if (shr == 0) // no shift required
+        { 
+        iData[aDstIdx] = aValue;
+        iIdx++;
+        iBitOffset = 0;
+        }
+    else if (shr > 0) // right shift
+        { 
+        iData[aDstIdx] = (aValue >> shr);
+        iBitOffset += aNumOfBits;
+        }        
+    else // shift left and take remaining bits from the next src byte
+        {
+        iBitOffset = -shr;
+        iData[aDstIdx] = aValue << iBitOffset;                
+        iData[aDstIdx] |= aSrc[++iIdx] >> (8 - iBitOffset);
+        }
+  }
+
+#endif // __BITSTREAM_H_
+    
+// eof
Index: pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/symb_aps_dev.cpp
===================================================================
--- pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/symb_aps_dev.cpp	(revision 2490)
+++ pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/symb_aps_dev.cpp	(revision 2491)
@@ -19,6 +19,6 @@
  */
 #include <pjmedia-audiodev/audiodev_imp.h>
+#include <pjmedia-audiodev/errno.h>
 #include <pjmedia/alaw_ulaw.h>
-#include <pjmedia/errno.h>
 #include <pj/assert.h>
 #include <pj/log.h>
@@ -32,4 +32,11 @@
 #include <sounddevice.h>
 #include <APSClientSession.h>
+#include <pjmedia-codec/amr_helper.h>
+
+/* Pack/unpack G.729 frame of S60 DSP codec, taken from:  
+ * http://wiki.forum.nokia.com/index.php/TSS000776_-_Payload_conversion_for_G.729_audio_format
+ */
+#include "s60_g729_bitstream.h"
+
 
 #define THIS_FILE			"symb_aps_dev.c"
@@ -756,10 +763,4 @@
  * Internal APS callbacks
  */
-
-/* Pack/unpack G.729 frame of S60 DSP codec, taken from:  
- * http://wiki.forum.nokia.com/index.php/TSS000776_-_Payload_conversion_for_G.729_audio_format
- */
-#include "../pjmedia/s60_g729_bitstream.h"
-#include <pjmedia-codec/amr_helper.h>
 
 static void RecCb(TAPSCommBuffer &buf, void *user_data)
Index: pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/symb_mda_dev.cpp
===================================================================
--- pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/symb_mda_dev.cpp	(revision 2490)
+++ pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/symb_mda_dev.cpp	(revision 2491)
@@ -19,4 +19,5 @@
  */
 #include <pjmedia-audiodev/audiodev_imp.h>
+#include <pjmedia-audiodev/errno.h>
 #include <pjmedia/alaw_ulaw.h>
 #include <pj/assert.h>
@@ -25,4 +26,6 @@
 #include <pj/os.h>
 #include <pj/string.h>
+
+#if PJMEDIA_AUDIO_DEV_HAS_SYMB_MDA
 
 /*
@@ -1105,2 +1108,3 @@
 }
 
+#endif /* PJMEDIA_AUDIO_DEV_HAS_SYMB_MDA */
Index: pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia/s60_g729_bitstream.h
===================================================================
--- pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia/s60_g729_bitstream.h	(revision 2490)
+++ 	(revision )
@@ -1,171 +1,0 @@
-#ifndef __BITSTREAM_H_
-#define __BITSTREAM_H_
-
-#define KPackedFrameLen 10
-#define KUnpackedFrameLen 22
-
-// Below values are taken from the APS design document
-const TUint8 KG729FullPayloadBits[] = { 8, 10, 8, 1, 13, 4, 7, 5, 13, 4, 7 };
-const TUint  KNumFullFrameParams = 11;
-const TUint8 KG729SIDPayloadBits[] = { 1, 5, 4, 5 };
-const TUint  KNumSIDFrameParams = 4;
-
-/*! 
-  @class TBitStream
-  
-  @discussion Provides compression from 16-bit-word-aligned G.729 audio frames
-  (used in S60 G.729 DSP codec) to 8-bit stream, and vice versa.
-  */
-class TBitStream
-  {        
-public:
-    /*!
-      @function TBitStream
-      
-      @discussion Constructor
-      */   
-    TBitStream():iDes(iData,KUnpackedFrameLen){}
-    /*!
-      @function CompressG729Frame
-      
-      @discussion Compress either a 22-byte G.729 full rate frame to 10 bytes
-      or a 8-byte G.729 Annex.B SID frame to 2 bytes.
-      @param aSrc Reference to the uncompressed source frame data
-      @param aIsSIDFrame True if the source is a SID frame
-      @result a reference to the compressed frame
-      */
-    const TDesC8& CompressG729Frame( const TDesC8& aSrc, TBool aIsSIDFrame = EFalse );
-    
-    /*!
-      @function ExpandG729Frame
-            
-      @discussion Expand a 10-byte G.729 full rate frame to 22 bytes
-      or a 2-byte G.729 Annex.B SID frame to 8(22) bytes.
-      @param aSrc Reference to the compressed source frame data
-      @param aIsSIDFrame True if the source is a SID frame
-      @result a reference to a descriptor representing the uncompressed frame.
-      Note that SID frames are zero-padded to 22 bytes as well.
-      */
-    const TDesC8& ExpandG729Frame( const TDesC8& aSrc, TBool aIsSIDFrame = EFalse );
-
-private:
-    void Compress( TUint8 aValue, TUint8 aNumOfBits );
-    void Expand( const TUint8* aSrc, TInt aDstIdx, TUint8 aNumOfBits );
-
-private:
-    TUint8      iData[KUnpackedFrameLen];
-    TPtr8       iDes;
-    TInt        iIdx;
-    TInt        iBitOffset;
-    };
-    
-
-const TDesC8& TBitStream::CompressG729Frame( const TDesC8& aSrc, TBool aIsSIDFrame )
-    {
-    // reset data
-    iDes.FillZ(iDes.MaxLength());
-    iIdx = iBitOffset = 0;
-    
-    TInt numParams = (aIsSIDFrame) ? KNumSIDFrameParams : KNumFullFrameParams;
-    const TUint8* p = const_cast<TUint8*>(aSrc.Ptr());
-    
-    for(TInt i = 0, pIdx = 0; i < numParams; i++, pIdx += 2) 
-        {
-        TUint8 paramBits = (aIsSIDFrame) ? KG729SIDPayloadBits[i] : KG729FullPayloadBits[i];        
-        if(paramBits > 8)
-            {
-            Compress(p[pIdx+1], paramBits - 8); // msb
-            paramBits = 8;
-            }            
-        Compress(p[pIdx], paramBits); // lsb    
-        }
-
-    if( iBitOffset )
-        iIdx++;
-        
-    iDes.SetLength(iIdx);
-    return iDes;
-    }
-
- 
-const TDesC8& TBitStream::ExpandG729Frame( const TDesC8& aSrc, TBool aIsSIDFrame )
-    {
-    // reset data
-    iDes.FillZ(iDes.MaxLength());
-    iIdx = iBitOffset = 0;
-    
-    TInt numParams = (aIsSIDFrame) ? KNumSIDFrameParams : KNumFullFrameParams;
-    const TUint8* p = const_cast<TUint8*>(aSrc.Ptr());
-    
-    for(TInt i = 0, dIdx = 0; i < numParams; i++, dIdx += 2) 
-        {
-        TUint8 paramBits = (aIsSIDFrame) ? KG729SIDPayloadBits[i] : KG729FullPayloadBits[i];
-        if(paramBits > 8)
-          {
-          Expand(p, dIdx+1, paramBits - 8); // msb
-          paramBits = 8;
-          }    
-        Expand(p, dIdx, paramBits); // lsb 
-        }
-        
-    iDes.SetLength(KUnpackedFrameLen);
-    return iDes;
-    }
-
-
-void TBitStream::Compress( TUint8 aValue, TUint8 aNumOfBits )
-  {
-    // clear bits that will be discarded
-    aValue &= (0xff >> (8 - aNumOfBits));
-    
-    // calculate required bitwise left shift
-    TInt shl = 8 - (iBitOffset + aNumOfBits);
-    
-    if (shl == 0) // no shift required
-        { 
-        iData[iIdx++] |= aValue;
-        iBitOffset = 0;
-        }
-    else if (shl > 0) // bits fit into current byte
-        { 
-        iData[iIdx] |= (aValue << shl);
-        iBitOffset += aNumOfBits;
-        }        
-    else        
-        { 
-        iBitOffset = -shl;
-        iData[iIdx] |= (aValue >> iBitOffset); // right shift
-        iData[++iIdx] |= (aValue << (8-iBitOffset)); // push remaining bits to next byte
-        }
-  }
-    
-
-void TBitStream::Expand( const TUint8* aSrc, TInt aDstIdx, TUint8 aNumOfBits )
-  {    
-    TUint8 aValue = aSrc[iIdx] & (0xff >> iBitOffset);
-       
-    // calculate required bitwise right shift
-    TInt shr = 8 - (iBitOffset + aNumOfBits);
-    
-    if (shr == 0) // no shift required
-        { 
-        iData[aDstIdx] = aValue;
-        iIdx++;
-        iBitOffset = 0;
-        }
-    else if (shr > 0) // right shift
-        { 
-        iData[aDstIdx] = (aValue >> shr);
-        iBitOffset += aNumOfBits;
-        }        
-    else // shift left and take remaining bits from the next src byte
-        {
-        iBitOffset = -shr;
-        iData[aDstIdx] = aValue << iBitOffset;                
-        iData[aDstIdx] |= aSrc[++iIdx] >> (8 - iBitOffset);
-        }
-  }
-
-#endif // __BITSTREAM_H_
-    
-// eof
Index: pjproject/branches/projects/aps-direct/pjsip-apps/src/symbian_ua/main_symbian.cpp
===================================================================
--- pjproject/branches/projects/aps-direct/pjsip-apps/src/symbian_ua/main_symbian.cpp	(revision 2490)
+++ pjproject/branches/projects/aps-direct/pjsip-apps/src/symbian_ua/main_symbian.cpp	(revision 2491)
@@ -30,5 +30,5 @@
 
 // Needed by APS
-TPtrC APP_UID = _L("A000000D");
+TPtrC APP_UID = _L("200235D3");
 
 
Index: pjproject/branches/projects/aps-direct/pjsip-apps/src/symbian_ua/ua.cpp
===================================================================
--- pjproject/branches/projects/aps-direct/pjsip-apps/src/symbian_ua/ua.cpp	(revision 2490)
+++ pjproject/branches/projects/aps-direct/pjsip-apps/src/symbian_ua/ua.cpp	(revision 2491)
@@ -24,5 +24,6 @@
 
 #define THIS_FILE	"symbian_ua.cpp"
-#define LOG_LEVEL	3
+#define CON_LOG_LEVEL	3 // console log level
+#define FILE_LOG_LEVEL	4 // logfile log level
 
 //
@@ -282,5 +283,5 @@
     
     /* Set log level */
-    pj_log_set_level(LOG_LEVEL);
+    pj_log_set_level(CON_LOG_LEVEL);
 
     /* Create pjsua first! */
@@ -330,6 +331,6 @@
     
     pjsua_logging_config_default(&log_cfg);
-    log_cfg.level = LOG_LEVEL;
-    log_cfg.console_level = LOG_LEVEL;
+    log_cfg.level = FILE_LOG_LEVEL;
+    log_cfg.console_level = CON_LOG_LEVEL;
     log_cfg.cb = &log_writer;
     log_cfg.log_filename = pj_str("C:\\data\\symbian_ua.log");
@@ -486,5 +487,6 @@
 static void PrintMainMenu() 
 {
-    PJ_LOG(3, (THIS_FILE, "\n\n"
+    const char *menu =
+	    "\n\n"
 	    "Main Menu:\n"
 	    "  d    Enable/disable codecs\n"
@@ -500,10 +502,13 @@
 	    "  o    Set account online\n"
 	    "  O    Set account offline\n"
-	    "  w    Quit\n"));
+	    "  w    Quit\n";
+    
+    PJ_LOG(3, (THIS_FILE, menu));
 }
 
 static void PrintCodecMenu() 
 {
-    PJ_LOG(3, (THIS_FILE, "\n\n"
+    const char *menu = 
+	    "\n\n"
 	    "Codec Menu:\n"
 	    "  a    Enable all codecs\n"
@@ -520,5 +525,7 @@
 	    "  p    Enable only GSM\n"
 	    "  t    Enable only PCMU\n"
-	    "  w    Enable only PCMA\n"));
+	    "  w    Enable only PCMA\n";
+    
+    PJ_LOG(3, (THIS_FILE, menu));
 }
 
