From b30eb82b84f5f4c46b909dbc5b781a57e0c77906 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 23 Oct 2006 20:28:55 +0000 Subject: [PATCH] new sofia rollout git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3166 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../mod_conference/mod_conference.c | 2 +- src/mod/endpoints/mod_sofia/Makefile | 2 +- src/mod/endpoints/mod_sofia/mod_sofia.c | 20 ++++++++++++++----- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 0fe60e8207..d804ba9556 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -3126,7 +3126,7 @@ static switch_status_t chat_send(char *proto, char *from, char *to, char *subjec } if (!(conference = (conference_obj_t *) switch_core_hash_find(globals.conference_hash, name))) { - ci->chat_send(CONF_CHAT_PROTO, to, hint ? hint : from, "", "Sorry, We're Closed", NULL); + ci->chat_send(CONF_CHAT_PROTO, to, hint && strchr(hint, '/') ? hint : from, "", "Sorry, We're Closed", NULL); return SWITCH_STATUS_FALSE; } diff --git a/src/mod/endpoints/mod_sofia/Makefile b/src/mod/endpoints/mod_sofia/Makefile index edec196d87..fc75f03687 100644 --- a/src/mod/endpoints/mod_sofia/Makefile +++ b/src/mod/endpoints/mod_sofia/Makefile @@ -1,6 +1,6 @@ OS_ARCH := $(subst /,_,$(shell uname -s | sed /\ /s//_/)) VERSION = sofia-sip-1.12 -TARBALL = sofia-sip-1.12.3.4.tar.gz +TARBALL = sofia-sip-1.12.3.5.tar.gz CFLAGS += -I. -I$(PREFIX)/include/$(VERSION) LDFLAGS += -lsofia-sip-ua LINKER=$(CC) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index e9844a53e0..23ed79efa8 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -926,7 +926,7 @@ static void do_invite(switch_core_session_t *session) nua_invite(tech_pvt->nh, TAG_IF(rpid, SIPTAG_HEADER_STR(rpid)), - TAG_IF(alert_info, SIPTAG_HEADER_STR(alert_info)), + TAG_IF(alert_info, SIPTAG_HEADER_STR(alert_info)), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE), SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL), @@ -2937,7 +2937,7 @@ static int sub_callback(void *pArg, int argc, char **argv, char **columnNames) nua_handle_t *nh; char *to; char *open; - + if (!rpid) { rpid = "unknown"; } @@ -2975,8 +2975,10 @@ static int sub_callback(void *pArg, int argc, char **argv, char **columnNames) "%s\r\n" "", id, open, rpid, note); + + nh = nua_handle(profile->nua, NULL, TAG_END()); - + nua_notify(nh, NUTAG_URL(contact), SIPTAG_TO_STR(full_from), @@ -3093,7 +3095,7 @@ static void sip_i_subscribe(int status, } if (!(proto && to_user && to_host)) { - nua_respond(nh, SIP_404_NOT_FOUND, TAG_END()); + nua_respond(nh, SIP_404_NOT_FOUND, NUTAG_WITH_THIS(nua), TAG_END()); goto end; } } @@ -3135,12 +3137,15 @@ static void sip_i_subscribe(int status, sstr = switch_mprintf("active;expires=%ld", exp_raw); nua_respond(nh, SIP_202_ACCEPTED, + NUTAG_WITH_THIS(nua), SIPTAG_SUBSCRIPTION_STATE_STR(sstr), SIPTAG_FROM(sip->sip_to), SIPTAG_TO(sip->sip_from), SIPTAG_CONTACT_STR(to_str), TAG_END()); + + switch_safe_free(sstr); if (!(db = switch_core_db_open_file(profile->dbname))) { @@ -3547,7 +3552,7 @@ static void sip_i_publish(nua_t *nua, } - nua_respond(nh, SIP_200_OK, TAG_END()); + nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS(nua), TAG_END()); } @@ -4104,6 +4109,7 @@ static void *SWITCH_THREAD_FUNC profile_thread_run(switch_thread_t *thread, void event_callback, /* Callback for processing events */ profile, /* Additional data to pass to callback */ NUTAG_URL(profile->url), + NTATAG_UDP_MTU(65536), TAG_END()); /* Last tag should always finish the sequence */ nua_set_params(profile->nua, @@ -4113,7 +4119,11 @@ static void *SWITCH_THREAD_FUNC profile_thread_run(switch_thread_t *thread, void NUTAG_ALLOW("REGISTER"), NUTAG_ALLOW("REFER"), TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("PUBLISH")), + TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("NOTIFY")), + TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("SUBSCRIBE")), TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ENABLEMESSAGE(1)), + TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence")), + TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence.winfo")), SIPTAG_SUPPORTED_STR("100rel, precondition"), SIPTAG_USER_AGENT_STR(SOFIA_USER_AGENT), TAG_END());