Skip to content

FreeSwitch PHP API and Angular JS Mod_Callcenter Panel

License

Notifications You must be signed in to change notification settings

doverphone/skydas

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skydas

Skydas is a ESL API and Angluar JS Panel for Freeswitch using PHP and ESL.

  • Uses Slim PHP and FS EventSocket Layer
  • Angualr JS for a Mod_Callcenter Web Interface

Panel

The Panel is all powered by Angular JS and is live updating


Api

  • Here is a list of commands, all data is returned in JSON
  • Require that all POST Requests are in JSON

API Commands

  • /user/:exten -> Returns Username
    {"msg":"Richard Genthner","error":false,"status":200}
    
  • /:queue/agents -> Returns All Agents in Given Queue
    {
    "msg": {
        "1003@default": {
            "name": "Sue Smith",
            "status": "Available",
            "state": "Receiving",
            "no_answer_count": "1",
            "calls_answered": "16",
            "extension": "1003@default",
            "queue": "queue1@default",
            "queue_state": "Offering",
            "level": "1",
            "position": "1"
        }
    },
    "error": false,
    "status": 200
    
  • /:queue/tiers -> Returns All Agent Tiers in Given Queue
    {
    "msg": [
        {
            "queue": "queue1@default",
            "agent": "1006@default",
            "state": "No Answer",
            "level": "1",
            "position": "1"
        },
        {
            "queue": "queue1@default",
            "agent": "1002@default",
            "state": "No Answer",
            "level": "1",
            "position": "1"
        }
    ],
    "error": false,
    "status": 200
    }
    
  • /:queue/callers -> Returns All Callerss in Given Queue
    {
    "msg": [
        {
            "queue": "queue1@default",
            "system": "single_box",
            "uuid": "ce2a7a0c-2ada-11e3-86e3-b1e2db555261",
            "session_uuid": "cacd7fc6-2ada-11e3-86da-b1e2db555261",
            "cid_number": "+15552785621",
            "cid_name": "+15552785621",
            "system_epoch": "1380660500",
            "joined_epoch": "1380660500",
            "rejoined_epoch": "0",
            "bridge_epoch": "1380660522",
            "abandoned_epoch": "0",
            "base_score": "0",
            "skill_score": "0",
            "serving_agent": "1009@default",
            "serving_system": "single_box",
            "state": "Answered"
        }
    ],
    "error": false,
    "status": 200
    }
    
  • /status -> Returns FreeSwitch Status
  {
  "msg": {
      "UP0years,
      0days,
      19hours,
      34minutes,
      45seconds,
      898milliseconds,
      829microseconds": "FreeSWITCH(Version1.2.13gitc26e2ec2013-09-1815: 05: 04Z)isready"
  },
  "error": false,
  "status": 200
  }
  • /tiers -> Returns Teirs for all queues
{
   "msg": [
       {
           "queue": "queue2@default",
           "agent": "1002@default",
           "state": "Ready",
           "level": "1",
           "position": "1"
       },
       {
           "queue": "queue1@default",
           "agent": "1002@default",
           "state": "No Answer",
           "level": "1",
           "position": "1"
       }
   ],
   "error": false,
   "status": 200
}
  • /create/extension -> (POST) requires the following JSON object -> Returns true or false
{
   "access_key": "my super key here",
   "action":"reloadxml",
   "user_id": "9999",
   "params": {
       "password": "123",
       "vm-password": "1234",
       "vm-email-all-messages": "true",
       "vm-notify-mailto": "true",
       "vm-mailto": "john.doe@example.com",
       "vm-attach-file": "true",
       "vm-message-ext": "wav"
   },
   "variables": {
       "toll_allow": "domestic,international,local",
       "accountcode": "9999",
       "user_context": "default",
       "effective_caller_id_name": "John Doe",
       "effective_caller_id_number": "9999",
       "outbound_caller_id_name": "$${outbound_caller_name}",
       "outbound_caller_id_number": "$${outbound_caller_id}",
       "directory_full_name": "John Doe"
   }
}
  • /connect -> (POST) requires the following JSON object
   Comming Soon!
  • /voicemail/greeting -> (POST) requires the following JSON object
{
   "access_key": "my super key",
   "exten": "1009",
   "greeting_number": "1"
} 
  • /validate/:queue -> pass queue name returns true or false
{
       "validate": "true"
}
  • /calls -> Returns a JSON object of calls on the system
{
   "msg": [
       {
           "uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,presence_id,presence_data,callstate,callee_name,callee_num,callee_direction,call_uuid,hostname,sent_callee_name,sent_callee_num,b_uuid,b_direction,b_created,b_created_epoch,b_name,b_state,b_cid_name,b_cid_num,b_ip_addr,b_dest,b_presence_id,b_presence_data,b_callstate,b_callee_name,b_callee_num,b_callee_direction,b_sent_callee_name,b_sent_callee_num,call_created_epoch": "fb2e5b04-3c00-11e3-96f0-1ff78d1619a2,inbound,2013-10-23 12:34:26,1382546066,sofia/internal/1000@fsbox.example.com:5060,CS_EXECUTE,John Doe,1000,24.2.55.181,1000,1000@fsbox.example.com,,UNHOLD,Outbound Call,1003,SEND,fb2e5b04-3c00-11e3-96f0-1ff78d1619a2,fsbox.example.com,Outbound Call,1003,fb530f9e-3c00-11e3-970e-1ff78d1619a2,outbound,2013-10-23 12:34:26,1382546066,sofia/internal/sip:1000@10.122.1.152:56884,CS_EXCHANGE_MEDIA,John Doe<1000>,8243,24.2.55.181,8233,1000@fsbox.example.com,,UNHOLD,Outbound Call,1000,SEND,User<1000>,1000,1382546068"
       }
   ],
   "error": false,
   "status": 200
}
  • /tools/caller/:password/:cid -> Returns a JSON object of caller id information
       {"msg":"WISCASSET,ME 2175550005","error":false,"status":200 }
  • /monitor/:stat -> Returns a Json object of a Digit

Author

Richard 'Moose' Genthner rgenthner@symplicity.com

License

BSD

About

FreeSwitch PHP API and Angular JS Mod_Callcenter Panel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published