SIP response 410 GONE

Thanks for help, David.

How to set new destination number with Hangup(23) in asterisk?

Only the Transfer() application (which responds with a REFER or a 302 Response) allows you to specify a new target to include. Hangup does not.

i am getting Transfer unsupported status.

Executing [7654321@default:3] Transfer(“DAHDI/i2/-7”, “DAHDI/g1/90000”) in new stack
– Executing [7654321@default:4] Verbose(“DAHDI/i2/-7”, “UNSUPPORTED”) in new stack
UNSUPPORTED

Ah, DAHDI. I have no insight into that but I doubt it.

How to add ss7 Release message optional parameters from asterisk?

core show channeltypes should show you what technologies support transfer.

As I asked before, why are you switching between SIP and DAHDI? SIP supports transfer. To the best of my knowledge, DAHDI doesn’t. SIP response codes have no meaning on DAHDI and all hangup causes are passed through literally.

Looking at the last SVN version of Asterisk, chan_dahdi had no transfer method:

static struct ast_channel_tech dahdi_tech = {
	.type = "DAHDI",
	.description = tdesc,
	.requester = dahdi_request,
	.send_digit_begin = dahdi_digit_begin,
	.send_digit_end = dahdi_digit_end,
	.send_text = dahdi_sendtext,
	.call = dahdi_call,
	.hangup = dahdi_hangup,
	.answer = dahdi_answer,
	.read = dahdi_read,
	.write = dahdi_write,
	.exception = dahdi_exception,
	.indicate = dahdi_indicate,
	.fixup = dahdi_fixup,
	.setoption = dahdi_setoption,
	.queryoption = dahdi_queryoption,
	.func_channel_read = dahdi_func_read,
	.func_channel_write = dahdi_func_write,
	.devicestate = dahdi_devicestate,
	.cc_callback = dahdi_cc_callback,
}

whereas chan_sip does:

struct ast_channel_tech sip_tech = {
	.type = "SIP",
	.description = "Session Initiation Protocol (SIP)",
	.properties = AST_CHAN_TP_WANTSJITTER | AST_CHAN_TP_CREATESJITTER,
	.requester = sip_request_call,			/* called with chan unlocked */
	.devicestate = sip_devicestate,			/* called with chan unlocked (not chan-specific) */
	.call = sip_call,			/* called with chan locked */
	.send_html = sip_sendhtml,
	.hangup = sip_hangup,			/* called with chan locked */
	.answer = sip_answer,			/* called with chan locked */
	.read = sip_read,			/* called with chan locked */
	.write = sip_write,			/* called with chan locked */
	.write_video = sip_write,		/* called with chan locked */
	.write_text = sip_write,
	.indicate = sip_indicate,		/* called with chan locked */
	.transfer = sip_transfer,		/* called with chan locked */
	.fixup = sip_fixup,			/* called with chan locked */
	.send_digit_begin = sip_senddigit_begin,	/* called with chan unlocked */
	.send_digit_end = sip_senddigit_end,
	.early_bridge = ast_rtp_instance_early_bridge,
	.send_text = sip_sendtext,		/* called with chan locked */
	.func_channel_read = sip_acf_channel_read,
	.setoption = sip_setoption,
	.queryoption = sip_queryoption,
	.get_pvt_uniqueid = sip_get_callid,
};