コード例 #1
0
 def bill(self, to, from_):
     syslog.syslog("VBTS " + to + " " + from_)
     try:
         tariff = vbts_credit.sms_cost(self.tariff_type)
         username = vbts_util.messenger.SR_dialdata_get("dial", ("exten", to))
         if (username and username != ""):
             vbts_credit.deduct(tariff, username, "Incoming SMS from %s to %s at %s" % (from_, to, self.tariff_type))
     except Exception as e:
         syslog.syslog("VBTS " + traceback.format_exc(e))
コード例 #2
0
 def bill(self, to, from_):
     syslog.syslog("VBTS " + to + " " + from_)
     try:
         tariff = vbts_credit.sms_cost(self.tariff_type)
         username = vbts_util.messenger.SR_dialdata_get(
             "dial", ("exten", to))
         if (username and username != ""):
             vbts_credit.deduct(
                 tariff, username, "Incoming SMS from %s to %s at %s" %
                 (from_, to, self.tariff_type))
     except Exception as e:
         syslog.syslog("VBTS " + traceback.format_exc(e))
コード例 #3
0
 def process_smscdr(self, from_, service_type, dest):
     cost_in_credits = vbts_credit.sms_cost(service_type)
     vbts_credit.deduct(int(cost_in_credits), from_, "SMS sent to %s at %s" % (dest, service_type))
コード例 #4
0
ファイル: cdr-server.py プロジェクト: sikopet/vbts-plumbing
 def process_smscdr(self, from_, service_type, dest):
     cost_in_credits = vbts_credit.sms_cost(service_type)
     vbts_credit.deduct(int(cost_in_credits), from_,
                        "SMS sent to %s at %s" % (dest, service_type))