<%@ WebService Language="VB" Class="Voice" %>

Imports System
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports MachSol.MachPanel.DBCore
Imports System.Data
Imports System.Data.SqlClient
Imports BusinessObjects.SIP
Imports System.Collections.Generic
Imports BusinessObjects.BusinessObjectsExtension

<WebService(Namespace:="http://machsol.com/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<System.Web.Script.Services.ScriptService()> _
Public Class Voice
    Inherits System.Web.Services.WebService


    <WebMethod(EnableSession:=True)>
    Public Sub SyncCompany(ByVal NodeId As String)
        NodeId = MachSol.MachPanel.Utility.Utility.Sanitize(NodeId)
        BusinessObjects.SIP.Helper.UpdateCompanySyncStatus(NodeId, True)
    End Sub


    <WebMethod(EnableSession:=True)> _
    Public Function UpdateChatSession(DoShow As Boolean) As String
        If DoShow = True Then
            HttpContext.Current.Session("ShowChat") = True
        Else
            HttpContext.Current.Session("ShowChat") = Nothing
        End If

        Return ""
    End Function
End Class
