Compare commits

...

12 Commits

Author SHA1 Message Date
aks 9cd4ea68d6
Merge 3d4a9133b7 into 3b58ebc5f3 2025-01-21 00:17:22 +00:00
junction1153b 3b58ebc5f3
[mod_sofia] Update Polycom UA to recognize new Poly phones
We observed that the new Poly phones (formerly known as Polycom) were not getting sent a SIP UPDATE in certain circumstances (example: retrieving a parked call, and therefore, Caller ID would not show the parked caller). I renamed Polycom to Poly which will catch all Poly AND Polycom UA's. I also added Acrobits, and Ringotel to extend such functionality to those UA's. There were also other minor compatibility issues with the new Poly phones which have been resolved with tweaking the UA recognition on the code.

Co-authored-by: Joseph <junction1153@gmail.com>
2025-01-21 00:57:25 +03:00
aks 3d4a9133b7 cleaning master 2024-12-30 20:11:43 +04:00
aks 028cd9d36e
Merge branch 'signalwire:master' into master 2024-12-30 20:08:00 +04:00
aks 1340dc8ca4 added mod_curl_tts 2024-12-30 19:42:17 +04:00
aks 93d5d3158b new tts modules 2024-10-17 20:14:11 +04:00
aks 88b80e6c94
Merge branch 'signalwire:master' into master 2024-10-16 07:38:34 +04:00
aks efdd971c8f
Merge branch 'signalwire:master' into master 2024-10-13 10:00:24 +04:00
aks c302d6611c
Merge branch 'signalwire:master' into master 2024-09-30 14:31:03 +04:00
aks 68d6e5c6cb
Merge branch 'signalwire:master' into master 2024-09-10 03:53:48 +04:00
aks 187e40df5d
extra parentheses deleted 2024-06-15 04:53:54 +04:00
aks f49f739333 hashtable memset issue fix 2024-06-14 07:06:23 +04:00
7 changed files with 15 additions and 7 deletions

View File

@ -47,6 +47,9 @@ applications/mod_voicemail
#asr_tts/mod_flite #asr_tts/mod_flite
#asr_tts/mod_pocketsphinx #asr_tts/mod_pocketsphinx
#asr_tts/mod_tts_commandline #asr_tts/mod_tts_commandline
#asr_tts/mod_google_tts
#asr_tts/mod_openai_tts
#asr_tts/mod_piper_tts
codecs/mod_amr codecs/mod_amr
#codecs/mod_amrwb #codecs/mod_amrwb
codecs/mod_b64 codecs/mod_b64

View File

@ -2137,6 +2137,9 @@ AC_CONFIG_FILES([Makefile
src/mod/asr_tts/mod_flite/Makefile src/mod/asr_tts/mod_flite/Makefile
src/mod/asr_tts/mod_pocketsphinx/Makefile src/mod/asr_tts/mod_pocketsphinx/Makefile
src/mod/asr_tts/mod_tts_commandline/Makefile src/mod/asr_tts/mod_tts_commandline/Makefile
src/mod/asr_tts/mod_google_tts/Makefile
src/mod/asr_tts/mod_openai_tts/Makefile
src/mod/asr_tts/mod_piper_tts/Makefile
src/mod/codecs/mod_amr/Makefile src/mod/codecs/mod_amr/Makefile
src/mod/codecs/mod_amrwb/Makefile src/mod/codecs/mod_amrwb/Makefile
src/mod/codecs/mod_b64/Makefile src/mod/codecs/mod_b64/Makefile

View File

@ -254,7 +254,7 @@ char *generate_pai_str(private_object_t *tech_pvt)
callee_number = switch_sanitize_number(switch_core_session_strdup(session, callee_number)); callee_number = switch_sanitize_number(switch_core_session_strdup(session, callee_number));
callee_name = switch_sanitize_number(switch_core_session_strdup(session, callee_name)); callee_name = switch_sanitize_number(switch_core_session_strdup(session, callee_name));
if (!zstr(callee_number) && (zstr(ua) || !switch_stristr("polycom", ua))) { if (!zstr(callee_number) && (zstr(ua) || !switch_stristr("poly", ua))) {
callee_number = switch_core_session_sprintf(session, "sip:%s@%s", callee_number, host); callee_number = switch_core_session_sprintf(session, "sip:%s@%s", callee_number, host);
} }
@ -2075,13 +2075,15 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
nua_info(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("message/sipfrag"), nua_info(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("message/sipfrag"),
TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)), SIPTAG_PAYLOAD_STR(message), TAG_END()); TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)), SIPTAG_PAYLOAD_STR(message), TAG_END());
} else if (update_allowed && ua && (switch_channel_var_true(tech_pvt->channel, "update_ignore_ua") || } else if (update_allowed && ua && (switch_channel_var_true(tech_pvt->channel, "update_ignore_ua") ||
switch_stristr("polycom", ua) || switch_stristr("poly", ua) ||
(switch_stristr("aastra", ua) && !switch_stristr("Intelligate", ua)) || (switch_stristr("aastra", ua) && !switch_stristr("Intelligate", ua)) ||
(switch_stristr("cisco/spa50", ua) || (switch_stristr("cisco/spa50", ua) ||
switch_stristr("cisco/spa525", ua)) || switch_stristr("cisco/spa525", ua)) ||
switch_stristr("cisco/spa30", ua) || switch_stristr("cisco/spa30", ua) ||
switch_stristr("Fanvil", ua) || switch_stristr("Fanvil", ua) ||
switch_stristr("Grandstream", ua) || switch_stristr("Grandstream", ua) ||
switch_stristr("Ringotel", ua) ||
switch_stristr("Groundwire", ua) ||
switch_stristr("Yealink", ua) || switch_stristr("Yealink", ua) ||
switch_stristr("Mitel", ua) || switch_stristr("Mitel", ua) ||
switch_stristr("Panasonic", ua))) { switch_stristr("Panasonic", ua))) {
@ -2152,7 +2154,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
SIPTAG_PAYLOAD_STR(message), SIPTAG_PAYLOAD_STR(message),
TAG_IF(!zstr(session_id_header), SIPTAG_HEADER_STR(session_id_header)), TAG_IF(!zstr(session_id_header), SIPTAG_HEADER_STR(session_id_header)),
TAG_END()); TAG_END());
} else if (ua && switch_stristr("polycom", ua)) { } else if (ua && switch_stristr("poly", ua)) {
snprintf(message, sizeof(message), "P-Asserted-Identity: \"%s\" <%s>", msg->string_arg, tech_pvt->caller_profile->destination_number); snprintf(message, sizeof(message), "P-Asserted-Identity: \"%s\" <%s>", msg->string_arg, tech_pvt->caller_profile->destination_number);
nua_update(tech_pvt->nh, nua_update(tech_pvt->nh,
NUTAG_SESSION_TIMER(tech_pvt->session_timeout), NUTAG_SESSION_TIMER(tech_pvt->session_timeout),

View File

@ -10476,7 +10476,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
(!is_tcp && !is_tls && (zstr(network_ip) || !switch_check_network_list_ip(network_ip, profile->local_network)) && (!is_tcp && !is_tls && (zstr(network_ip) || !switch_check_network_list_ip(network_ip, profile->local_network)) &&
profile->server_rport_level >= 2 && sip->sip_user_agent && profile->server_rport_level >= 2 && sip->sip_user_agent &&
sip->sip_user_agent->g_string && sip->sip_user_agent->g_string &&
(!strncasecmp(sip->sip_user_agent->g_string, "Polycom", 7) || !strncasecmp(sip->sip_user_agent->g_string, "KIRK Wireless Server", 20))) (!strncasecmp(sip->sip_user_agent->g_string, "Poly", 4) || !strncasecmp(sip->sip_user_agent->g_string, "KIRK Wireless Server", 20)))
) { ) {
if (sip->sip_via) { if (sip->sip_via) {
const char *port = sip->sip_via->v_port; const char *port = sip->sip_via->v_port;

View File

@ -2501,7 +2501,7 @@ static char *gen_pidf(char *user_agent, char *id, char *url, char *open, char *r
{ {
char *ret = NULL; char *ret = NULL;
if (switch_stristr("polycom", user_agent)) { if (switch_stristr("poly", user_agent)) {
*ct = "application/xpidf+xml"; *ct = "application/xpidf+xml";
/* If unknown/none prpid is provided, just show the user as online. */ /* If unknown/none prpid is provided, just show the user as online. */

View File

@ -1661,7 +1661,7 @@ uint8_t sofia_reg_handle_register_token(nua_t *nua, sofia_profile_t *profile, nu
if (!is_tcp && !is_tls && (zstr(network_ip) || !switch_check_network_list_ip(network_ip, profile->local_network)) && if (!is_tcp && !is_tls && (zstr(network_ip) || !switch_check_network_list_ip(network_ip, profile->local_network)) &&
profile->server_rport_level >= 2 && sip->sip_user_agent && profile->server_rport_level >= 2 && sip->sip_user_agent &&
sip->sip_user_agent->g_string && sip->sip_user_agent->g_string &&
( !strncasecmp(sip->sip_user_agent->g_string, "Polycom", 7) || ( !strncasecmp(sip->sip_user_agent->g_string, "Poly", 4) ||
!strncasecmp(sip->sip_user_agent->g_string, "KIRK Wireless Server", 20) || !strncasecmp(sip->sip_user_agent->g_string, "KIRK Wireless Server", 20) ||
!strncasecmp(sip->sip_user_agent->g_string, "ADTRAN_Total_Access", 19) )) { !strncasecmp(sip->sip_user_agent->g_string, "ADTRAN_Total_Access", 19) )) {
if (sip->sip_via) { if (sip->sip_via) {

View File

@ -126,7 +126,7 @@ hashtable_expand(switch_hashtable_t *h)
realloc(h->table, newsize * sizeof(struct entry *)); realloc(h->table, newsize * sizeof(struct entry *));
if (NULL == newtable) { (h->primeindex)--; return 0; } if (NULL == newtable) { (h->primeindex)--; return 0; }
h->table = newtable; h->table = newtable;
memset(newtable[h->tablelength], 0, newsize - h->tablelength); memset(&newtable[h->tablelength], 0, (newsize - h->tablelength) * sizeof(struct entry*));
for (i = 0; i < h->tablelength; i++) { for (i = 0; i < h->tablelength; i++) {
for (pE = &(newtable[i]), e = *pE; e != NULL; e = *pE) { for (pE = &(newtable[i]), e = *pE; e != NULL; e = *pE) {
index = indexFor(newsize,e->h); index = indexFor(newsize,e->h);