Index: pjproject/trunk/build.symbian/00.bat
===================================================================
--- pjproject/trunk/build.symbian/00.bat	(revision 1243)
+++ pjproject/trunk/build.symbian/00.bat	(revision 1244)
@@ -1,4 +1,4 @@
 rem set MWSym2Libraries=1
-set EPOCROOT=\Symbian\9.1\S60_3rd\
+rem set EPOCROOT=\Symbian\9.1\S60_3rd\
 rem set EPOCROOT=\Symbian\9.1\S60_3rd_MR_2\
 rem set EPOCROOT=\Symbian\UIQ3SDK\
Index: pjproject/trunk/build.symbian/01.bat
===================================================================
--- pjproject/trunk/build.symbian/01.bat	(revision 1243)
+++ pjproject/trunk/build.symbian/01.bat	(revision 1244)
@@ -2,5 +2,5 @@
 rem set MWSym2Libraries=\Symbian\9.1\S60_3rd\Epoc32\release\winscw\udeb
 
-set EPOCROOT=\Symbian\9.1\S60_3rd\
+rem set EPOCROOT=\Symbian\9.1\S60_3rd\
 rem set EPOCROOT=\Symbian\9.1\S60_3rd_MR_2\
 call abld build -v vs6 udeb
Index: pjproject/trunk/build.symbian/pjlib.mmp
===================================================================
--- pjproject/trunk/build.symbian/pjlib.mmp	(revision 1243)
+++ pjproject/trunk/build.symbian/pjlib.mmp	(revision 1244)
@@ -59,33 +59,33 @@
 DOCUMENT	os_symbian.h
 
-DOCUMENT	pj\\addr_resolv.h
-DOCUMENT	pj\\array.h
-DOCUMENT	pj\\assert.h
-DOCUMENT	pj\\config.h
-DOCUMENT	pj\\config_site.h
-DOCUMENT	pj\\config_site_sample.h
-DOCUMENT	pj\\ctype.h
-DOCUMENT	pj\\errno.h
-DOCUMENT	pj\\except.h
-DOCUMENT	pj\\file_access.h
-DOCUMENT	pj\\file_io.h
-DOCUMENT	pj\\guid.h
-DOCUMENT	pj\\hash.h
-DOCUMENT	pj\\ioqueue.h
-DOCUMENT	pj\\ip_helper.h
-DOCUMENT	pj\\list.h
-DOCUMENT	pj\\lock.h
-DOCUMENT	pj\\log.h
-DOCUMENT	pj\\os.h
+DOCUMENT	pj\addr_resolv.h
+DOCUMENT	pj\array.h
+DOCUMENT	pj\assert.h
+DOCUMENT	pj\config.h
+DOCUMENT	pj\config_site.h
+//DOCUMENT	pj\config_site_sample.h
+DOCUMENT	pj\ctype.h
+DOCUMENT	pj\errno.h
+DOCUMENT	pj\except.h
+DOCUMENT	pj\file_access.h
+DOCUMENT	pj\file_io.h
+DOCUMENT	pj\guid.h
+DOCUMENT	pj\hash.h
+DOCUMENT	pj\ioqueue.h
+DOCUMENT	pj\ip_helper.h
+DOCUMENT	pj\list.h
+DOCUMENT	pj\lock.h
+DOCUMENT	pj\log.h
+DOCUMENT	pj\os.h
 DOCUMENT	pj\\pool.h
 DOCUMENT	pj\\pool_buf.h
-DOCUMENT	pj\\rand.h
-DOCUMENT	pj\\rbtree.h
-DOCUMENT	pj\\sock.h
-DOCUMENT	pj\\sock_select.h
-DOCUMENT	pj\\string.h
-DOCUMENT	pj\\timer.h
-DOCUMENT	pj\\types.h
-DOCUMENT	pj\\unicode.h
+DOCUMENT	pj\rand.h
+DOCUMENT	pj\rbtree.h
+DOCUMENT	pj\sock.h
+DOCUMENT	pj\sock_select.h
+DOCUMENT	pj\string.h
+DOCUMENT	pj\timer.h
+DOCUMENT	pj\types.h
+DOCUMENT	pj\unicode.h
 
 SYSTEMINCLUDE	..\pjlib\include
Index: pjproject/trunk/build.symbian/pjlib_util.mmp
===================================================================
--- pjproject/trunk/build.symbian/pjlib_util.mmp	(revision 1243)
+++ pjproject/trunk/build.symbian/pjlib_util.mmp	(revision 1244)
@@ -34,20 +34,20 @@
 // Header files
 //
-DOCUMENT pjlib-util\\config.h
-DOCUMENT pjlib-util\\crc32.h
-DOCUMENT pjlib-util\\dns.h
-DOCUMENT pjlib-util\\errno.h
-DOCUMENT pjlib-util\\getopt.h
-DOCUMENT pjlib-util\\hmac_md5.h
-DOCUMENT pjlib-util\hmac_sha1.h
-DOCUMENT pjlib-util\md5.h
-DOCUMENT pjlib-util\resolver.h
-DOCUMENT pjlib-util\scanner.h
-DOCUMENT pjlib-util\sha1.h
-DOCUMENT pjlib-util\srv_resolver.h
-DOCUMENT pjlib-util\string.h
-DOCUMENT pjlib-util\stun_simple.h
-DOCUMENT pjlib-util\types.h
-DOCUMENT pjlib-util\xml.h
+//DOCUMENT pjlib-util\\config.h
+//DOCUMENT pjlib-util\\crc32.h
+//DOCUMENT pjlib-util\\dns.h
+//DOCUMENT pjlib-util\\errno.h
+//DOCUMENT pjlib-util\\getopt.h
+//DOCUMENT pjlib-util\\hmac_md5.h
+//DOCUMENT pjlib-util\hmac_sha1.h
+//DOCUMENT pjlib-util\md5.h
+//DOCUMENT pjlib-util\resolver.h
+//DOCUMENT pjlib-util\scanner.h
+//DOCUMENT pjlib-util\sha1.h
+//DOCUMENT pjlib-util\srv_resolver.h
+//DOCUMENT pjlib-util\string.h
+//DOCUMENT pjlib-util\stun_simple.h
+//DOCUMENT pjlib-util\types.h
+//DOCUMENT pjlib-util\xml.h
 
 
Index: pjproject/trunk/build.symbian/pjnath.mmp
===================================================================
--- pjproject/trunk/build.symbian/pjnath.mmp	(revision 1243)
+++ pjproject/trunk/build.symbian/pjnath.mmp	(revision 1244)
@@ -26,14 +26,14 @@
 // Include files
 //
-DOCUMENT pjnath\config.h
-DOCUMENT pjnath\\errno.h
-DOCUMENT pjnath\\ice_session.h
-DOCUMENT pjnath\\ice_strans.h
-DOCUMENT pjnath\\stun_auth.h
-DOCUMENT pjnath\\stun_config.h
-DOCUMENT pjnath\\stun_msg.h
-DOCUMENT pjnath\\stun_session.h
-DOCUMENT pjnath\\stun_transaction.h
-DOCUMENT pjnath\\types.h
+//DOCUMENT pjnath\config.h
+//DOCUMENT pjnath\\errno.h
+//DOCUMENT pjnath\\ice_session.h
+//DOCUMENT pjnath\\ice_strans.h
+//DOCUMENT pjnath\\stun_auth.h
+//DOCUMENT pjnath\\stun_config.h
+//DOCUMENT pjnath\\stun_msg.h
+//DOCUMENT pjnath\\stun_session.h
+//DOCUMENT pjnath\\stun_transaction.h
+//DOCUMENT pjnath\\types.h
 
 
Index: pjproject/trunk/build.symbian/pjproject.cww
===================================================================
--- pjproject/trunk/build.symbian/pjproject.cww	(revision 1243)
+++ pjproject/trunk/build.symbian/pjproject.cww	(revision 1244)
@@ -55,30 +55,5 @@
             <DOCKBARID>59420</DOCKBARID>
             <PCTWIDTH>1.000000</PCTWIDTH>
-            <HGT>506</HGT>
-            <GROUPID>
-                <GIDHIGHPART>4294967294</GIDHIGHPART>
-                <GIDLOWPART>4294967294</GIDLOWPART>
-            </GROUPID>
-        </DOCKINFO>
-    </WINDOW>
-    <WINDOW>
-        <SESSION>-1</SESSION>
-        <EDOCTYPE>0</EDOCTYPE>
-        <PATH USERELATIVEPATHS = "true">pjlib_test.mcp</PATH>
-        <FRAMELOC>
-            <X>0</X>
-            <Y>0</Y>
-        </FRAMELOC>
-        <FRAMESIZE>
-            <W>347</W>
-            <H>128</H>
-        </FRAMESIZE>
-        <DOCKINFO>
-            <STATUS>1</STATUS>
-            <ROW>0</ROW>
-            <COLUMN>0</COLUMN>
-            <DOCKBARID>59420</DOCKBARID>
-            <PCTWIDTH>1.000000</PCTWIDTH>
-            <HGT>506</HGT>
+            <HGT>294</HGT>
             <GROUPID>
                 <GIDHIGHPART>4294967294</GIDHIGHPART>
@@ -105,5 +80,5 @@
             <DOCKBARID>59420</DOCKBARID>
             <PCTWIDTH>1.000000</PCTWIDTH>
-            <HGT>506</HGT>
+            <HGT>294</HGT>
             <GROUPID>
                 <GIDHIGHPART>4294967294</GIDHIGHPART>
@@ -130,5 +105,5 @@
             <DOCKBARID>59420</DOCKBARID>
             <PCTWIDTH>1.000000</PCTWIDTH>
-            <HGT>506</HGT>
+            <HGT>294</HGT>
             <GROUPID>
                 <GIDHIGHPART>4294967294</GIDHIGHPART>
@@ -155,30 +130,5 @@
             <DOCKBARID>59420</DOCKBARID>
             <PCTWIDTH>1.000000</PCTWIDTH>
-            <HGT>506</HGT>
-            <GROUPID>
-                <GIDHIGHPART>4294967294</GIDHIGHPART>
-                <GIDLOWPART>4294967294</GIDLOWPART>
-            </GROUPID>
-        </DOCKINFO>
-    </WINDOW>
-    <WINDOW>
-        <SESSION>-1</SESSION>
-        <EDOCTYPE>0</EDOCTYPE>
-        <PATH USERELATIVEPATHS = "true">pjsdp.mcp</PATH>
-        <FRAMELOC>
-            <X>0</X>
-            <Y>0</Y>
-        </FRAMELOC>
-        <FRAMESIZE>
-            <W>347</W>
-            <H>128</H>
-        </FRAMESIZE>
-        <DOCKINFO>
-            <STATUS>1</STATUS>
-            <ROW>0</ROW>
-            <COLUMN>0</COLUMN>
-            <DOCKBARID>59420</DOCKBARID>
-            <PCTWIDTH>1.000000</PCTWIDTH>
-            <HGT>506</HGT>
+            <HGT>294</HGT>
             <GROUPID>
                 <GIDHIGHPART>4294967294</GIDHIGHPART>
@@ -205,55 +155,5 @@
             <DOCKBARID>59420</DOCKBARID>
             <PCTWIDTH>1.000000</PCTWIDTH>
-            <HGT>506</HGT>
-            <GROUPID>
-                <GIDHIGHPART>4294967294</GIDHIGHPART>
-                <GIDLOWPART>4294967294</GIDLOWPART>
-            </GROUPID>
-        </DOCKINFO>
-    </WINDOW>
-    <WINDOW>
-        <SESSION>-1</SESSION>
-        <EDOCTYPE>0</EDOCTYPE>
-        <PATH USERELATIVEPATHS = "true">pjsip_ua.mcp</PATH>
-        <FRAMELOC>
-            <X>548</X>
-            <Y>123</Y>
-        </FRAMELOC>
-        <FRAMESIZE>
-            <W>400</W>
-            <H>372</H>
-        </FRAMESIZE>
-        <DOCKINFO>
-            <STATUS>1</STATUS>
-            <ROW>0</ROW>
-            <COLUMN>0</COLUMN>
-            <DOCKBARID>59420</DOCKBARID>
-            <PCTWIDTH>1.000000</PCTWIDTH>
-            <HGT>506</HGT>
-            <GROUPID>
-                <GIDHIGHPART>4294967294</GIDHIGHPART>
-                <GIDLOWPART>4294967294</GIDLOWPART>
-            </GROUPID>
-        </DOCKINFO>
-    </WINDOW>
-    <WINDOW>
-        <SESSION>-1</SESSION>
-        <EDOCTYPE>0</EDOCTYPE>
-        <PATH USERELATIVEPATHS = "true">pjsip_simple.mcp</PATH>
-        <FRAMELOC>
-            <X>0</X>
-            <Y>0</Y>
-        </FRAMELOC>
-        <FRAMESIZE>
-            <W>347</W>
-            <H>128</H>
-        </FRAMESIZE>
-        <DOCKINFO>
-            <STATUS>1</STATUS>
-            <ROW>0</ROW>
-            <COLUMN>0</COLUMN>
-            <DOCKBARID>59420</DOCKBARID>
-            <PCTWIDTH>1.000000</PCTWIDTH>
-            <HGT>506</HGT>
+            <HGT>294</HGT>
             <GROUPID>
                 <GIDHIGHPART>4294967294</GIDHIGHPART>
@@ -267,18 +167,18 @@
         <PATH USERELATIVEPATHS = "true">pjsua_lib.mcp</PATH>
         <FRAMELOC>
-            <X>631</X>
-            <Y>228</Y>
-        </FRAMELOC>
-        <FRAMESIZE>
-            <W>400</W>
-            <H>372</H>
-        </FRAMESIZE>
-        <DOCKINFO>
-            <STATUS>1</STATUS>
-            <ROW>0</ROW>
-            <COLUMN>0</COLUMN>
-            <DOCKBARID>59420</DOCKBARID>
-            <PCTWIDTH>1.000000</PCTWIDTH>
-            <HGT>506</HGT>
+            <X>634</X>
+            <Y>231</Y>
+        </FRAMELOC>
+        <FRAMESIZE>
+            <W>347</W>
+            <H>128</H>
+        </FRAMESIZE>
+        <DOCKINFO>
+            <STATUS>1</STATUS>
+            <ROW>0</ROW>
+            <COLUMN>0</COLUMN>
+            <DOCKBARID>59420</DOCKBARID>
+            <PCTWIDTH>1.000000</PCTWIDTH>
+            <HGT>294</HGT>
             <GROUPID>
                 <GIDHIGHPART>4294967294</GIDHIGHPART>
@@ -292,21 +192,71 @@
         <PATH USERELATIVEPATHS = "true">symbian_ua.mcp</PATH>
         <FRAMELOC>
-            <X>568</X>
-            <Y>146</Y>
-        </FRAMELOC>
-        <FRAMESIZE>
-            <W>400</W>
-            <H>372</H>
-        </FRAMESIZE>
-        <DOCKINFO>
-            <STATUS>1</STATUS>
-            <ROW>0</ROW>
-            <COLUMN>0</COLUMN>
-            <DOCKBARID>59420</DOCKBARID>
-            <PCTWIDTH>1.000000</PCTWIDTH>
-            <HGT>506</HGT>
-            <GROUPID>
-                <GIDHIGHPART>4294967294</GIDHIGHPART>
-                <GIDLOWPART>4294967294</GIDLOWPART>
+            <X>571</X>
+            <Y>149</Y>
+        </FRAMELOC>
+        <FRAMESIZE>
+            <W>347</W>
+            <H>128</H>
+        </FRAMESIZE>
+        <DOCKINFO>
+            <STATUS>1</STATUS>
+            <ROW>0</ROW>
+            <COLUMN>0</COLUMN>
+            <DOCKBARID>59420</DOCKBARID>
+            <PCTWIDTH>1.000000</PCTWIDTH>
+            <HGT>294</HGT>
+            <GROUPID>
+                <GIDHIGHPART>4294967294</GIDHIGHPART>
+                <GIDLOWPART>4294967294</GIDLOWPART>
+            </GROUPID>
+        </DOCKINFO>
+    </WINDOW>
+    <WINDOW>
+        <SESSION>-1</SESSION>
+        <EDOCTYPE>1</EDOCTYPE>
+        <PATH USERELATIVEPATHS = "true">..\pjlib\src\pj\sock_symbian.cpp</PATH>
+        <FRAMELOC>
+            <X>8</X>
+            <Y>27</Y>
+        </FRAMELOC>
+        <FRAMESIZE>
+            <W>646</W>
+            <H>464</H>
+        </FRAMESIZE>
+        <DOCKINFO>
+            <STATUS>0</STATUS>
+            <ROW></ROW>
+            <COLUMN></COLUMN>
+            <DOCKBARID></DOCKBARID>
+            <PCTWIDTH></PCTWIDTH>
+            <HGT></HGT>
+            <GROUPID>
+                <GIDHIGHPART></GIDHIGHPART>
+                <GIDLOWPART></GIDLOWPART>
+            </GROUPID>
+        </DOCKINFO>
+    </WINDOW>
+    <WINDOW>
+        <SESSION>-1</SESSION>
+        <EDOCTYPE>1</EDOCTYPE>
+        <PATH USERELATIVEPATHS = "true">..\pjsip-apps\src\symbian_ua\main_symbian.cpp</PATH>
+        <FRAMELOC>
+            <X>8</X>
+            <Y>27</Y>
+        </FRAMELOC>
+        <FRAMESIZE>
+            <W>638</W>
+            <H>437</H>
+        </FRAMESIZE>
+        <DOCKINFO>
+            <STATUS>0</STATUS>
+            <ROW></ROW>
+            <COLUMN></COLUMN>
+            <DOCKBARID></DOCKBARID>
+            <PCTWIDTH></PCTWIDTH>
+            <HGT></HGT>
+            <GROUPID>
+                <GIDHIGHPART></GIDHIGHPART>
+                <GIDLOWPART></GIDLOWPART>
             </GROUPID>
         </DOCKINFO>
@@ -321,24 +271,24 @@
         </FRAMELOC>
         <FRAMESIZE>
-            <W>731</W>
-            <H>822</H>
-        </FRAMESIZE>
-        <DOCKINFO>
-            <STATUS>0</STATUS>
-            <ROW></ROW>
-            <COLUMN></COLUMN>
-            <DOCKBARID></DOCKBARID>
-            <PCTWIDTH></PCTWIDTH>
-            <HGT></HGT>
-            <GROUPID>
-                <GIDHIGHPART></GIDHIGHPART>
-                <GIDLOWPART></GIDLOWPART>
-            </GROUPID>
-        </DOCKINFO>
-    </WINDOW>
-    <WINDOW>
-        <SESSION>-1</SESSION>
-        <EDOCTYPE>1</EDOCTYPE>
-        <PATH USERELATIVEPATHS = "true">..\pjsip\src\pjsua-lib\pjsua_media.c</PATH>
+            <W>565</W>
+            <H>643</H>
+        </FRAMESIZE>
+        <DOCKINFO>
+            <STATUS>0</STATUS>
+            <ROW></ROW>
+            <COLUMN></COLUMN>
+            <DOCKBARID></DOCKBARID>
+            <PCTWIDTH></PCTWIDTH>
+            <HGT></HGT>
+            <GROUPID>
+                <GIDHIGHPART></GIDHIGHPART>
+                <GIDLOWPART></GIDLOWPART>
+            </GROUPID>
+        </DOCKINFO>
+    </WINDOW>
+    <WINDOW>
+        <SESSION>-1</SESSION>
+        <EDOCTYPE>1</EDOCTYPE>
+        <PATH USERELATIVEPATHS = "true">..\pjlib\src\pj\ioqueue_symbian.cpp</PATH>
         <FRAMELOC>
             <X>10</X>
@@ -365,37 +315,62 @@
         <SESSION>-1</SESSION>
         <EDOCTYPE>1</EDOCTYPE>
-        <PATH USERELATIVEPATHS = "true">..\pjmedia\src\pjmedia\nullsound.c</PATH>
-        <FRAMELOC>
-            <X>10</X>
-            <Y>40</Y>
-        </FRAMELOC>
-        <FRAMESIZE>
-            <W>630</W>
-            <H>410</H>
-        </FRAMESIZE>
-        <DOCKINFO>
-            <STATUS>0</STATUS>
-            <ROW></ROW>
-            <COLUMN></COLUMN>
-            <DOCKBARID></DOCKBARID>
-            <PCTWIDTH></PCTWIDTH>
-            <HGT></HGT>
-            <GROUPID>
-                <GIDHIGHPART></GIDHIGHPART>
-                <GIDLOWPART></GIDLOWPART>
-            </GROUPID>
-        </DOCKINFO>
-    </WINDOW>
-    <WINDOW>
-        <SESSION>-1</SESSION>
-        <EDOCTYPE>1</EDOCTYPE>
-        <PATH USERELATIVEPATHS = "true">..\pjmedia\include\pjmedia\sound.h</PATH>
-        <FRAMELOC>
-            <X>10</X>
-            <Y>40</Y>
-        </FRAMELOC>
-        <FRAMESIZE>
-            <W>630</W>
-            <H>410</H>
+        <PATH USERELATIVEPATHS = "true">..\pjlib\src\pj\os_core_symbian.cpp</PATH>
+        <FRAMELOC>
+            <X>6</X>
+            <Y>23</Y>
+        </FRAMELOC>
+        <FRAMESIZE>
+            <W>638</W>
+            <H>437</H>
+        </FRAMESIZE>
+        <DOCKINFO>
+            <STATUS>0</STATUS>
+            <ROW></ROW>
+            <COLUMN></COLUMN>
+            <DOCKBARID></DOCKBARID>
+            <PCTWIDTH></PCTWIDTH>
+            <HGT></HGT>
+            <GROUPID>
+                <GIDHIGHPART></GIDHIGHPART>
+                <GIDLOWPART></GIDLOWPART>
+            </GROUPID>
+        </DOCKINFO>
+    </WINDOW>
+    <WINDOW>
+        <SESSION>-1</SESSION>
+        <EDOCTYPE>1</EDOCTYPE>
+        <PATH USERELATIVEPATHS = "true">..\pjlib\src\pj\os_error_symbian.cpp</PATH>
+        <FRAMELOC>
+            <X>8</X>
+            <Y>27</Y>
+        </FRAMELOC>
+        <FRAMESIZE>
+            <W>638</W>
+            <H>437</H>
+        </FRAMESIZE>
+        <DOCKINFO>
+            <STATUS>0</STATUS>
+            <ROW></ROW>
+            <COLUMN></COLUMN>
+            <DOCKBARID></DOCKBARID>
+            <PCTWIDTH></PCTWIDTH>
+            <HGT></HGT>
+            <GROUPID>
+                <GIDHIGHPART></GIDHIGHPART>
+                <GIDLOWPART></GIDLOWPART>
+            </GROUPID>
+        </DOCKINFO>
+    </WINDOW>
+    <WINDOW>
+        <SESSION>-1</SESSION>
+        <EDOCTYPE>1</EDOCTYPE>
+        <PATH USERELATIVEPATHS = "true">..\pjlib\src\pj\errno.c</PATH>
+        <FRAMELOC>
+            <X>4</X>
+            <Y>23</Y>
+        </FRAMELOC>
+        <FRAMESIZE>
+            <W>646</W>
+            <H>464</H>
         </FRAMESIZE>
         <DOCKINFO>
@@ -436,7 +411,8 @@
             </GROUPID>
         </DOCKINFO>
-            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\Symbian\9.1\S60_3rd\EPOC32\RELEASE\WINSCW\UDEB\euser.dll" MACHINENAME = "Local Windows PC"/>
-            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\Symbian\9.1\S60_3rd\EPOC32\RELEASE\WINSCW\UDEB\ekern.exe" MACHINENAME = "Local Windows PC"/>
-            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\WINDOWS\system32\ntdll.dll" MACHINENAME = "Local Windows PC"/>
+            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\Symbian\9.1\S60_3rd_MR_2\EPOC32\RELEASE\WINSCW\UDEB\euser.dll" MACHINENAME = "Local Windows PC"/>
+            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\Symbian\9.1\S60_3rd_MR_2\EPOC32\RELEASE\WINSCW\UDEB\ekern.exe" MACHINENAME = "Local Windows PC"/>
+            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\WINNT\system32\ntdll.dll" MACHINENAME = "Local Windows PC"/>
+            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\Symbian\9.1\S60_3rd_MR_2\EPOC32\RELEASE\WINSCW\UDEB\econs.dll" MACHINENAME = "Local Windows PC"/>
     </WINDOW>
     <WINDOW>
@@ -449,6 +425,6 @@
         </FRAMELOC>
         <FRAMESIZE>
-            <W>414</W>
-            <H>516</H>
+            <W>390</W>
+            <H>435</H>
         </FRAMESIZE>
         <DOCKINFO>
@@ -489,11 +465,13 @@
             </GROUPID>
         </DOCKINFO>
-            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\Symbian\9.1\S60_3rd\EPOC32\RELEASE\WINSCW\UDEB\euser.dll" MACHINENAME = "Local Windows PC"/>
-            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\Symbian\9.1\S60_3rd\EPOC32\RELEASE\WINSCW\UDEB\ekern.exe" MACHINENAME = "Local Windows PC"/>
-            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\WINDOWS\system32\ntdll.dll" MACHINENAME = "Local Windows PC"/>
+            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\Symbian\9.1\S60_3rd_MR_2\EPOC32\RELEASE\WINSCW\UDEB\euser.dll" MACHINENAME = "Local Windows PC"/>
+            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\Symbian\9.1\S60_3rd_MR_2\EPOC32\RELEASE\WINSCW\UDEB\ekern.exe" MACHINENAME = "Local Windows PC"/>
+            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\WINNT\system32\ntdll.dll" MACHINENAME = "Local Windows PC"/>
+            <SYMBOLICSWINSETTINGS EXECUTABLEPATH = "C:\Symbian\9.1\S60_3rd_MR_2\EPOC32\RELEASE\WINSCW\UDEB\econs.dll" MACHINENAME = "Local Windows PC"/>
     </WINDOW>
     <WINDOW>
         <SESSION>-2147483648</SESSION>
         <EDOCTYPE>23</EDOCTYPE>
+        <DEFAULT>true</DEFAULT>
         <FRAMELOC>
             <X>6</X>
Index: pjproject/trunk/pjlib/include/pj/compat/os_symbian.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/compat/os_symbian.h	(revision 1243)
+++ pjproject/trunk/pjlib/include/pj/compat/os_symbian.h	(revision 1244)
@@ -122,4 +122,5 @@
 #define PJ_TERM_HAS_COLOR	    0
 #define PJ_NATIVE_STRING_IS_UNICODE 0
+#define PJ_NATIVE_ERR_POSITIVE	    0
 
 #define PJ_ATOMIC_VALUE_TYPE	    int
Index: pjproject/trunk/pjlib/include/pj/config.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/config.h	(revision 1243)
+++ pjproject/trunk/pjlib/include/pj/config.h	(revision 1244)
@@ -600,4 +600,12 @@
 
 /**
+ * Is native platform error positive number?
+ * Default: 1 (yes)
+ */
+#ifndef PJ_NATIVE_ERR_POSITIVE
+#   define PJ_NATIVE_ERR_POSITIVE   1
+#endif
+ 
+/**
  * Include error message string in the library (pj_strerror()).
  * This is very much desirable!
Index: pjproject/trunk/pjlib/include/pj/config_site_sample.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/config_site_sample.h	(revision 1243)
+++ pjproject/trunk/pjlib/include/pj/config_site_sample.h	(revision 1244)
@@ -27,4 +27,5 @@
 #endif
 
+
 /*
  * Typical configuration for Symbian OS target
@@ -32,11 +33,15 @@
 #if defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0
 
+    /* We don't want to use float, for now */
 #   undef PJ_HAS_FLOATING_POINT
 #   define PJ_HAS_FLOATING_POINT	0
 
 #   define PJMEDIA_SOUND_IMPLEMENTATION PJMEDIA_SOUND_NULL_SOUND
+
+    /* Disable these */
 #   define PJMEDIA_HAS_LIBRESAMPLE	0
 #   define PJMEDIA_HAS_SPEEX_AEC	0
 
+    /* Disable all codecs but G.711, for now */
 #   define PJMEDIA_HAS_L16_CODEC	0
 #   define PJMEDIA_HAS_GSM_CODEC	0
@@ -44,4 +49,22 @@
 #   define PJMEDIA_HAS_SPEEX_CODEC	0
 
+#   define PJSIP_MAX_PKT_LEN		8000
+
+    /* Since we don't have threads, log buffer can use static buffer */
+#   define PJ_LOG_USE_STACK_BUFFER	0
+
+    /* Symbian has problem with too many large blocks */
+#   define PJSIP_POOL_LEN_ENDPT		1000
+#   define PJSIP_POOL_INC_ENDPT		1000
+#   define PJSIP_POOL_RDATA_LEN		2000
+#   define PJSIP_POOL_RDATA_INC		2000
+#   define PJSIP_POOL_LEN_TDATA		2000
+#   define PJSIP_POOL_INC_TDATA		512
+#   define PJSIP_POOL_LEN_UA		2000
+#   define PJSIP_POOL_INC_UA		1000
+#   define PJSIP_POOL_TSX_LAYER_LEN	256
+#   define PJSIP_POOL_TSX_LAYER_INC	256
+#   define PJSIP_POOL_TSX_LEN		512
+#   define PJSIP_POOL_TSX_INC		128
 #endif
 
Index: pjproject/trunk/pjlib/include/pj/errno.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/errno.h	(revision 1243)
+++ pjproject/trunk/pjlib/include/pj/errno.h	(revision 1244)
@@ -168,5 +168,9 @@
  *		multiple times.
  */
-#define PJ_STATUS_FROM_OS(e) (e == 0 ? PJ_SUCCESS : e + PJ_ERRNO_START_SYS)
+#if PJ_NATIVE_ERR_POSITIVE
+#   define PJ_STATUS_FROM_OS(e) (e == 0 ? PJ_SUCCESS : e + PJ_ERRNO_START_SYS)
+#else
+#   define PJ_STATUS_FROM_OS(e) (e == 0 ? PJ_SUCCESS : PJ_ERRNO_START_SYS - e)
+#endif
 
 /**
@@ -180,5 +184,9 @@
  *		pj_get_os_error or PJ_STATUS_FROM_OS, the results are undefined.
  */
-#define PJ_STATUS_TO_OS(e) (e == 0 ? PJ_SUCCESS : e - PJ_ERRNO_START_SYS)
+#if PJ_NATIVE_ERR_POSITIVE
+#   define PJ_STATUS_TO_OS(e) (e == 0 ? PJ_SUCCESS : e - PJ_ERRNO_START_SYS)
+#else
+#   define PJ_STATUS_TO_OS(e) (e == 0 ? PJ_SUCCESS : PJ_ERRNO_START_SYS - e)
+#endif
 
 
Index: pjproject/trunk/pjlib/src/pj/ioqueue_symbian.cpp
===================================================================
--- pjproject/trunk/pjlib/src/pj/ioqueue_symbian.cpp	(revision 1243)
+++ pjproject/trunk/pjlib/src/pj/ioqueue_symbian.cpp	(revision 1244)
@@ -217,21 +217,6 @@
     }
 
-    if (iStatus==KRequestPending) {
-	SetActive();
-	return PJ_EPENDING;
-    } else {
-    	// Complete immediately (with success or error)
-    	if (iStatus == KErrNone) {
-    	    *size = aBufferPtr_.Length();
-    	    HandleReadCompletion();
-    	    return PJ_SUCCESS;
-    	}
-    	else {
-	    pending_data_.read_.op_key_ = NULL;
-	    pending_data_.read_.addr_ = NULL;
-	    pending_data_.read_.addrlen_ = NULL;
-	    return PJ_RETURN_OS_ERROR(iStatus.Int());
-    	}
-    }
+    SetActive();
+    return PJ_EPENDING;
 }
 
@@ -261,22 +246,6 @@
     sock_->Socket().Accept(blank_sock_, iStatus);
 
-    if (iStatus==KRequestPending) {
-	SetActive();
-	return PJ_EPENDING;
-    } else {
-    	// Accept() completed immediately (with success or error).
-    	if (iStatus == KErrNone) {
-    	    HandleAcceptCompletion();
-    	    return PJ_SUCCESS;
-    	}
-    	else {
-	    pending_data_.accept_.op_key_ = NULL;
-	    pending_data_.accept_.new_sock_ = NULL;
-	    pending_data_.accept_.local_ = NULL;
-	    pending_data_.accept_.remote_ = NULL;
-	    pending_data_.accept_.addrlen_ = NULL;
-	    return PJ_RETURN_OS_ERROR(iStatus.Int());
-    	}
-    }
+    SetActive();
+    return PJ_EPENDING;
 }
 
@@ -287,15 +256,15 @@
 void CIoqueueCallback::HandleReadCompletion() 
 {
-	if (pending_data_.read_.addr_) {
-	    PjSymbianOS::Addr2pj(aAddress_, 
-				 *(pj_sockaddr_in*)pending_data_.read_.addr_);
-	    pending_data_.read_.addr_ = NULL;
-	}
-	if (pending_data_.read_.addrlen_) {
-	    *pending_data_.read_.addrlen_ = sizeof(pj_sockaddr_in);
-	    pending_data_.read_.addrlen_ = NULL;
-	}
+    if (pending_data_.read_.addr_) {
+	PjSymbianOS::Addr2pj(aAddress_, 
+			     *(pj_sockaddr_in*)pending_data_.read_.addr_);
+	pending_data_.read_.addr_ = NULL;
+    }
+    if (pending_data_.read_.addrlen_) {
+	*pending_data_.read_.addrlen_ = sizeof(pj_sockaddr_in);
+	pending_data_.read_.addrlen_ = NULL;
+    }
 	
-	pending_data_.read_.op_key_ = NULL;
+    pending_data_.read_.op_key_ = NULL;
 }
 
Index: pjproject/trunk/pjlib/src/pj/sock_symbian.cpp
===================================================================
--- pjproject/trunk/pjlib/src/pj/sock_symbian.cpp	(revision 1243)
+++ pjproject/trunk/pjlib/src/pj/sock_symbian.cpp	(revision 1244)
@@ -152,6 +152,5 @@
 
     sock_.Socket().RecvFrom(*aDesc, *fromAddr, flags, iStatus);
-    if (iStatus == KRequestPending)
-	SetActive();
+    SetActive();
 }
 
Index: pjproject/trunk/pjmedia/src/pjmedia/nullsound.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/nullsound.c	(revision 1243)
+++ pjproject/trunk/pjmedia/src/pjmedia/nullsound.c	(revision 1244)
@@ -68,5 +68,5 @@
 PJ_DEF(const pjmedia_snd_dev_info*) pjmedia_snd_get_dev_info(unsigned index)
 {
-    PJ_ASSERT_RETURN(index==0, NULL);
+    PJ_ASSERT_RETURN(index==0 || index==-1, NULL);
     return &null_info;
 }
Index: pjproject/trunk/pjsip-apps/src/symbian_ua/main_symbian.cpp
===================================================================
--- pjproject/trunk/pjsip-apps/src/symbian_ua/main_symbian.cpp	(revision 1243)
+++ pjproject/trunk/pjsip-apps/src/symbian_ua/main_symbian.cpp	(revision 1244)
@@ -133,7 +133,52 @@
 
 
+////////////////////////////////////////////////////////////////////////////
+
+class TMyTrapHandler : public TTrapHandler 
+{
+public:
+	void Install();
+	void Uninstall();
+	virtual IMPORT_C void Trap();
+	virtual IMPORT_C void UnTrap();
+	virtual IMPORT_C void Leave(TInt aValue);
+	
+private:
+	TTrapHandler *prev_;
+};
+
+void TMyTrapHandler::Install() {
+	prev_ = User::SetTrapHandler(this);
+}
+
+void TMyTrapHandler::Uninstall() {
+	User::SetTrapHandler(prev_);
+}
+
+IMPORT_C void TMyTrapHandler::Trap() 
+{
+	prev_->Trap();
+}
+
+IMPORT_C void TMyTrapHandler::UnTrap() 
+{
+	prev_->UnTrap();
+}
+
+IMPORT_C void TMyTrapHandler::Leave(TInt aValue) 
+{
+	prev_->Leave(aValue);
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+
 //  Global Functions
 GLDEF_C TInt E32Main()
 {
+    TMyTrapHandler th;
+    
+    th.Install();
+    
     // Create cleanup stack
     //__UHEAP_MARK;
@@ -153,4 +198,6 @@
     delete cleanup;
     //__UHEAP_MARKEND;
+    
+    th.Uninstall();
     return KErrNone;
 }
Index: pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp
===================================================================
--- pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp	(revision 1243)
+++ pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp	(revision 1244)
@@ -302,5 +302,5 @@
 	
 	// Initialize pjsua
-	status  = app_startup(NULL);
+	status  = app_startup("sip:192.168.0.66:5061");
 	if (status != PJ_SUCCESS)
 		return status;
@@ -312,4 +312,5 @@
 	
 	con->Run();
+	
 	asw->Start();
 	
Index: pjproject/trunk/pjsip/include/pjsip/sip_config.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip/sip_config.h	(revision 1243)
+++ pjproject/trunk/pjsip/include/pjsip/sip_config.h	(revision 1244)
@@ -285,17 +285,66 @@
 /* Endpoint. */
 #define PJSIP_MAX_TIMER_COUNT		(2*PJSIP_MAX_TSX_COUNT + 2*PJSIP_MAX_DIALOG_COUNT)
-#define PJSIP_POOL_LEN_ENDPT		(4000)
-#define PJSIP_POOL_INC_ENDPT		(4000)
+
+/**
+ * Initial memory block for the endpoint.
+ */
+#ifndef PJSIP_POOL_LEN_ENDPT
+#   define PJSIP_POOL_LEN_ENDPT		(4000)
+#endif
+
+/**
+ * Memory increment for endpoint.
+ */
+#ifndef PJSIP_POOL_INC_ENDPT
+#   define PJSIP_POOL_INC_ENDPT		(4000)
+#endif
+
 
 /* Transport related constants. */
 
-#define PJSIP_POOL_RDATA_LEN		4000
-#define PJSIP_POOL_RDATA_INC		4000
+/**
+ * Initial memory block for rdata.
+ */
+#ifndef PJSIP_POOL_RDATA_LEN
+#   define PJSIP_POOL_RDATA_LEN		4000
+#endif
+
+/**
+ * Memory increment for rdata.
+ */
+#ifndef PJSIP_POOL_RDATA_INC
+#   define PJSIP_POOL_RDATA_INC		4000
+#endif
+
 #define PJSIP_POOL_LEN_TRANSPORT	512
 #define PJSIP_POOL_INC_TRANSPORT	512
-#define PJSIP_POOL_LEN_TDATA		4000
-#define PJSIP_POOL_INC_TDATA		4000
-#define PJSIP_POOL_LEN_UA		4000
-#define PJSIP_POOL_INC_UA		4000
+
+/**
+ * Initial memory block size for tdata.
+ */
+#ifndef PJSIP_POOL_LEN_TDATA
+#   define PJSIP_POOL_LEN_TDATA		4000
+#endif
+
+/**
+ * Memory increment for tdata.
+ */
+#ifndef PJSIP_POOL_INC_TDATA
+#   define PJSIP_POOL_INC_TDATA		4000
+#endif
+
+/**
+ * Initial memory size for UA layer
+ */
+#ifndef PJSIP_POOL_LEN_UA
+#   define PJSIP_POOL_LEN_UA		4000
+#endif
+
+/**
+ * Memory increment for UA layer.
+ */
+#ifndef PJSIP_POOL_INC_UA
+#   define PJSIP_POOL_INC_UA		4000
+#endif
 
 #define PJSIP_MAX_FORWARDS_VALUE	70
@@ -305,8 +354,33 @@
 
 /* Transaction related constants. */
-#define PJSIP_POOL_TSX_LAYER_LEN	4000
-#define PJSIP_POOL_TSX_LAYER_INC	4000
-#define PJSIP_POOL_TSX_LEN		1536 /* 768 */
-#define PJSIP_POOL_TSX_INC		256
+
+/**
+ * Initial memory size for transaction layer
+ */
+#ifndef PJSIP_POOL_TSX_LAYER_LEN
+#   define PJSIP_POOL_TSX_LAYER_LEN	4000
+#endif
+
+/**
+ * Memory increment for transaction layer.
+ */
+#ifndef PJSIP_POOL_TSX_LAYER_INC
+#   define PJSIP_POOL_TSX_LAYER_INC	4000
+#endif
+
+/**
+ * Initial memory size for a SIP transaction object.
+ */
+#ifndef PJSIP_POOL_TSX_LEN
+#   define PJSIP_POOL_TSX_LEN		1536 /* 768 */
+#endif
+
+/**
+ * Memory increment for transaction object.
+ */
+#ifndef PJSIP_POOL_TSX_INC
+#   define PJSIP_POOL_TSX_INC		256
+#endif
+
 #define PJSIP_MAX_TSX_KEY_LEN		(PJSIP_MAX_URL_SIZE*2)
 
