AMI Originate with PJSIP and multiple registrations


#1

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@192.168.44.22:61068;line=21815   c34f659efb Avail        19.965
      Contact:  64/sip:64@192.168.44.20:61060;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@192.168.44.20:61060;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?


#2

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


#3

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

exten=>_6001,1,Dial(PJSIP/6001/sip:6001@16.10.171.91:10928)


#4

According to https://www.voip-info.org/asterisk-manager-api-action-originate/ 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?


#5

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.


#6

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 https://community.freepbx.org/ for that.


#7

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


#8

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