Two phone one accont


Please can someone help me with asterisk?
I’m new with asterisk and customer will that 2 phone works with one account.
If the first phone is in conversation, than is not possible to call form second phone.
If the first phone is in conversation/busy, then you can see that the first phone is busy if you try to call from second phone.


With Asterisk you have:

one SIP account = one SIP phone

If you have multiple SIP phones connecting with the same SIP credentials (registering to the same SIP account), only one of them is accessible at one time.

The solution of your problem is - give the customer two SIP accounts :smile:

You may also create 2 SIP accounts ,
set the same callerid to both - while dialing from them, the callee will see the same number and name,
then add both to the queue with ringall strategy.

Wherever the customer will be, he will be always accessible by one number and at any of two phones.

Thanks dejanst

I know “one SIP account = one SIP phone” and I gives the customer two SIP accounts it’s the best way, but how can I slow my problem:
If the first phone is in conversation/busy, then you can see that the first phone is busy if you try to call from second phone. With two SIP account


Spasibo Lexus45

Lexus45 gave you a very good advice. Now you just need to play arround with the Asterisk diaplan a bit and you have a good solution for your case.

Something like:





[code]exten => 1000,1,Queue(your_queue)
   same => n,Hangup()


persistentmembers = yes
autofill = yes
eventmemberstatus = yes
monitor-type = MixMonitor

strategy = ringall
servicelevel = 10
joinempty = yes

member => SIP/phone-1
member => SIP/phone-2[/code]

When somebody dials 1000, both phones will ring simultaneously.
Now about being busy. I hope it is possible, but does your customer really need it? I’m sure it’s not so easy and requires higher degree of experience.

Queue is often an overkill. exten => 1234,1,Dial(SIP/phone-1&SIP/phone-2)
should be sufficient in this case.

type=peer is considered better practice, in most cases, for SIP phones. In particular, type=friend can cause problems if caller IDs received match the device names, which given that many people make device names the same as extension numbers, is not all that uncommon an occurrence.

Thanks everyone and Lexus45

“Lexus45” Yes hi won’t it. I have try everything but is not working.
I know it’s not easy. If you know it and have time, please can you help me?


in php there is function is_ext_avail($exten) it will give u codes

like -1 = Extension not found
0 = Idle
1 = In Use
4 = Unavailable
8 = Ringing

i think this will help you…

That will be part of some AMI or AGI class library, not PHP.

It will be returning the result of ${DEVICE_STATE}, which you can access in the dialplan. Note it returns the state of device, not an extension.

I’m not sure if you just want to ring both and return busy if both are busy, for which Dial(…&…) is perfectly sufficient, or you want to do some sort of busy lamp field thing. There is BLF support in Asterisk, but I’ve never used it. At the simplest level, you can simply set hints, to associate extension numbers with devices, and use whatever features are in the SIP phone to monitor an extension.

ya its ami library function.i mean to say to use php ami to get extenstat.