Zadarma IP Telephony Integration

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815

Zadarma IP Telephony Integration on Website

Zadarma is an international IP telephony provider with virtual PBX (ZCRM), numbers in 100+ countries and WebRTC client for browser. A good option for companies with international clients.

Webhook Notifications

Route::post('/webhooks/zadarma', function (Request $request) {
    // Signature verification
    $data  = $request->except('sign');
    ksort($data);
    $sign  = md5(http_build_query($data) . env('ZADARMA_SECRET'));
    if ($request->sign !== $sign) return response('Invalid sign', 403);

    $event = $data['event'];

    switch ($event) {
        case 'NOTIFY_START':
            // Incoming call
            $caller = $data['caller_id'];
            $this->handleIncomingCall($caller);
            break;

        case 'NOTIFY_END':
            // Call completed
            CallLog::create([
                'zadarma_callid'  => $data['call_id_with_rec'],
                'caller'          => $data['caller_id'],
                'duration'        => $data['duration'],
                'disposition'     => $data['disposition']  // answered | noanswer | busy
            ]);
            break;

        case 'NOTIFY_RECORD':
            // Recording ready
            $recordingUrl = $data['link'];
            CallLog::where('zadarma_callid', $data['call_id_with_rec'])
                   ->update(['recording_url' => $recordingUrl]);
            break;
    }
});

API — Callback Initiation

// Zadarma REST API v1
$params = [
    'from'      => $agentPhone,  // phone number in Zadarma system
    'to'        => $customerPhone,
    'sip_id'    => env('ZADARMA_SIP_ID')
];
ksort($params);
$sign = base64_encode(hash_hmac(
    'sha1',
    env('ZADARMA_KEY') . urldecode(http_build_query($params)) . md5(serialize($params)),
    env('ZADARMA_SECRET')
));

Http::withHeaders([
    'Authorization' => env('ZADARMA_KEY') . ':' . $sign
])->get('https://api.zadarma.com/v1/request/callback/', $params);

WebRTC Call from Browser

Zadarma provides a WebRTC library for calls directly from the browser:

<script src="https://my.zadarma.com/webphoneApi/v3/js/zadarmawebrtc.js"></script>
<script>
var webrtcPhone = new ZadarmaWebRTC({
    sipId:    '{{ $sipId }}',
    sipPass:  '{{ $sipPassword }}',
    onCallStateChange: function(state, data) {
        console.log('Call state:', state);
    }
});
webrtcPhone.dial('79001234567');
</script>

Getting Recordings

// Download call recording
$response = Http::get('https://api.zadarma.com/v1/pbx/record/request/', [
    'call_id'    => $zadarmaCallId,
    'pbx_call_id'=> $pbxCallId
]);
$downloadUrl = $response->json()['link'];

Integration timeline: 2–3 days for full integration with webhooks and click-to-call.