Setting up inbound route with IPPI

Hello everybody,
I have Asterisk working with voip.ms and internal endpoints / conference. Thanks to you, it was very difficult at the begining but now I know how extensions are working and it’s really easy to configure them.
But now I want to add a IPPI trunk to receive calls.
I use voip.ms to make calls, the Voip.ms documentation was very helpful for the configuration.
But, there is no doc for IPPI.
I just want to add IPPI to receive calls in PJSIP. What should I put in my pjsip.conf to get it registered?
Some help would be awesome :slight_smile:

Thanks in advance

If you visit their ‘Help & Support’ page and search for ‘asterisk’ they have instructions – for TrixBox, so we can safely assume their documentation is not up to date :slight_smile:

(I would be a little bit cautious of a provider that hasn’t updated their documentation in over a decade.)

The configuration is for the deprecated SIP channel driver but it should yield clues that you can use to configure PJSIP.

Thanks, I see the doc.
Is it a pattern to follow to convert SIP config to PJSIP config ?
Thanks

You will almost certainly be better off taking the PJSIP ITSP connection sample and filling the gaps. Most ITSP provided sip.conf configurations are, basically, wrong.

Thanks!
So my ippi is now registered with this sample of pjsip.conf :

[ippi]
type = endpoint
aors = ippi
outbound_auth = ippi-auth
context = ippi
 
[ippi]
type = aor
contact = sip:sip.ippi.com
qualify_frequency = 15
 
[ippi-auth]
type = auth
auth_type = userpass
username = USERNAME
password = XXXXXXXX
 
[ippi-reg]
type = registration
outbound_auth = ippi-auth
server_uri = sip:sip.ippi.com
client_uri = sip:USERNAME@sip.ippi.com
 
[ippi-identify]
type = identify
endpoint = ippi
match = sip.ippi.com

And my extension.conf :

[ippi]
exten => s,1,Dial(PJSIP/550) ; 550 is my IVR, it works perfectly with internal calls

But when I call to my ippi number I still have the ippi voicemail.
Thanks for your future help :slight_smile:

You need to provide logging from Asterisk. I’d suggest the full log (which needs enabling) after doing pjsip set logger on.

However, I think you are confusing extensions with devices. 550 is a device.

This might be because you are using FreePBX, which conflates extensions and devices. IVR has a specific meaning in FreePBX, whereas, in Asterisk, it is a generic telephony concept which could be implemented in many different ways.

Typically, for FreePBX, I believe you would use:

Goto(from-pstn,550,1)

for a virtual extension accessible from a PSTN call. from-pstn could be replaced by some other context.

Thanks for the help. So there is my configuration and it’s working !
pjsip.conf

[ippi]
type = endpoint
transport = transport-udp
disallow=all
allow=g722
allow=ulaw
allow=alaw
aors = ippi
outbound_auth = ippi-auth
context = ippi
 
[ippi]
type = aor
contact = sip:sip.ippi.com
qualify_frequency = 15
 
[ippi-auth]
type = auth
auth_type = userpass
username = USERNAME
password = PASSWORD
 
[ippi-reg]
type = registration
transport = transport-udp
outbound_auth = ippi-auth
server_uri = sip:sip.ippi.com
client_uri = sip:USERNAME@sip.ippi.com
 
[ippi-identify]
type = identify
endpoint = ippi
match = sip.ippi.com

extension.conf with ring group (ring all) :

[ippi]
exten => s,1,PlayBack(/var/lib/asterisk/sounds/custom/welcome)
exten => s,2,Ringing
exten => s,3,Wait(1)
exten => s,4,Answer()
exten => s,5,Set(CHANNEL(musicclass)=predecrochage)
exten => s,6,Dial(PJSIP/1067&PJSIP/1092,60,tTm(predecrochage))
exten => s,7,HangUp()

Just a few notes you may want to consider, some based on my personal preferences…

Unless you have changed Asterisk’s default directory, ‘custom/welcome’ should be sufficient.

If you replace ‘exten => s,x’ with ‘same = n’ your dialplan will be easier to type and easier to maintain.

The ‘playback()’ application already answered the call.

Setting the music class and specifying it as an argument to ‘m’ is redundant.

If I were to write this snippet, it would probably look something like:

        exten = s,1,                    playback(custom/welcome)
        same = n,                       ringing
        same = n,                       wait(1)
        same = n,                       dial(pjsip/1067&pjsip/1092,60,tTm(predecrochage))
        same = n,                       hangup()

Usually I tend to ‘spell stuff out’ and be more explicit (like setting the channel musicclass in a separate statement), but in this situation, specifying the music class as an argument to ‘m’ would tend to remind me what ‘m’ means and save me a trip to the dox.

Thanks! So there is my final extension.conf, tell me if you have another suggestion :

[None]
exten => _.,1,PlayBack(custom/noforfait)
[ippi]
exten => s,1,PlayBack(custom/welcome)
same = n,Ringing
same = n,Dial(PJSIP/1067&PJSIP/1092,60,tTm(predecrochage))
same = n,PlayBack(custom/noagent)
same = n,HangUp()
[DialEndpoints] ; internal calls
exten => _10.,1,Ringing
same = n,Answer()
same = n,Dial(PJSIP/${EXTEN},30,tTm(predecrochage))
same = n,PlayBack(custom/agentunavailable)
same = n,6,HangUp()

[live] ; Conference room
exten => 900,1,ConfBridge(confLive,live,user_live)
[unallowed]
exten => _.,1,PlayBack(/var/lib/asterisk/sounds/custom/forbidden)

[Posteaposte] ; Internal calls plan
include => DialEndpoints
include => unallowed

[Tout] ; All numbers authorized
include => DialEndpoints
exten => _+.,1,Dial(PJSIP/${EXTEN}@voipms)
exten => _00.,1,Dial(PJSIP/${EXTEN}@voipms)
include => live
include => unallowed
[Francais] ; French Numbers
include => DialEndpoints
exten => _+33.,1,Dial(PJSIP/${EXTEN}@voipms)
include => unallowed
[FixesFrancais] ; French Landline
include => DialEndpoints
exten => _+33[1-59].,1,Dial(PJSIP/${EXTEN}@voipms)
include => unallowed


You removed ‘wait(1)’ which I needed on my host to hear a ‘ring’ before the MOH. YMMV.

Yes exactly.
Thanks for helping me on this !