Congestion retries

Hello

In some specific cases, I need to reject an incoming call without answering it. I do this via a CONGESTION, which sends a 503 Service Unavailable. However, my provider retries the call immediately a number of times.

  • does the behaviour of the provider seem normal to you, is that somewhere defined in the rfc ?
  • is there a way to send a 480 temporarily unavailable (which is the case), or 603 Decline, or 600 Busy Everywhere ?

Thanks

J.

480 is even more of an invitation to retry than 503.

For chan_sip.

		case AST_CAUSE_UNALLOCATED:		/* 1 */
		case AST_CAUSE_NO_ROUTE_DESTINATION:	/* 3 IAX2: Can't find extension in context */
		case AST_CAUSE_NO_ROUTE_TRANSIT_NET:	/* 2 */
			return "404 Not Found";
		case AST_CAUSE_CONGESTION:		/* 34 */
		case AST_CAUSE_SWITCH_CONGESTION:	/* 42 */
			return "503 Service Unavailable";
		case AST_CAUSE_NO_USER_RESPONSE:	/* 18 */
			return "408 Request Timeout";
		case AST_CAUSE_NO_ANSWER:		/* 19 */
		case AST_CAUSE_UNREGISTERED:        /* 20 */
			return "480 Temporarily unavailable";
		case AST_CAUSE_CALL_REJECTED:		/* 21 */
			return "403 Forbidden";
		case AST_CAUSE_NUMBER_CHANGED:		/* 22 */
			return "410 Gone";
		case AST_CAUSE_NORMAL_UNSPECIFIED:	/* 31 */
			return "480 Temporarily unavailable";
		case AST_CAUSE_INVALID_NUMBER_FORMAT:
			return "484 Address incomplete";
		case AST_CAUSE_USER_BUSY:
			return "486 Busy here";
		case AST_CAUSE_FAILURE:
			return "500 Server internal failure";
		case AST_CAUSE_FACILITY_REJECTED:	/* 29 */
			return "501 Not Implemented";
		case AST_CAUSE_CHAN_NOT_IMPLEMENTED:
			return "503 Service Unavailable";

Also 603 appears to be the default when none of these apply.

Thank you for you usual help ! you’re a real pillar of this forum.

btw, I’m using chan_sip and asterisk 13 or 11 (testing on both)

I’m trying to choose the response code that asterisk sends back to the INVITE. Digging more, I was expecting to do it with hangup(causecode)

    If a <causecode> is given the channel's hangup cause will be set to the
    given value.

However, whatever causecode I pass to Hangup (before even answering), ends up with a 603 Declined. If I answer the channel and then hangup, then the BYE gets an extra header “X-Asterisk-HangupCauseCode: 408” for instance (If I issued a Hangup(408))

What I am really looking for is how to respond to the INVITE with a response code of my choosing.

J.

I don’t think there is any way of deliberately violating the software layering for outgoing cause codes;

However, you should be able to produce any SIP response in the switch statement,as well as 603.