Skip to main content
You can find phone implementations in no-payphone/integration/phone
Phone integration can be a little more complicated. To do this we need to add event listeners for payphone events and trigger phone events.

Ready Integrations


Payphone Events


This events will be triggered by payphone.
Triggered when payphone starts the call.

Parameters

  • ctx: {source: number; number: string; targetNumber: string; callId: number}
ctx.source is the caller’s server id.ctx.number is payphone’s number.ctx.targetNumber is the number payphone is calling.ctx.callId is the call Id generated from payphone. (You don’t need to use this)
Triggered when payphone answers the call.

Parameters

  • ctx: {source: number; number: string; targetNumber: string; callId: number}
ctx.source is the caller’s server id.ctx.number is payphone’s number.ctx.targetNumber is the number payphone is calling.ctx.callId is the call Id generated from payphone. (You don’t need to use this)
Triggered when payphone ends the call.

Parameters

  • ctx: {number: string; targetNumber: string}
ctx.number is payphone’s number.ctx.targetNumber is the number payphone is calling.

Phone Events


This events expected to triggered by phone.
Triggered when phone starts the call.

Parameters

  • ctx: {source: number; number: string; targetNumber: string; callId?: number} ctx.source is the caller’s server id. ctx.number is the phone’s number. ctx.targetNumber is the number phone is calling. ctx.callId: Generated call id (If nil payphone will generate itself.).
Triggered when phone answers the call.

Parameters

  • ctx: {source: number; number: number} ctx.source is the caller’s server id. ctx.number is the phone’s number.
Triggered when phone ends the call.

Parameters

  • phoneNumber: string

Example


This is an example for qb-phone. You can find this integration in no-payphone/config/integration/phone/qb-phone.lua