AMI Originate with PJSIP and multiple registrations / AOR setup

In the asterisk forum, I asked the following question [1]:

We use PJSIP with multiple registrations per extension (DECT mobile phone and desktop phone), and when using AMI Action Originate, both devices start ringing and the one I pick up is connected to the created call.

I would like to select which device is used for the call, but I don’t find any info about the syntax.

The main feedback in the asterisk forum was “use AOR”, and I don’t find anything about AORs in the freepbx gui. Is there any documentation about the task I would like to complete?

[1] Since I am a new user, I am not allowed to post a link to the original question. But it can easily be found by searching for “ami-originate-with-pjsip-and-multiple-registrations”

That makes sense.

You are using an AMI script to originate the call, so the FreePBX interaction on this issue is somewhere between minimal and nonexistent. You are going to have to change your script so that it originates the call to the specific extension, instead of using the extension number you are using now.

The information at https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_Originate should get you on the right track (I know this is specifically about Asterisk 11, but the options should still work).

With PJSIP you can tell the Endpoint which AOR to dial to. This will call all the contacts with that AOR. Right now FreePBX sets PJSIP up with a 1:1 Endpoint:AOR setup. All the contacts are under that AOR, so it’s working how it should work.

There are two ways you can do this, 1) Give the DECT a separate extension and RG the two when needed. Or 2) You will have to write custom dialplan to use PJSIP functions to get the contact (DECT device) you want to dial and then dial that contact’s SIP URI directly.

That is the documentation I was using so far; but honestly, that is not a documentation. All it does is list the arguments and a single line of the form “PARAMETERNAME - Parameter to use” for each parameter. Not really helpful.

[Edit]: I had to remove the link in the citation, because I am not allowed to include links in my posts. What a stupid mechanism.

That is exactly what I observed when looking into the pjsip related config files.

  1. is the solution we used with the old system. It leads to the problem that we need many virtual extensions and have a mixture between 2- and 3-digit extensions. That however made it necessary to define an prefix for outbound dialing. I was happy when I heard of multiple registrations in pjsip, because it made the whole extension setup much cleaner (and I got rid of all the ring groups).

So I assume I want 2). Unfortunately I am an complete newbie to asterisk, but I will try my best to get it working. Any hints are welcome.

I would be really glad if a smart asterisk guru show me a simple dial-plan and aor-setup with a single pjsip extension with two aors, and the corresponding AMI action to create a call from a given aor.

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