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:
According to Asterisk Manager API Action Originate | Parameters and Examples 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?