mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
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:
committed by
Friendly Automation
parent
97b3459bd2
commit
31b3addce7
@@ -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;
|
||||
|
Reference in New Issue
Block a user