Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improvement]: Asterisk As Microsoft Teams Gateway #30

Open
Eulnono76 opened this issue Feb 14, 2024 · 1 comment
Open

[improvement]: Asterisk As Microsoft Teams Gateway #30

Eulnono76 opened this issue Feb 14, 2024 · 1 comment

Comments

@Eulnono76
Copy link

Improvement Description

Hi,

Today I use Asterisk as a Gateway to Microsoft Teams with success.
To achieve this result, I statically modify the res_pjsip_nat.c file by replacing :
ast_sockaddr_stringify_host(&transport_state->external_signaling_address) with the FQDN of my server :

In function static pj_status_t nat_on_tx_message(pjsip_tx_data *tdata)

replace this line pj_strdup2(tdata->pool, &uri->host, ast_sockaddr_stringify_host(&transport_state->external_signaling_address));

with this line pj_strdup2(tdata->pool, &uri->host, "<your asterisk FQDN>");

 and this line pj_strdup2(tdata->pool, &via->sent_by.host, ast_sockaddr_stringify_host(&transport_state->external_signaling_address));
with this line pj_strdup2(tdata->pool, &via->sent_by.host, "<your asterisk FQDN>");

The FQDN is in fact used by Microsoft within the SIP:TLS frame to identify the client (Microsoft Tenant) in Teams direct routing use. The problem is that it is defined statically, compiled, and only valid for one Microsoft 365 Tenant.

Multi-Tenant is therefore not supported.

Would it be possible via the pjsip.conf configuration file to prevent the resolution of the FQDN, or specified manualy a client domain name, in certain desired cases?

@jcolp
Copy link
Member

jcolp commented Feb 14, 2024

It would be possible. I've moved this to the feature requests repo.

@jcolp jcolp transferred this issue from asterisk/asterisk Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants