Configures Asterisk PBX integration with CrestApps Orchard Core Telephony via ARI, covering Stasis apps, PJSIP Realtime, WebRTC, TURN, voicemail routing, and Contact Center adapters.
Ships in crestapps-orchardcore. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an Orchard Core expert. Generate accurate configuration, recipes, and troubleshooting guidance for the CrestApps Asterisk provider. It controls calls server-side through ARI over HTTP basic authentication, so ARI credentials never reach the browser. The provider-neutral soft phone, hub, and provider contracts are covered by orchardcore-telephony.
CrestApps.OrchardCore.Asterisk in the web/startup project and enable CrestApps.OrchardCore.Asterisk. It depends on CrestApps.OrchardCore.Telephony, which enables the settings screen.CrestApps.OrchardCore.ContactCenter.Voice is also enabled, and the media adapter when CrestApps.OrchardCore.ContactCenter.Voice.Media is enabled. Install the Contact Center package in the startup project for those.appsettings.json.{ "steps": [...] }.{
"steps": [
{
"name": "Feature",
"enable": [
"CrestApps.OrchardCore.Telephony",
"CrestApps.OrchardCore.Telephony.SoftPhone",
"CrestApps.OrchardCore.Asterisk"
],
"disable": []
}
]
}
| Provider | Technical name | Configured by | Available when |
|---|---|---|---|
| Asterisk | Asterisk | Settings > Communication > Telephony, Asterisk tab (AsteriskSettings) | Enabled and BaseUrl, UserName, password and ApplicationName are set |
| Default Asterisk | Default Asterisk | Shell configuration section CrestApps:Asterisk:Default (DefaultAsteriskOptions) | BaseUrl, UserName, Password, and ApplicationName all have values, on every tenant that enables the module |
Both contribute to TelephonyProviderOptions through AsteriskProviderOptionsConfigurations. Saving the settings or importing them calls IOptionsUpdateNotifier.RequestUpdate<TelephonyProviderOptions>(), so the provider map refreshes without a tenant restart. Enabling Asterisk with no default provider makes it the default; disabling it while it is the default clears the default.
The provider advertises Dial, Hangup, SendDigits, ReceiveCalls, Hold, Resume, Mute, Merge, and Directory (ARI endpoints). It adds Transfer when the endpoint template resolves to a Local/...@context dialplan route, and Voicemail when a voicemail context and extension template are configured. It does not advertise AttendedTransfer, ExtensionDial, or ExtensionConference yet.
Audio: the provider reports TelephonyAudioCapabilities.Browser with the sipjs browser adapter when complete WebRTC settings are present, and None otherwise (ARI controls the call and audio stays on the PBX endpoint).
| Setting | Property | Notes |
|---|---|---|
| Enable Asterisk provider | IsEnabled | Makes the provider selectable |
| ARI base URL | BaseUrl | For example http://localhost:8088/ari/; /ari is appended when missing |
| ARI user name and password | UserName, Password | Password stored encrypted |
| Stasis application name | ApplicationName | Required, must match the dialplan Stasis() application |
| Endpoint template | EndpointTemplate | {number} placeholder, for example PJSIP/{number}@phones or Local/{number}@default |
| Outbound caller id | OutboundCallerId | Optional |
| Dial timeout | TimeoutSeconds | Default 30 |
| Voicemail context, extension template, priority | VoicemailContext, VoicemailExtensionTemplate, VoicemailPriority | Template tokens such as {voicemailRecipientUserName}, {voicemailRecipientUserId}, {calledAddress}, {queueName} |
| SIP WebSocket URL, SIP domain | WebSocketUrl, SipDomain | Required for browser audio; wss:// only |
| ICE server URLs, TURN shared secret, ICE transport policy | TurnUrls, TurnSharedSecret, IceTransportPolicy | Policy all (default) or relay; secret stored encrypted |
| Browser audio codecs | WebRtcCodecs | Default opus,g722,ulaw |
| PJSIP credential lifetime, contact expiration | PjsipCredentialLifetimeMinutes, PjsipContactExpirationSeconds | Defaults 15 minutes and 120 seconds |
| PJSIP Realtime provider, connection string, table prefix | PjsipRealtimeProviderInvariantName, PjsipRealtimeConnectionString, PjsipRealtimeTablePrefix | Required for browser audio; the prefix must be a strict SQL identifier with an optional schema. part |
Settings export through the Asterisk Settings deployment step and import through the AsteriskSettings recipe step. Password, TurnSharedSecret, and PjsipRealtimeConnectionString are never exported; a hand-written recipe may supply them in clear text and they are encrypted on import. Members the step omits keep their stored values.
{
"steps": [
{
"name": "AsteriskSettings",
"Settings": {
"IsEnabled": true,
"BaseUrl": "https://pbx.example.com/ari/",
"UserName": "orchard",
"Password": "supply-in-clear-text-or-omit",
"ApplicationName": "orchard-tenant-a",
"EndpointTemplate": "PJSIP/{number}@phones",
"TimeoutSeconds": 30,
"WebSocketUrl": "wss://pbx.example.com:8089/ws",
"SipDomain": "pbx.example.com",
"IceTransportPolicy": "all",
"WebRtcCodecs": "opus,g722,ulaw"
}
}
]
}
The import and the settings screen both refuse to disable the provider or change its ARI URL or Stasis application while calls are still bound to it.
{
"OrchardCore": {
"CrestApps": {
"Asterisk": {
"Default": {
"BaseUrl": "http://pbx.example.com:8088/ari/",
"UserName": "<ari-user>",
"Password": "<ari-password>",
"ApplicationName": "crestapps-telephony",
"EndpointTemplate": "Local/{number}@default",
"TimeoutSeconds": 30,
"VoicemailContext": "crestapps-voicemail",
"VoicemailExtensionTemplate": "{voicemailRecipientUserName}",
"VoicemailPriority": 1
}
}
}
}
}
OrchardCore__CrestApps__Asterisk__Default__BaseUrl=http://pbx.example.com:8088/ari/
OrchardCore__CrestApps__Asterisk__Default__Password=<ari-password>
<ApplicationName>-<ShellName> (for example crestapps-telephony-Default, crestapps-telephony-blog1) so Stasis event streams stay isolated. Inbound dialplans must route each tenant's calls to Stasis(<ApplicationName>-<ShellName>).Production environment a tenant refuses to start when this section holds a development credential published in the repository.Section CrestApps:Asterisk:Coordination binds AsteriskCoordinationOptions:
| Key | Default |
|---|---|
CredentialLockTimeout | 00:00:05 |
CredentialLockExpiration | 00:00:30 |
ChannelBindingCreateLockTimeout | 00:00:10 |
PendingReclamationThreshold | 00:05:00 |
HttpTotalRequestTimeout | 00:00:30 |
HttpAttemptTimeout | 00:00:10 |
RealtimeEventBufferCapacity | 1000 (at most 100000) |
RealtimeEventBackpressureTimeout | 00:00:05 |
MaxRealtimeMessageBytes | 1048576 |
The ARI HTTP client retries only safe methods, so a lost response to an originate can never place a second call.
chan_pjsip over WSS, DTLS-SRTP and ICE; Orchard does not relay agent RTP.wss:// URL, SIP domain, codecs, positive credential lifetime and contact expiration, and PJSIP Realtime provider and connection string are all set. Missing values make browser audio unavailable instead of failing startup.ps_endpoints, ps_auths, and ps_aors rows. Each user is capped at a few live credentials (the oldest is revoked first), and signing out revokes all of them.use-auth-secret credential (username {unixExpiry}:{tenant}:{session}, credential Base64(HMAC-SHA1(secret, username))); set the same value as coturn static-auth-secret.stun:turn.example.com:3478
turn:turn.example.com:3478?transport=udp
turns:turn.example.com:5349?transport=tcp
POST /channels (originate), DELETE /channels/{id}, POST /channels/{id}/answer, hold, mute?direction=both, continue (Local-route blind transfer and voicemail), variable, dtmf, POST /bridges with addChannel (merge), and GET /endpoints (directory).ProviderVoiceEvent, updates call history, and pushes state to the soft phone. It reconnects with jittered backoff and reconciles after each connect. Events from the Default Asterisk connection are tagged with the canonical Asterisk provider identity.CRESTAPPS_STATE_ONHOLD and CRESTAPPS_STATE_MUTED channel variables. An ARI 404 is authoritative: the orphaned record is removed and the soft phone is told the call ended.Send to voicemail copies the provider-neutral call metadata (voicemailRecipientUserId, voicemailRecipientUserName, voicemailRecipientDisplayName, calledAddress, callerAddress, queueId, queueName) into channel variables prefixed CRESTAPPS_METADATA_ (for example CRESTAPPS_METADATA_VOICEMAILRECIPIENTUSERNAME) and continues the channel into the configured voicemail context, extension, and priority. Map those to mailboxes in the dialplan with a fallback.
These adapters are integration glue described here from the provider side; queues, routing, recording governance, supervision, and the media session API are in orchardcore-contact-center.
CrestApps.OrchardCore.ContactCenter.Voice) registers AsteriskContactCenterVoiceProvider. It advertises the ServerSideAcd delivery model, bridge recording, supervisor monitor, whisper and barge, blind transfer to another agent, attended consult phases, and multi-party conference on the canonical conversation bridge. It also registers recording ingest jobs and per-tenant channel bindings, and fails closed on a channel the current tenant does not own. Connecting a parked call to a browser agent currently returns agent_bridge_unavailable rather than a false success. Transfers to a queue, external number, or entry point return a confirmed failure.CrestApps.OrchardCore.ContactCenter.Voice.Media, an opt-in feature an administrator turns on from the Features page; its transport certification is still pending and it is outside the GA-Core profiles) registers AsteriskContactCenterVoiceMediaProvider. It uses ARI External Media over RTP/UDP with G.711 mu-law, 8 kHz mono, attached to the call bridge. The session request must carry externalHost (AsteriskConstants.ExternalMediaHostMetadataKey); optional bindAddress and bindPort. It is not production-certified; isolate the unencrypted RTP path on a private network and pin the session to its node.orchardcore-telephony-telnyx, orchardcore-omnichannel-voice).src/Startup/CrestApps.Aspire.AppHost provisions an Asterisk container (with coturn) and injects the Default Asterisk environment variables; the CrestApps.OrchardCore.Cms.Web launch profile injects the same values. The demo Local/{number}@default route answers, plays a tone, and echoes.src/Startup/CrestApps.OrchardCore.Asterisk.Web is a development-only dashboard and inbound simulator. It refuses to start outside Development; supply AsteriskWeb:AsteriskUserName and AsteriskWeb:AsteriskPassword through user secrets.GET /ari/asterisk/info, GET /ari/channels, and GET /ari/bridges.AsteriskDiagnostics publishes the CrestApps.OrchardCore.Asterisk meter (no activity source; matched by CrestApps.OrchardCore.*, see orchardcore-opentelemetry). Every instrument is tagged provider, a technology name, so on a node hosting several Asterisk tenants the counts aggregate per process.
| Instrument | Kind | Measures |
|---|---|---|
crestapps.asterisk.realtime.connected | UpDownCounter | Listeners currently connected. Zero means call events are not arriving: alert on it |
crestapps.asterisk.realtime.connections | Counter | ARI event-stream connections made, first and every reconnection |
crestapps.asterisk.realtime.reconnect_attempts | Counter | Attempts to re-establish the stream; a steady rate means churn and possibly missed events between sweeps |
crestapps.asterisk.realtime.ingestion.saturated | Counter | Episodes where the ingestion buffer filled (CrestApps:Asterisk:Coordination:RealtimeEventBufferCapacity, default 1000) |
crestapps.asterisk.realtime.events | Counter | ARI events by event_type and result (applied, ignored, failed) |
crestapps.asterisk.realtime.event.lag | Histogram (s) | An event's timestamp to its dispatch |
crestapps.asterisk.realtime.last_event_age, .ingestion.queue_depth | ObservableGauge | Staleness and buffered events of the connected listeners |
The Telephony meter adds crestapps.telephony.reconcile.corrections (calls the inbound channel sweep ended), crestapps.telephony.softphone.credentials (PJSIP credentials) and crestapps.telephony.recording.ingest.* (see orchardcore-telephony).
CrestApps.OrchardCore.Telephony.Admin from recipes; the Asterisk tab is registered by the main Asterisk Startup, and AsteriskAdminStartup is gone.Stasis(<ApplicationName>-Default).TelephonyProviderOptions must use IOptionsMonitor<TelephonyProviderOptions>.asterisk.realtime.connected, asterisk.realtime.reconnect_attempted and asterisk.realtime.ingestion.saturated are no longer emitted. Use crestapps.asterisk.realtime.connections (connections made), crestapps.asterisk.realtime.reconnect_attempts and crestapps.asterisk.realtime.ingestion.saturated; crestapps.asterisk.realtime.connected is now an up-down count of connected listeners.| Symptom | Check |
|---|---|
| Provider missing from the default provider list | IsEnabled, base URL, user name, password, and application name are all required; for Default Asterisk all four configuration keys must be present |
| No inbound calls or events | The dialplan must hand calls to the exact Stasis application (per tenant for Default Asterisk) and Orchard must reach ARI over ws or wss |
| Calls stuck connected after a PBX hangup | Confirm the ARI listener connected (crestapps.asterisk.realtime.connected above zero, application logs) and only one node runs the provider |
| One-way or no browser audio | Configure TURN with a shared secret, or try relay to validate TURN |
| Transfer or voicemail button missing | Use a Local/...@context endpoint template, and set the voicemail context and extension template |
| Settings save refused | Calls are still bound to the old ARI identity; end or reconcile them first |
What SKILL.md sets; muted values are Claude Code's defaults
/crestapps-orchardcore:orchardcore-telephony-asteriskfrom crestapps-orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-orchardcore137 skills in this plugin
/orchardcore-accountsSkill for the CrestApps Orchard Core Accounts module (CrestApps.OrchardCore.Accounts) with its Account Members, Account Team, Account E-mail Domains and Account Locations features. Covers the Account type and AccountPart, the account picker and search, IAccountChildTypeRule, account page sections (AccountPageTabs, AddPageSection, Notes), members and IAccountMemberService, account invitations, the account owner and team picked from staff, e-mail domains, locations with a billing location, the account's billing profile and party members, the Accounts recipe and deployment steps, and the admin menu. Use this skill when requests mention accounts, the businesses or households records belong to, an account page tab, members, invitations, owners, domains or locations. Strong matches include AccountPart, AccountPageTabs, IAccountMemberService, IAccountInvitationService, AccountInvitation, AccountTeamPart, AccountEmailDomainsPart, IAccountEmailDomains, AccountLocationsPart and ManageAccountMembers./orchardcore-accounts-b2bSkill for the CrestApps Orchard Core Accounts B2B module (CrestApps.OrchardCore.Accounts.B2B), business selling on an Account content item. Covers B2BAccountPart and B2BAccount, buyers as account members and ship-to addresses as account locations, terms (deposit, net days, credit limit) through the account-terms tender billed to the account, the account's billing profile, purchase order numbers, quotes, price lists through IBuyerPriceProvider, order limits, approvals and budgets, OCI punchout, the account/business page and API, the PriceLists recipe and deployment steps, the B2BAccounts report source, and the move from the removed Companies module. Use this skill when requests mention B2B, wholesale or business buyers, net terms, purchase orders, price lists, order approvals or punchout. Strong matches include B2BAccountPart, B2BAccount, AccountTerms, AccountTermsTenderProvider, B2BAccountBillingProfileSource, IB2BAccountStore, PriceList, B2BPriceProvider, B2BApprovalService and ManageB2BAccounts.Other plugins' skills for the same job