i have 2 asterisk servers:
asterisk1 and asterisk2
what i am trying to do is to check the device state of an account on asterisk2 from dialplan of asterisk1.
what is known that you can check the device state of the accounts on the same asterisk server.
for example if there is a sip account 3700 on asterisk1
then on dialplan of asterisk1 you check the device state(checking for busy only now) of this account by:
but what i am trying to do now is to check the device state of an account on asterisk2 from asterisk1 (asterisk1 and asterisk2 are connected by a trunk called asterisktrunk )
i believe this is very useful but honestly i still dont know how to use but this is what i understood:
in pjsip.conf at asterisk2 i should add
[test-esc]
type=outbound-publish
server_uri=sip:ip of asterisk1
from_uri=sip:ip of asterisk2
event=dialog
multi_user=yes
@body=application/dialog-info+xml
@context=^users
@exten=4700 which is the extension that i need to be published
this way from asterisk1 i can read the device state of 4700 that is at asterisk2 by adding at extension.conf of asterisk1 a command which i still dont know yet what it is !!!
honestly i have never used AMI commands and i am not familiar to it.
but i assume you mean that there is an AMI command that allows me to check the device state of an account on asterisk2 from asterisk1 before making the call ?
i would appreciate your help.
I think he means there is an AMI command that allows asterisk2 to check a device state on asterisk2. The AMI client can be anywhere, and doesn’t have to be on a machines that is even capable of running Asterisk, but the assumption here will be that it is on the machine running asterisk1.