API

API

With API you can integrate TelTel in any other system. Result data format Json.
Open this example link http://www.teltel.lv/account?apiemail=your@email.com&apipas=yourpassword and system will return your TelTel account settings and SIP users.

 

WebHooks - get incoming and outgoing call notification

To get notifications, please login into your TelTel account and in Settings section add your HTTP address. Example http://www.yourpage.com/teltel?notification=

Notification type:
dial
- receive incoming call or place new outgoing call. This is most used notification!
dial_connected - call is answered;
dial_end - finished call;
incoming_call -  incoming call to your public number (in Call Flow Editor);
status_hangup - when caller or recipient hangup phone;
join_queue - call join queue element.


Call list 

Get call list 
http://www.teltel.lv/account/call_list?apiemail=your@email.com&apipas=yourpassword


Additinal filter parameters

start, end - Date interval. Example start=2016-10-01&end=2016-10-31
sip - Sip user. Example sip=9076162000
offset - Call list page offset. In one page 200 calls.
phone - Filter by phone and callerId
call_type - 1=Answer, 2=Busy, 3=No answer, 4=Cancel, 5=Congestion, 6=Chanunavail, 7=Dont call, 8=Torture, 9=Error, 10=Flood block


Account settings

Get account settings 
http://www.teltel.lv/account/main?apiemail=your@email.com&apipas=yourpassword 

Enable/disable call recording 
http://www.teltel.lv/account/main?apiemail=your@email.com&apipas=yourpassword&action=setrecordcalls&val=true 

Change currency  

http://www.teltel.lv/account/main?apiemail=your@email.com&apipas=yourpassword&action=setCurrency&name=EUR 

Set credit limit warning 
http://www.teltel.lv/account/main?apiemail=your@email.com&apipas=yourpassword&action=setAlertBalance&val=10 


Payments

Get payment list 
http://www.teltel.lv/account/payments?apiemail=your@email.com&apipas=yourpassword 


SIP users

Get user list 
http://www.teltel.lv/account/devices?apiemail=your@email.com&apipas=yourpassword 

Add new user 
http://www.teltel.lv/account/devices?apiemail=your@email.com&apipas=yourpassword&action=add_device 

Set internal number 
http://www.teltel.lv/account/devices?apiemail=your@email.com&apipas=yourpassword&action=device_change_internal_number&device=xxxxx POST value=xxxx 

Set caller id 
http://www.teltel.lv/account/devices?apiemail=your@email.com&apipas=yourpassword&action=device_changecid&device=xxxxx POST value=xxxx 

Set users name 
http://www.teltel.lv/account/devices?apiemail=your@email.com&apipas=yourpassword&action=device_changrealname&device=xxxxx POST value=xxxx 

Set failover alternative phone 
http://www.teltel.lv/account/devices?apiemail=your@email.com&apipas=yourpassword&action=device_changonerror&device=xxxxx POST value=xxxx 

Remove user 
http://www.teltel.lv/account/devices?apiemail=your@email.com&apipas=yourpassword&action=remove_device&name=xxxxx 

Set users password 
http://www.teltel.lv/account/devices?apiemail=your@email.com&apipas=yourpassword&action=device_changepas&device=xxxxx POST value=xxxx 


Virtual DID numbers

Get number and number forwarding list 
http://www.teltel.lv/account/dids?apiemail=your@email.com&apipas=yourpassword 

Add forwarding 
http://www.teltel.lv/account/dids?apiemail=your@email.com&apipas=yourpassword&action=ajax_add_forwarding_add&did_id=xxx&val=xxxx&isvoip=1&priority=0 

Remove forwarding 
http://www.teltel.lv/account/dids?apiemail=your@email.com&apipas=yourpassword&action=remove_dest&id=xxx 

Initialize callback call

http://www.teltel.lv/callback?apiemail=your@email.com&apipas=yourpas&called=yourphone&calling=customersphone&callerid=2222222&callerid_b=2222222 

called - A leg - your regular phone or SIP 
callerid - A leg caller id 
calling - B leg phone number 
callerid_b - B leg caller id - customer will see it 


HTTP notification

Before and after incomming call we can send HTTP request to your system. Contact us for more info.