res_pjsip: Add TEL URI support for basic calls.

This change allows TEL URI requests to come through for basic calls. The
allowed requests are INVITE, ACK, BYE, and CANCEL. The From and To
headers will now allow TEL URIs, as well as the request URI.

Support is only for TEL URIs present in traffic from a remote party.
Asterisk does not generate any TEL URIs on its own.

ASTERISK-26894

Change-Id: If5729e6cd583be7acf666373bf9f1b9d653ec29a
This commit is contained in:
Ben Ford
2022-08-02 12:15:36 -05:00
committed by Friendly Automation
parent 97b3459bd2
commit 31b3addce7
18 changed files with 220 additions and 73 deletions

View File

@@ -3009,11 +3009,11 @@ static void chan_pjsip_session_end(struct ast_sip_session *session)
static void set_sipdomain_variable(struct ast_sip_session *session)
{
pjsip_sip_uri *sip_ruri = pjsip_uri_get_uri(session->request_uri);
size_t size = pj_strlen(&sip_ruri->host) + 1;
const pj_str_t *host = ast_sip_pjsip_uri_get_hostname(session->request_uri);
size_t size = pj_strlen(host) + 1;
char *domain = ast_alloca(size);
ast_copy_pj_str(domain, &sip_ruri->host, size);
ast_copy_pj_str(domain, host, size);
pbx_builtin_setvar_helper(session->channel, "SIPDOMAIN", domain);
return;