VoIP.info Guide

Asterisk outbound registration line matching: Contact, endpoint and inbound call boundaries

Keep the registered address, Contact user, unique line parameter, selected endpoint and endpoint context separate when relating an outbound registration to a returning call.

Reviewed 2026-10-07Current Asterisk outbound-registration, proxy, line-matching and troubleshooting guidance plus Asterisk 22 registration and AMI references and certified Asterisk 22.8 wizard reference reviewed October 7, 2026; no Asterisk host, registration, Contact, line token, endpoint, identify rule, provider, proxy, request, context, extension, route, media path or live call was inspected or testedAdvancedDocumentation based · not lab tested

Keep registration and endpoint objects separate by default

Asterisk explicitly documents outbound registration as a configuration object separate from an endpoint. server_uri selects the registrar, client_uri supplies the registered address of record and contact_user changes the user portion of the Contact URI. None of those fields alone assigns a returning request to an endpoint.

A Registered status proves that the registrar accepted a binding under the observed exchange. It does not prove that a later INVITE will preserve a requested parameter, match the intended endpoint, enter the expected context or reach a valid extension.

Use Contact user for destination, not endpoint identity

The registration guide says contact_user controls the user portion of the Contact and can determine the extension to which provider traffic is addressed. It also warns that this is not an endpoint-related option. Keep the returning Request-URI user, the selected endpoint and that endpoint's dialplan context as three separate facts.

A correct contact_user can still land on the wrong endpoint, and a correctly identified endpoint can still reject the called extension in its context. Do not fix an endpoint-identification error by duplicating dialplan extensions across broad contexts.

Understand the line and endpoint pair

When line=yes and endpoint=<name> are configured on an outbound registration, Asterisk appends a unique line parameter to the Contact URI. If the provider returns that token in the Request-URI or To header, Asterisk can relate the request to the configured endpoint. The Asterisk 22 reference says the endpoint field is used for incoming calls related to that outbound registration.

The mechanism depends on the far side preserving and returning the token. A local setting is not proof that a provider, SBC or proxy supports it. Capture the REGISTER Contact, accepted binding and returning INVITE rather than assuming that Registered implies line matching.

Choose line matching or identify rules deliberately

Asterisk's proxy guide presents line matching for cases where several ITSP trunks arrive from one proxy address and source-IP identification cannot distinguish them. If the provider supports the returned token, line matching can remove the need for an identify object for that registration. Otherwise, a supported identifier such as source IP or an agreed header can still own the endpoint match.

Do not leave overlapping identification rules as an accidental fallback. Record the global identifier order, endpoint-permitted methods and loaded identify objects. A shared proxy address, an account header and a returned line token are different signals with different trust and failure boundaries.

Treat wizard expansion as generated objects

The certified Asterisk 22.8 wizard exposes sends_line_with_registrations; when enabled, it skips creation of an identify object and adds line and endpoint parameters to generated registration objects. That convenience setting is not a third matching mechanism. Inspect the generated and loaded registration and endpoint objects it produces.

The wizard also expands remote hosts, contacts, authentication, proxies and registrations. Preserve the exact generated object associated with the returning call instead of troubleshooting only the compact wizard source.

Correlate registration detail with the inbound transaction

Asterisk 22's OutboundRegistrationDetail event reports status, server and client URIs, Contact user, Line and Endpoint as separate fields. Use it to inventory the loaded registration, then correlate the REGISTER Contact and inbound request token with endpoint selection, context and extension.

Retest token preserved, token absent, unexpected source, wrong called user and deliberately denied destination branches. No registration, Contact, line token, endpoint, provider, proxy, request, context, extension, route, media path or call was tested for this guide.

Sources & applicability

Primary references for the technical details above. Operational examples and planning checklists are VoIP.info editorial guidance.

Examples require adaptation to your topology. No live PBX or hardware testing is claimed.