Clarification on SIP call if user not logged in

I would like to get some clarification on what I should expect in the
following situation.

Suppose I make a SIP call to a SIP client who has not logged in,
what should be the expected behaviour?

In my lab, I have 3 systems

  • PC (linux server running asterisk)
  • MAC with xten xlite sip phone
  • PC with xten xlite sip phone

when all the sip phone registered with asterisk, everything works
fine. I can call any of the sip phone without problem.

Now, when the PC sip phone is NOT logged in, and when I call from
the MAC to the PC, I get the following in asterisk console:

*CLI>
– Executing Dial(“SIP/phantom-b717”, “SIP/homepc|15|t”) in new stack
Sep 10 21:16:24 NOTICE[7729]: app_dial.c:1091 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)
== Auto fallthrough, channel ‘SIP/phantom-b717’ status is ‘CHANUNAVAIL’

And, the MAC xten siphone says
"Call failed: 503 Service Unavailable"

Is this normal?

Thanks

When a SIP client is unavailable (because, say, they’re not logged in when using softphones) The system sees that channel as unavailable and would proceed to the n+101 priority. N+101 means, the number of the priority that had the Dial() command plus 101. If it doesn’t exist, the call attempt just fails.

So if you had this:

exten => 201,1,Dial(SIP/1,30,t)
exten => 201,2,Busy()
exten => 201,3,Hangup

It would mean that, if the station was registered, it would ring station 201 for 30 seconds and after that give you a busy signal and then hangup.

If station 201 isn’t registered, it just fails to connect with no treatment at all. (Though your phone or softphone may play a fast busy signal for you, because it got a 503 response from the Asterisk server.)

But if you have THIS,

exten => 201,1,Dial(SIP/1,30,t)
exten => 201,2,Voicemail(b201)
exten => 201,3,Hangup
exten => 201,102,Voicemail(u201)

In this case when station 201 is registered, it will ring for 30 seconds, then the caller will be sent to the voicemail box for station 201 which plays the “I’m busy” greeting. If station 201 is NOT registered, callers go directly to voicemail which plays the “I’m unavailable” greeting. Note that the “I’m unavailable” voicemail priority is 101 higher than the Dial() command priority. (Making it 102.)

You can make the n+101 priority anything at all. Like this:

exten => 201,102,Playback(call-can-not-be-completed)

In this case, if you had a prompt recorded that said “Your call can not be completed at this time.”, then that would play instead of hearing a voicemail greeting when users are not registered.

More information about how to control call treatments with priorities can be found here.

voip-info.org/tiki-index.php … priorities