Index: pjproject/trunk/pjsip-apps/src/python/samples/call.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/python/samples/call.py	(revision 2170)
+++ pjproject/trunk/pjsip-apps/src/python/samples/call.py	(revision 2171)
@@ -4,4 +4,18 @@
 #
 # Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 #
 import sys
Index: pjproject/trunk/pjsip-apps/src/python/samples/presence.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/python/samples/presence.py	(revision 2170)
+++ pjproject/trunk/pjsip-apps/src/python/samples/presence.py	(revision 2171)
@@ -4,4 +4,18 @@
 #
 # Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 #
 import sys
Index: pjproject/trunk/pjsip-apps/src/python/samples/registration.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/python/samples/registration.py	(revision 2170)
+++ pjproject/trunk/pjsip-apps/src/python/samples/registration.py	(revision 2171)
@@ -5,4 +5,18 @@
 #
 # Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 #
 import sys
Index: pjproject/trunk/pjsip-apps/src/python/samples/simplecall.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/python/samples/simplecall.py	(revision 2171)
+++ pjproject/trunk/pjsip-apps/src/python/samples/simplecall.py	(revision 2171)
@@ -0,0 +1,88 @@
+# $Id$
+#
+# SIP account and registration sample. In this sample, the program
+# will block to wait until registration is complete
+#
+# Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+#
+import sys
+import pjsua as pj
+
+# Logging callback
+def log_cb(level, str, len):
+    print str,
+
+# Callback to receive events from Call
+class MyCallCallback(pj.CallCallback):
+    def __init__(self, call=None):
+        pj.CallCallback.__init__(self, call)
+
+    # Notification when call state has changed
+    def on_state(self):
+        print "Call is ", self.call.info().state_text,
+        print "last code =", self.call.info().last_code, 
+        print "(" + self.call.info().last_reason + ")"
+        
+    # Notification when call's media state has changed.
+    def on_media_state(self):
+        global lib
+        if self.call.info().media_state == pj.MediaState.ACTIVE:
+            # Connect the call to sound device
+            call_slot = self.call.info().conf_slot
+            lib.conf_connect(call_slot, 0)
+            lib.conf_connect(0, call_slot)
+            print "Hello world, I can talk!"
+
+
+# Check command line argument
+if len(sys.argv) != 2:
+    print "Usage: simplecall.py <dst-URI>"
+    sys.exit(1)
+
+try:
+    # Create library instance
+    lib = pj.Lib()
+
+    # Init library with default config
+    lib.init(log_cfg = pj.LogConfig(level=3, callback=log_cb))
+
+    # Create UDP transport which listens to any available port
+    transport = lib.create_transport(pj.TransportType.UDP)
+    
+    # Start the library
+    lib.start()
+
+    # Create local/user-less account
+    acc = lib.create_account_for_transport(transport)
+
+    # Make call
+    call = acc.make_call(sys.argv[1], MyCallCallback())
+
+    # Wait for ENTER before quitting
+    print "Press <ENTER> to quit"
+    input = sys.stdin.readline().rstrip("\r\n")
+
+    # We're done, shutdown the library
+    lib.destroy()
+    lib = None
+
+except pj.Error, e:
+    print "Exception: " + str(e)
+    lib.destroy()
+    lib = None
+    sys.exit(1)
+
