AMI Originate with PJSIP and multiple registrations

I am new to Asterisk and I am porting an old CSTA-based GUI to AMI. Most things work fine already and I can use Originate to start calls. But we use PJSIP with multiple registrations per extension (DECT mobile phone and desktop phone), so Originate rings both devices 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.

E.g. pjsip show endpoints gave me this:

 Endpoint:  64/64                                                Not in use    0 of inf
     InAuth:  64-auth/64
        Aor:  64                                                10
      Contact:  64/sip:64@;line=21815   c34f659efb Avail        19.965
      Contact:  64/sip:64@;line=bj3vmsc e557fd9af3 Avail        17.545

I tried things like this the following but either I get “Origination failure” or both outgoing phones ring:

Channel: 64/sip:64@;line=bj3vmsc
Context: default
Exten: 123
Priority: 1

I guess I am missing something obvious, but where in the docu could I find info about this topic?

Give them different AORs and do any combining in the dialplan.

Use local channel to dial directly to an specific device using the dial command


According to the Channel argument is The same as you specify in the Dial application command. I am new to asterisk, so what is the difference between your example using the Dial application and me using AMI Originate?

Thanks for the hint. I had no idea what AORs were until I read your answer. I am using FreePBX and will look into configuring that using their GUI, or manually fiddeling with the config files. But I have not yet fully understood how AORs are assigned to devices and how they are used in the dialplan. Do you have any pointers to documentation or examples specific to pjsip/aor/multiple registrations?

Thanks for the answers so far.

Originate can only set up one channel. Dial is needed for the & syntax, that allows multiple channels.

We cannot provide support on configuring FreePBX. Try for that.

Thanks for the clarification, I will head over to the freepbx forum.

I was talking about Originated the call to a local channel where you will trigger the dial app