[asterisk-scf-commits] asterisk-scf/examples.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Jun 24 11:13:57 CDT 2011


branch "master" has been updated
       via  046cd0f7e7d692991f9e99fd048575f5f23b34a5 (commit)
      from  2cf857cc2de0a12b192c09ae73ee1aa9d63578a3 (commit)

Summary of changes:
 bslistener.py => Bridge_SessionListener.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
 rename bslistener.py => Bridge_SessionListener.py (94%)


- Log -----------------------------------------------------------------
commit 046cd0f7e7d692991f9e99fd048575f5f23b34a5
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri Jun 24 11:13:14 2011 -0500

    Change name of script.
    
    While I know in my head that the "bs" in "bslistener" stood for
    "Bridge Session" that's probably not what others thought, and thus
    I have given it a better name.

diff --git a/bslistener.py b/Bridge_SessionListener.py
similarity index 94%
rename from bslistener.py
rename to Bridge_SessionListener.py
index a5a4af6..d6f540d 100755
--- a/bslistener.py
+++ b/Bridge_SessionListener.py
@@ -63,8 +63,11 @@ class BListener(AsteriskSCF.SessionCommunications.V1.BridgeListener):
     def sessionsAdded(self, sessionBridge, sessions, current = None):
         print "Sessions added to bridge %s" % (sessionBridge.ice_getIdentity().name)
         for s in sessions:
-            s.addListener(AsteriskSCF.SessionCommunications.V1.SessionListenerPrx.uncheckedCast(self.adapter.createDirectProxy(self.adapter.getCommunicator().stringToIdentity(SListenerID))))
-            print "Added ourselves as a listener to session %s with endpoint %s" % (s.ice_getIdentity().name, s.getEndpoint().getId())
+            try:
+                s.addListener(AsteriskSCF.SessionCommunications.V1.SessionListenerPrx.uncheckedCast(self.adapter.createDirectProxy(self.adapter.getCommunicator().stringToIdentity(SListenerID))))
+                print "Added ourselves as a listener to session %s with endpoint %s" % (s.ice_getIdentity().name, s.getEndpoint().getId())
+            except Ice.Exception as ex:
+                pritn "Exception caught while attempting to add ourselves as a SessionListener: " + ex.what()
     def sessionsRemoved(self, sessionBridge, sessions, current = None):
         print "Sessions removed from bridge %s" % (sessionBridge.ice_getIdentity().name)
     def stopped(self, sessionBridge, current = None):

-----------------------------------------------------------------------


-- 
asterisk-scf/examples.git



More information about the asterisk-scf-commits mailing list