--- a/iro/anbieter/sipgate.py Sun Feb 07 17:05:24 2010 +0100
+++ b/iro/anbieter/sipgate.py Sun Feb 07 17:08:17 2010 +0100
@@ -43,10 +43,10 @@
def sendSMS(self,sms,recipients):
"""send SMS with $sms to $recipients"""
- logger.debug('sipgate.sendSMS(%s,%s)'%(sms, str(recipients)))
+ logger.debug('sipgate.sendSMS(%s,%s)'%(sms.getContent(), str(recipients)))
args={
"TOS" : "text",
- "Content" : sms.content
+ "Content" : sms.getContent()
}
self.__send(args,recipients)
@@ -94,15 +94,16 @@
for recipient in recipients:
try:
tel = telnumber(recipient)
-
+
if tel in sended: #only send message once per recipient
- continue
+ continue
sended.append(tel)
args["RemoteUri"]="sip:%s%s@sipgate.net"%(tel.land,tel.number)
- xmlrpc_result = self.__send_method(self.samurai.SessionInitiate, args)
+ self.__send_method(self.samurai.SessionInitiate, args)
self.updateStatus(arranged=recipient)
- except NotATelNumber,NoValidStatusCode :
+
+ except NotATelNumber, NoValidStatusCode:
self.updateStatus(failed=recipient)
self.__disconnect()