> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pgw.sipmicro.services/llms.txt
> Use this file to discover all available pages before exploring further.

# pgw FAQ

> Answers to common questions about pgw: supported PBXs and apps, passwords and push tokens, restarts, high availability, IPv6, and certificates.

## Product

> [accordion] Which PBXs work with pgw?
>
> [Asterisk](https://docs.pgw.sipmicro.services/pbx/asterisk.md) 22 with PJSIP and [FreeSWITCH](https://docs.pgw.sipmicro.services/pbx/freeswitch.md) 1.10 are tested. Any other SIP registrar that pgw can reach can work. One that keeps the Path header (RFC 3327) works with the default contact strategy, and one that doesn't works with `masquerade`. You change the PBX's configuration, not its code.

> [accordion] Which apps work with pgw?
>
> Any SIP app that sends RFC 8599 push parameters, connects over TLS or secure WebSocket, and is built with push credentials that you register in pgw. On iOS, the app must report every VoIP push to CallKit.

> [accordion] Can I use an app from the App Store or Google Play that I don't publish?
>
> No. Pushes to an app need its publisher's push credentials. Build the app with your own bundle ID or package name and your own credentials, and register them in pgw. See [Configure apps for pgw](https://docs.pgw.sipmicro.services/apps/overview.md).

> [accordion] Does pgw relay audio or video?
>
> No. Media flows directly between the app and the PBX.

> [accordion] What's the license?
>
> Apache License 2.0.

## Privacy

> [accordion] Does pgw store SIP passwords or log push tokens?
>
> pgw never logs push tokens, push parameters, or credentials, and never sends push tokens to the PBX. In passthrough mode, the default, pgw stores no SIP passwords. In [managed mode](https://docs.pgw.sipmicro.services/upstreams/managed-mode.md), pgw stores each user's password encrypted. See [What pgw stores](https://docs.pgw.sipmicro.services/security.md#what-pgw-stores).

## Running pgw

> [accordion] Can I test pgw without a phone?
>
> Yes. The Android emulator receives real FCM pushes. Follow the [Android emulator tutorial](https://docs.pgw.sipmicro.services/tutorial-android-emulator.md). The iOS Simulator can't receive VoIP pushes.

> [accordion] Why does a call to an open app sometimes take 3 seconds longer?
>
> iOS can suspend an app while its connection stays open. pgw sends the call on the open connection and waits `provisional_timeout`, 3 seconds by default, for a response before it pushes. To push for every call, set the app record's delivery mode to `always_push`. See [When the app is still connected](https://docs.pgw.sipmicro.services/how-pgw-works.md#when-the-app-is-still-connected).

> [accordion] What happens when pgw restarts?
>
> When pgw stops, it answers each held call with 503. It keeps its bindings in SQLite, so it knows every device when it starts again, and apps reconnect and register again on their own.

> [accordion] Can I run two pgw instances for high availability?
>
> No. pgw runs as a single instance. It locks `data_dir` at startup, so a second process on the same directory stops with `data_dir is in use by another pgw process`. To move pgw to another host, see [Back up, move, and restore pgw](https://docs.pgw.sipmicro.services/backup-move-restore.md).

> [accordion] Does pgw work with a PBX on IPv6?
>
> Yes. Set `upstream_listen` to `[::]:5060`, and set `upstream_hostname` to a name or IPv6 address that the PBX can reach, because pgw puts it in the `Via`, `Path`, and `Record-Route` headers. An upstream's `host` can be an IPv6 address, and `invite_source_cidrs` takes IPv6 prefixes. When pgw listens on IPv4 and the PBX's host name has both IPv4 and IPv6 addresses, pgw uses IPv4.

> [accordion] How do I renew the TLS certificate without dropping apps?
>
> Renew the certificate, then run `systemctl reload pgw` or `pgw cert reload`. Connected apps stay connected, and new connections get the new certificate. See [Install a TLS certificate](https://docs.pgw.sipmicro.services/deploy/tls.md).

## Next steps

> [card] [Quickstart](https://docs.pgw.sipmicro.services/quickstart.md)
>
> Run pgw on your own computer and make a test call.

> [card] [Troubleshooting](https://docs.pgw.sipmicro.services/troubleshooting.md)
>
> Find the cause when a phone doesn't register or ring.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.