+++ /dev/null
-<h3>{{ _("Call Log") }}</h3>
-
-<table class="table table-sm table-hover table-striped">
- <thead>
- <tr>
- <th>{{ _("Date") }}</th>
- <th>{{ _("Conversational Partner") }}</th>
- <th>{{ _("Duration") }}</th>
- </tr>
- </thead>
- <tbody>
- {% for entry in calls %}
- {% if entry.sip_code == "200" %}
- <tr>
- {% elif entry.caller == viewer.sip_id %}
- <tr class="warning">
- {% else %}
- <tr class="info">
- {% end %}
- <td>{{ locale.format_date(entry.time, full_format=True, relative=False) }}</td>
- <td>
- {% if entry.called == viewer.sip_id %}
- <span class="glyphicon glyphicon-arrow-left text-success" title="{{ _("incoming") }}"></span>
- {% if entry.caller_account %}
- <a href="/phonebook/{{ entry.caller_account.uid }}">{{ entry.caller_account.name }}</a>
- <span class="text-muted">({{ entry.caller }})</span>
- {% else %}
- {{ entry.caller }}
- {% end %}
- {% elif entry.caller == viewer.sip_id %}
- <span class="glyphicon glyphicon-arrow-right text-info" title="{{ _("outgoing") }}"></span>
- {% if entry.called_account %}
- <a href="/phonebook/{{ entry.called_account.uid }}">{{ entry.called_account.name }}</a>
- <span class="text-muted">({{ entry.called }})</span>
- {% else %}
- {{ entry.called }}
- {% end %}
- {% end %}
- </td>
- <td>
- {% if entry.sip_code == "200" %}
- {{ entry.duration }}
- {% else %}
- {% if entry.reason == "Busy Here" %}
- {{ _("Busy") }}
- {% elif entry.reason in ("Cancelled", "Request Cancelled", "Request Timeout") %}
- {% if entry.caller == viewer.sip_id %}
- {{ _("no answer") }}
- {% else %}
- {{ _("missed call") }}
- {% end %}
- {% else %}
- {{ entry.sip_code }} {{ entry.reason }}
- {% end %}
- {% end %}
- </td>
- </tr>
- {% end %}
- </tbody>
-</table>
+++ /dev/null
-{% if application == "ConfBridge" %}
- {{ _("Conference Room %s") % number }}
-
-{% elif application == "Echo" %}
- {{ _("Echo Test") }}
-
-{% elif application in ("VoiceMail", "VoiceMailMain") %}
- {{ _("Voicemail") }}:
-
- {% if account %}
- <a href="/phonebook/{{ account.uid }}">{{ account.name }}</a>
- <span class="text-muted">({{ number }})</span>
- {% end %}
-
-{% elif account %}
- <i class="fa fa-user"></i>
- <a href="/phonebook/{{ account.uid }}">{{ account.name }}</a>
- <span class="text-muted">({{ number }})</span>
-
-{% elif number == "900" %}
- {{ _("Conference Service") }}
-
-{% elif number in ("980", "981", "982", "983", "984", "985", "986", "987", "988", "989") %}
- {{ _("Parked Calls Extension") }} <span class="text-muted">({{ number }})</span>
-
-{% elif number == "992" %}
- {{ _("Music") }}
-
-{% elif name and number %}
- {{ name }} <span class="text-muted">({{ number }})</span>
-
-{% elif number %}
- {{ number }}
-
-{% else %}
- <span class="text-muted">{{ _("Unknown") }}</span>
-{% end %}
+++ /dev/null
-<h3>{{ _("Lines") }}</h3>
-
-<table class="table table-sm table-hover table-striped">
- <thead>
- <tr>
- {% if show_account %}
- <th>{{ _("Account") }}</th>
- {% end %}
- <th>{{ _("Expires") }}</th>
- <th>{{ _("Location") }}</th>
- <th>{{ _("User Agent") }}</th>
- </tr>
- </thead>
- <tbody>
- {% for line in lines %}
- <tr>
- {% if show_account %}
- <td>
- {% if line.account %}
- <a href="/phonebook/{{ line.account.uid }}">{{ line.account.name }}</a>
- <span class="text-muted">({{ line.account.sip_id }})</span>
- </a>
- {% else %}
- {{ line.username }}@{{ line.domain }}
- {% end %}
- </td>
- {% end %}
-
- <td>{{ locale.format_date(line.expires) }}</td>
- <td>
- {% if line.tls_enabled %}
- <span class="glyphicon glyphicon-lock" title="{{ _("TLS") }}"></span>
- {% end %}
- {{ line.location }}
- </td>
- <td>{{ line.user_agent }}</td>
- </tr>
- {% end %}
- </tbody>
-</table>
+++ /dev/null
-{% if channels %}
- <h3>{{ _("Ongoing Calls") }}</h3>
-
- <table class="table table-hover table-striped">
- <thead>
- <tr>
- <th>{{ _("Caller") }}</th>
- <th></th>
- <th>{{ _("Called") }}</th>
- <th>{{ _("Codec") }}</th>
- <th class="ar">{{ _("Duration") }}</th>
- </tr>
- </thead>
- <tbody>
- {% for c in channels %}
- <tr>
- <td>
- {% module TalkContact(c.caller, name=c.caller_name) %}
- </td>
-
- <td>
- <span class="glyphicon glyphicon-arrow-right text-success"></span>
- </td>
-
- <td>
- {% module TalkContact(c.callee, application=c.application) %}
- </td>
-
- <td>
- {{ c.format }}
- </td>
-
- <td class="ar">{{ format_time(c.duration) }}</td>
-
- <td class="ar">
- <a class="btn btn-xs btn-danger" title="{{ _("Hangup") }}" href="/hangup/{{ c.id }}">
- <i class="fa fa-times"></i>
- </a>
- </td>
- </tr>
- {% end %}
- </tbody>
- </table>
-{% end %}
"FireinfoDeviceTable" : ui_modules.FireinfoDeviceTableModule,
"FireinfoDeviceAndGroupsTable" : ui_modules.FireinfoDeviceAndGroupsTableModule,
"FireinfoGeoTable" : ui_modules.FireinfoGeoTableModule,
- "TalkContact" : ui_modules.TalkContactModule,
- "TalkCallLog" : ui_modules.TalkCallLogModule,
- "TalkLines" : ui_modules.TalkLinesModule,
- "TalkOngoingCalls" : ui_modules.TalkOngoingCallsModule,
},
# Call this when a page wasn't found
#!/usr/bin/python
-
-
import re
import tornado.web
import unicodedata
return self.render_string("modules/progress-bar.html",
colour=colour, value=value)
-
-
-class TalkContactModule(UIModule):
- def render(self, number, name=None, application=None):
- account = self.backend.accounts.get_by_sip_id(number)
-
- return self.render_string("talk/modules/contact.html",
- account=account, number=number, name=name, application=application)
-
-
-class TalkCallLogModule(UIModule):
- def render(self, account=None, viewer=None):
- if (account is None or not self.current_user == account) \
- and not self.current_user.is_admin():
- raise RuntimeException("Insufficient permissions")
-
- if viewer is None:
- viewer = self.current_user
-
- calls = self.backend.talk.get_call_log(account)
-
- return self.render_string("talk/modules/call-log.html",
- calls=calls, viewer=viewer)
-
-
-class TalkLinesModule(UIModule):
- def render(self, account=None, show_account=False):
- if (account is None or not self.current_user == account) \
- and not self.current_user.is_admin():
- raise RuntimeException("Insufficient permissions")
-
- lines = self.backend.talk.get_lines(account)
-
- return self.render_string("talk/modules/lines.html",
- show_account=show_account, lines=lines)
-
-
-class TalkOngoingCallsModule(UIModule):
- def render(self, account=None, debug=False):
- if (account is None or not self.current_user == account) \
- and not self.current_user.is_admin():
- raise RuntimeException("Insufficient permissions")
-
- channels = self.backend.talk.get_channels()
-
- return self.render_string("talk/modules/ongoing-calls.html",
- account=account, channels=channels, debug=debug)