Skip to content
/ Billing Public

A very simple billing solution for Freeswitch, Patton and a german pay phone

Notifications You must be signed in to change notification settings

ip6li/Billing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

billing.py

Works with Freeswitch and listens on events CHANNEL_BRIDGE and CHANNEL_UNBRIDGE and calculates telephone fee based on minutes. It send SIP messages to a Patton media gateway so it can send 16khz pulses to a pay phone. Events are logged to syslog.

This was a quick-and-dirty solution for a non-profit organization, so some items are hard coded.

Important Variables

  • send_mail=1 # if you want to get e-mails
  • smtp_from="[email protected]"
  • smtp_to="[email protected]"
  • smtp_relay="localhost"
  • aoc_amount="0.01" # payment unit = one 16khz pulse
  • real_amount="0.05" # must match pay phone configuration
  • ip = "192.168.106.3" # ip address of Patton media gateway
  • host="127.0.0.1" # freeswitch server
  • port="8021" # freeswitch port
  • sip_from=="592" # SIP id of Patton
  • function call: sendAOC("D",con,key,"192.168.106.7"... # IP address of Patton

Look out for regex with +49... which matches for numbers in Germany. Outside Germany you probably want to change this.

ESL

This is a library provided by Freeswitch

About

A very simple billing solution for Freeswitch, Patton and a german pay phone

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages