How to ping a host phone through asterisk server


#1

hello someone please help me how to ping a already registered host phone using asterisk server…I just want to check the registered sip(host phone) is alive or dead through asterisk server.


#2

You can only do this through an Asterisk client, given the way that SIP works, although that is more to do with loose use of server in a SIP context.

If you enable the qualify option on chan_sip, Asterisk will do this automatically, using OPTIONS requests. I assume chan_pjsip has something similar. You can only do this as far as the next back to back exchange, i.e. you cannot include dialled digits in the end point specification.


#3

Can you Please tell me in Brief …How to do OPTIONS requests…is it by AMI events …if is by using AMI events tell me which events to use


#4

For chan_sip, set qualify to anything except “no”.

I assume there is something similar for chan_pjsip.

The question doesn’t make sense for any of the other channel drivers of which I’m aware.

There is no API, of which I’m aware, to force OPTIONs to be sent on demand.


#5

ok i will try this… and i will revert you back …Thank you


#6

@ravikiran16218, PJSIP also has qualify feature. It is enabled and adjusted with qualify_frequency parameter in aor section of PJSIP configuration file (/etc/asterisk/pjsip.conf).

Example:

[3303]
type=aor
max_contacts=1
remove_existing=yes
maximum_expiration=7200
qualify_frequency=60

AMI is not needed in this context.