I have two IP phone clients.
One is installed on my desktop computer, and one is on my phone.
I just want to assign the same extension number to both clients.(Assume that extension: “1000”)
Here are my problems:
When 1001 calling 1000, both of the 1000-clients should be ringing.
When one of them is busy, even if the other is idle, calling to that number should be busy.
When one of them is not registered, the remained client should be ringing.
Are these scenario possible in Asterisk without modifying any Asterisk kernel sources?
[max_contacts] = 10 in pjsip.conf but the last registered phone is ringing.
I thought about making virtual extension is also an ideal solution because I don’t know the customer are going to use how many phone clients.
If I understand correctly, I think all you need to do is call EXTENSION_STATE(1000) to determine if extension 1000 is in use or not. You’ll need to test what gets returned when one contact is in use and the other is idle though. I don’t remember what gets returned in that case. If it’s NOT_INUSE, you can then call PJSIP_DIAL_CONTACTS to get a string you can pass to Dial() that will contain all contacts registered to the endpoint. If your endpoints aren’t named the same as your extensions, you can call HINT(1000) to get the devices. If the extension is in use, you can send the caller to voicemail or wherever you like.
Caveat…It’s been a long time since I tried this so you may have to play around a bit to get it to work. Others may have better suggestions as well.
You should set each phone on a different extension and when calling 1000
it will dial both extensions. Before sending the dial you can check the
state of each extension and do accordingly to your need.
Le 24/07/2025 à 19:29, Levi via Asterisk Community a écrit :
I have two IP phone clients.
One is installed on my desktop computer, and one is on my phone.
I just want to assign the same extension number to both
clients.(Assume that extension: “1000”)
Here are my problems:
When 1001 calling 1000, both of the 1000-clients should be ringing.
When one of them is busy, even if the other is idle, calling to
that number should be busy.
When one of them is not registered, the remained client should be
ringing.
Are these scenario possible in Asterisk without modifying any Asterisk
kernel sources?
[max_contacts] = 10 in pjsip.conf but the last registered phone is
ringing.
I thought about making virtual extension is also an ideal solution
because I don’t know the customer are going to use how many phone clients.