PHP Client Script for manage reachable / unreachable SIP Extensions

Hello Guys,

Is there any way to manage the reachable/unreachable status of SIP Extension on asterisk server? OR Is there any functions on asterisk server?

Thanking You.

I’m not quite sure what you mean by manage reachable/unreachable status of SIP extensions but I feel you’re looking for qualify option in sip.conf.

–Satish Barot

Hi Satish,

Thanks for your reply. I have successfully registered my extension on Asterisk Server. That time, my extension status is reachable. after some time, the extension is unreachable. After that, my extension status will not automatically change unreachable to reachable. Is there any way to achieve this?

Please check my extension details below:

  deny=0.0.0.0/0.0.0.0
  secret=
  dtmfmode=rfc2833
  canreinvite=no
  context=from-internal
  host=dynamic
  trustrpid=yes
  sendrpid=no
  type=friend
  nat=yes
  port=5060
  qualify=yes
  qualifyfreq=60
  transport=udp
  encryption=no
  callgroup=
  pickupgroup=
  dial=SIP/284
  mailbox=284@device
  permit=0.0.0.0/0.0.0.0
  callerid=Test 5 <284>
  callcounter=yes
  faxdetect=no
  cc_monitor_policy=generic

Is there anything wrong in this?

That sounds like a firewall or NAT problem.

Asterisk will change the status back to reachable when it becomes reachable again. There is no need for you to do anything.

Did you see if Asterisk received any responses from endpoints for OPTION packets? Asterisk would mark it unreachable only if there is no response for OPTION request.