Fail gracefully if subscriber absent


(PbxNoob) #1

Is there anyway to get FreePBX to fail gracefully if a subscriber is ‘absent’? At the moment the call just rings 4 times or so then hangs up. It’s only by trawling through the logs that I can see what’s amiss.

For bonus points if the subscriber is absent it would be great if it could send an email or execute a local command so I can be notified something has gone wrong…

THANKS!


#2


Extension Settings - Advanced

“Not reachable” is where you define what happens when the phone is “absent” (not registered, not responding to SIP).

You have a lot of options to choose from. If you want e-mail or a linux command you could set those up as custom dialplan and then route your Not Reachable calls there.


(PbxNoob) #3

Hi Bill - thanks - but this is for an IAX call to another FreePBX instance - would this still apply? Think not?


#4

Maybe try it and see? :slight_smile:


(PbxNoob) #5

But there’s the rub - where would I configure those settings for an IAX trunk? I’m not calling an extension on my system so going to
extensions>advanced and setting a “not reachable” setting for an extension I’m not trying to reach wouldn’t seem to make any sense?
Do forgive me if I’ve totally lost your point! :slight_smile: :slight_smile:


#6

Yeah, it would be good to give the details up front when asking your question. The typical “subscriber is absent” message shows up in the logs when the extension is unregistered.

What is the failure scenario? The trunk itself has failed, or an extension on the other end of the trunk is unavailable?


(PbxNoob) #7

Sorry for being unclear. I did mention it but only in a followup post. Sorry!

The failure scenario is that the trunk itself has failed.


#8

I would say dig into the log further and figure out why. The failure method you describe is not normal. FreePBX normally detects a trunk failure and says back to the caller “All circuits are busy now.” Alternatively, if you have multiple trunks set up for your outbound route, it will just move on to the next one in the list – that is the most graceful failure mode.

I cannot think of any reason you should be experiencing four rings and then hangup on a trunk failure.


(PbxNoob) #9

hmmm OK. I know WHY the trunk failed this morning - it’s an IAX connection being made over ZeroTier and on this occasion an employee had pulled the plug on the server at the other end so the server just was not there to receive the call when it was put through. From experience this is exactly what happens every time there’s some similar problem.


#10

If your logs are verbose you can see more of what is happening on the failure. If asterisk says it is playing the “all circuits are busy now” message but your phone just plays ringing that means it is not playing early media.


(PbxNoob) #11

Thanks. Interestingly it looks like FreePBX/Asterisk is trying to play the all circuits are busy file but all I hear is ringing. So like you say. Not playing early media for some reason? Is there a way to change that? Thank you for your help