Rostelecom virtual PBX: dab tsi thiab yuav ua li cas los ntawm API

Rostelecom virtual PBX: dab tsi thiab yuav ua li cas los ntawm API

Kev lag luam niaj hnub pom cov xov tooj hauv xov tooj yog cov cuab yeej siv tsis tu ncua: kev sib txuas lus ntawm tes ua kom muaj kev txav mus los thiab muaj cov neeg ua haujlwm tas li, kev sib tham thiab cov neeg xa xov tam sim yog qhov kev sib txuas lus yooj yim dua thiab nrawm dua. Txhawm rau kom nrog lawv cov neeg sib tw, chaw ua haujlwm PBX tau dhau los ua ntau thiab zoo ib yam rau lawv: lawv tau tsiv mus rau huab, tswj hwm ntawm lub vev xaib sib txuas thiab koom nrog lwm lub tshuab ntawm API. Hauv cov ntawv tshaj tawm no peb yuav qhia koj txog dab tsi ua haujlwm ntawm Rostelecom virtual PBX API muaj thiab yuav ua li cas ua haujlwm nrog lub luag haujlwm tseem ceeb ntawm virtual PBX los ntawm nws.

Lub luag haujlwm tseem ceeb ntawm Rostelecom virtual PBX API yog kev cuam tshuam nrog CRM lossis tuam txhab cov vev xaib. Piv txwv li, API siv "hu rov qab" thiab "hu los ntawm qhov chaw" widgets rau cov kev tswj hwm tseem ceeb: WordPress, Bitrix, OpenCart. API tso cai:

  • Tau txais cov ntaub ntawv, ceeb toom cov xwm txheej thiab hu xov tooj thaum thov los ntawm ib qho chaw sab nraud;
  • Tau txais qhov txuas ib ntus los sau cov lus sib tham;
  • Tswj thiab tau txais kev txwv tsis pub dhau los ntawm cov neeg siv;
  • Tau txais cov ntaub ntawv hais txog tus neeg siv virtual PBX;
  • Thov cov keeb kwm ntawm kev hu xov tooj debits thiab nqi;
  • Upload hu log.

API ua haujlwm li cas

Kev sib koom ua ke API thiab cov txheej txheem sab nraud cuam tshuam nrog ib leeg siv HTTP thov. Hauv tus account tus kheej, tus thawj coj teeb tsa qhov chaw nyob qhov twg kev thov rau API yuav tsum tuaj txog thiab qhov twg thov los ntawm API yuav tsum xa. Lub kaw lus sab nraud yuav tsum muaj chaw nyob pej xeem nkag tau los ntawm Is Taws Nem nrog rau daim ntawv pov thawj SSL uas tau teeb tsa.

Rostelecom virtual PBX: dab tsi thiab yuav ua li cas los ntawm API

Tsis tas li hauv tus account tus kheej, tus thawj tswj hwm tuaj yeem txwv cov peev txheej ntawm kev thov thaum nkag mus rau API los ntawm IP. 

Peb tau txais cov ntaub ntawv hais txog cov neeg siv virtual PBX 

Txhawm rau kom tau txais cov npe ntawm cov neeg siv lossis pab pawg, koj yuav tsum xa daim ntawv thov mus rau virtual PBX siv tus qauv /users_info.

{
        "domain":"example.ru"
}

Hauv kev teb, koj yuav tau txais ib daim ntawv teev npe uas koj tuaj yeem txuag tau.

{
"result":0,
"resultMessage":"",
"users":[
                           {
                            "display_name":"test_user_1",
                            "name":"admin",
                            "pin":^_^quotʚquot^_^,
                           "is_supervisor":true,
                            "is_operator":false,
                            "email":"[email protected]","recording":1
                             },
                            {
                            "display_name":"test_user_2",
                            "name":"test",
                            "pin":^_^quotʿquot^_^,
                            "is_supervisor":true,
                            "is_operator":false,
                            "email":"",
                           "recording":1
                            }
              ],
"groups":
              [
                            {
                            "name":"testAPI",
                            "pin":^_^quotǴquot^_^,
                            "email":"[email protected]",
                            "distribution":1,
                           "users_list":[^_^quotʚquot^_^,^_^quotʿquot^_^]
                            }
              ]

Txoj kev no hla ob arrays. Ib qho nrog cov neeg siv sau npe, ib qho nrog cov pab pawg sau npe. Cov pab pawg kuj muaj sijhawm los qhia txog email uas yuav raug xa hauv qhov kev thov.

Ua cov ntaub ntawv hais txog kev hu tuaj

Kev sib txuas xov tooj ntawm tuam txhab mus rau ntau yam CRM systems txuag lub sijhawm rau cov neeg ua haujlwm uas cuam tshuam nrog cov neeg siv khoom thiab ua kom cov kev hu xov tooj tuaj. Piv txwv li, thaum hu los ntawm tus neeg siv khoom tam sim no, CRM tuaj yeem qhib nws daim npav, thiab los ntawm CRM koj tuaj yeem xa xov mus rau tus neeg siv khoom thiab txuas nws nrog tus neeg ua haujlwm.

Yuav kom tau txais cov ntaub ntawv hais txog API hu, koj yuav tsum siv txoj kev /get_number_info, uas tsim cov npe hu nrog cov ntaub ntawv hais txog cov pab pawg uas hu tau muab faib. Cia peb xav tias tus lej PBX virtual tau txais kev hu los ntawm tus xov tooj 1234567890. Ces PBX yuav xa cov lus thov hauv qab no:

{
        "session_id":"SDsnZugDFmTW7Sec",
        "timestamp":"2019-12-27 15:34:44.461",
        "type":"incoming",
        "state":"new",
        "from_number":"sip:</i^_^gt�lt&i;gt^_^@192.168.0.1",
        "from_pin":"",
        "request_number":"sip:</i^_^gt�lt&i;gt^_^@1192.168.0.1",
        "request_pin":^_^quotɟquot^_^,
        "disconnect_reason":"",
        "is_record":""
}

Tom ntej no koj yuav tsum txuas tus handler /get_number_info. Qhov kev thov yuav tsum raug ua tiav thaum hu xov tooj tuaj txog ntawm txoj kab tuaj ua ntej kev hu xov tooj raug xa mus. Yog tias cov lus teb rau qhov kev thov tsis tau txais nyob rau hauv lub sijhawm teev tseg, ces kev hu xov tooj raug xa mus raws li cov cai tsim nyob rau hauv lub npe.

Piv txwv ntawm tus tuav ntawm CRM sab.

if ($account) {
        	$data = [
            	'result' => 0,
            	'resultMessage' => 'Абонент найден',
            	'displayName' => $account->name,
            	//'PIN' => $crm_users,
        	];
    	} 
        else 
                {
        	$data = [
            	'result' => 0,
            	'resultMessage' => 'Абонент не найден',
            	'displayName' => 'Неизвестный абонент '.$contact,
            	//'PIN' => crm_users,
        	];
    	}
    	return $data;

Teb los ntawm tus tuav.

{
        "result":0,
        "resultMessage":"Абонент найден",
        "displayName":"Иванов Иван Иванович +1</i> 234-56-78-90<i>"
}

Peb taug qab cov xwm txheej thiab rub tawm cov suab kaw

Hauv Rostelecom's virtual PBX, hu xov tooj kaw tau qhib rau hauv koj tus kheej tus account. Siv API, koj tuaj yeem taug qab cov xwm txheej ntawm qhov haujlwm no. Thaum ua qhov kev txiav txim hu rau hauv call_events koj tuaj yeem pom tus chij 'yog_record', uas ceeb toom rau tus neeg siv txog cov xwm txheej ntawm kev nkag: muaj tseeb txhais tau hais tias tus neeg siv hu rau kaw muaj nuj nqi yog enabled.

Txhawm rau rub tawm cov ntaub ntawv kaw, koj yuav tsum siv tus lej hu xov tooj session_id xa ib daim ntawv thov rau api.cloudpbx.rt.ru/get_record.

{
        "session_id":"SDsnZugDFmTW7Sec"
}

Hauv kev teb, koj yuav tau txais qhov txuas ib ntus los rub tawm cov ntaub ntawv nrog cov kaw lus ntawm kev sib tham.

{
        "result": ^_^quot�quot^_^,
        "resultMessage": "Операция выполнена успешно",
    	"url": "https://api.cloudpbx.rt.ru/records_new_scheme/record/download/501a8fc4a4aca86eb35955419157921d/188254033036"
}

Lub sij hawm cia cov ntaub ntawv yog teem rau hauv koj tus kheej account nqis. Tom qab ntawd cov ntaub ntawv yuav raug deleted.

Kev txheeb cais thiab kev tshaj tawm

Hauv koj tus account tus kheej ntawm nplooj ntawv cais koj tuaj yeem pom cov txheeb cais thiab tshaj tawm ntawm txhua qhov kev hu thiab siv cov lim dej raws li xwm txheej thiab sijhawm. Los ntawm API, koj yuav tsum xub ua tus txheej txheem hu nrog txoj kev /call_events:

       {
        "session_id":"SDsnZugDFmTW7Sec",
        "timestamp":"2019-12-27 15:34:59.349",
        "type":"incoming",
        "state":"end",
        "from_number":"sip:</i^_^gt�lt&i;gt^_^@192.168.0.1",
        "from_pin":"",
        "request_number":"sip:</i^_^gt�lt&i;gt^_^@192.168.0.1",
        "request_pin":^_^quotʚquot^_^,
        "disconnect_reason":"",
        "is_record":"true"
        }

Ces hu rau txoj kev hu rau_info ua cov array thiab tso saib hu hauv CRM system.

     {
        "session_id":"SDsnZugDFmTW7Sec"
}

Hauv kev teb, koj yuav tau txais cov ntaub ntawv array uas tuaj yeem ua tiav los khaws cov ntaub ntawv hauv CRM log.

{
        "result":0,
        "resultMessage":"",
        "info":
        {
                "call_type":1,
                "direction":1,
                "state":1,
                "orig_number":"sip:</i^_^gt�lt&i;gt^_^@192.168.0.1",
                "orig_pin":null,
                "dest_number":"sip:</i^_^gt�lt&i;gt^_^@192.168.0.1",
                "answering_sipuri":"[email protected]",
                "answering_pin":^_^quotɟquot^_^,
                "start_call_date":^_^quot�quot^_^,
                "duration":14,
                 "session_log":"0:el:123456789;0:ru:admin;7:ct:admin;9:cc:admin;14:cd:admin;",
                "is_voicemail":false,
                "is_record":true,
                "is_fax":false,
                "status_code":^_^quot�quot^_^,
                "status_string":""
        }
}

Lwm cov txiaj ntsig virtual PBX nta

Dhau li ntawm API, virtual PBX muaj ob peb lwm yam tseem ceeb uas koj tuaj yeem siv. Piv txwv li, qhov no yog ib qho kev sib tham sib lub suab ntawv qhia zaub mov thiab kev koom ua ke ntawm cov xov tooj ntawm tes thiab kev sib txuas lus ruaj khov.

Kev Sib Tham Lub Suab Teb (IVR) yog qhov peb hnov ​​ntawm lub xov tooj ua ntej tus neeg teb. Qhov tseem ceeb, qhov no yog tus neeg siv hluav taws xob uas xa rov qab hu mus rau lub tuam tsev tsim nyog thiab teb qee cov lus nug tau txais. Tsis ntev nws yuav tuaj yeem ua haujlwm nrog IVR ntawm API: tam sim no peb tab tom tsim software uas yuav tso cai rau koj taug qab qhov kev nce qib ntawm kev hu xov tooj los ntawm IVR thiab tau txais cov ntaub ntawv hais txog kev kov-tone keystrokes thaum tus neeg siv khoom nyob hauv lub suab ntawv qhia zaub mov.

Txhawm rau hloov lub tuam txhab xov tooj mus rau lub xov tooj ntawm tes, koj tuaj yeem siv cov ntawv thov softphone lossis cais qhib qhov Kev Pabcuam Txawb Txawb Convergence (FMC). Nrog rau ib qho ntawm txoj kev, hu xov tooj hauv lub network tsis pub dawb, nws tuaj yeem ua haujlwm nrog cov lej luv luv, thiab kev hu tuaj yeem kaw thiab cov txheeb cais dav dav tuaj yeem khaws cia rau lawv. 

Qhov txawv yog tias softphones xav tau Internet sib txuas lus, tab sis lawv tsis khi rau ib tug neeg teb xov tooj, thaum FMC yog khi rau ib tug tshwj xeeb tus neeg teb xov tooj, tab sis yuav siv tau txawm nyob rau hauv lub qub laub khawm xov tooj.

Tau qhov twg los: www.hab.com

Ntxiv ib saib