Redirect a call to SIP URI when endpoint is unavailable

Hi there,

I’m setting up a private SIP server with the FreePBX distro (STABLE SNG7-PBX-64bit-2008-1, FreePBX 15/Asterisk 16).

It’s currently working normally, we can call each other and be called, using pjsip channel. I would like to receive calls on my 3G phone (using external SIP URI) when I’m not on my desk, so I looked on the forum for various ways to ring another custom extension when unavailable, none are currently working.

I have IPPI on my iPhone (and Linphone, but let’s concentrate on IPPI first) and I tried to create a “custom extension”, with PJSIP/[email protected] in the Dial input, but when I call with an internal extension, I’m immediately disconnected (no error voice message like when I call an inexistant extension), and the logs show:

[2020-09-17 14:48:55] WARNING[9310][C-00000001] app_macro.c: Macro() is deprecated and will be removed from a future version of Asterisk.
[2020-09-17 14:48:55] WARNING[9310][C-00000001] app_macro.c: Dialplan should be updated to use Gosub instead.
[2020-09-17 14:48:55] WARNING[9310][C-00000001] app_dial.c: Unable to create channel of type ‘PJSIP’ (cause 3 - No route to destination)

I tried to call the ippi URI ( from linphone, it rings, so the URI is correct.

I tried SIP/…, PJSIP/…, doesn’t work. Any idea if I’m missing something? I don’t have any trunk for this call as I’m trying to make Asterisk make a p2p call to IPPI.

Thanks for your help

Dialing a URI via PJSIP must be done using an endpoint - see Dialing PJSIP Channels - Asterisk Project - Asterisk Project Wiki

In FreePBX - Asterisk SIP Settings, enable Allow SIP Guests so that it generates the PJSIP “anonymous” endpoint:

Then for your custom extension, use as the Dial string:

PJSIP/anonymous/sip:[email protected]

Alternatively, set up a PJSIP trunk with no authentication or registration, just specifying the domain of

then if you named that trunk “ippi” for example, use as your custom Dial string:

PJSIP/[email protected]

1 Like

It works thank you, I used the alternative, creating a trunk and a custom extension in the form PJSIP/[email protected] (your 2nd solution). Worked like a charm.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.