- added ./autogen.sh

- proxy_rewrite_invitation_body: check success of
  starting RTP relay before rewriting SDP body
- proxy_rewrite_invitation_body: don't fail on
  Contact header with no user part.
- security_check_sip: CSeq header must be present.
This commit is contained in:
Thomas Ries 2004-03-21 11:15:23 +00:00
parent ffdb50d4bd
commit b2ef7599c8
8 changed files with 78 additions and 55 deletions

View File

@ -1,3 +1,12 @@
0.5.5
=====
21-Mar-2004: - added ./autogen.sh
19-Mar-2004: - proxy_rewrite_invitation_body: check success of
starting RTP relay before rewriting SDP body
- proxy_rewrite_invitation_body: don't fail on
Contact header with no user part.
18-Mar-2004: - security_check_sip: CSeq header must be present.
0.5.4
=====
6-Mar-2004: - Released 0.5.4

View File

@ -1,9 +1,9 @@
Release Notes for siproxd-0.5.4
Release Notes for siproxd-0.5.5
===============================
Major changes since 0.5.3:
- minor documentation and FAQ updates
- some bugfixes in Proxy Authorization handling
Major changes since 0.5.4:
-
-
General Overview:
- SIP (RFC3261) Proxy for SIP based softphones hidden behind a
@ -71,16 +71,9 @@ distribution I'd be happy to get a short notice.
-----
md5sum for siproxd-0.5.4.tar.gz: 7bbde9fb65a3285b125b4d208a0cdf62
md5sum for siproxd-0.5.5.tar.gz:
GnuPG signature for siproxd-0.5.4.tar.gz archive:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQBASaprCfzBioe83JQRAswDAJ4rEERvkU0s3HHEnbuA1o44XykMhgCfVpG9
9JqbE3KKTC4/W72C9NUxUn8=
=LvlG
-----END PGP SIGNATURE-----
GnuPG signature for siproxd-0.5.5.tar.gz archive:
GnuPG: pub 1024D/87BCDC94 2000-03-19 Thomas Ries <tries@gmx.net>

13
autogen.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
test -f configure.in || {
echo "**Error**: This directory does not look like the top-level directory"
exit 1
}
set -e
aclocal
autoheader
automake -a
autoconf

View File

@ -37,7 +37,7 @@ dnl Release Version
dnl
SPD_MAJOR_VERSION=0
SPD_MINOR_VERSION=5
SPD_MICRO_VERSION=4
SPD_MICRO_VERSION=5
SPD_VERSION=$SPD_MAJOR_VERSION.$SPD_MINOR_VERSION.$SPD_MICRO_VERSION

View File

@ -963,29 +963,42 @@ if (configuration.debuglevel)
if (msg_port > 0) {
osip_uri_t *cont_url = NULL;
char *user=NULL;
char *client_id=NULL;
/* try to get some additional UA specific unique ID.
* Try:
* 1) User part of Contact header
* 2) Host part of Contact header (will be different
* between internal UA and external UA)
*/
if (!osip_list_eol(mymsg->contacts, 0))
cont_url = ((osip_contact_t*)(mymsg->contacts->node->element))->url;
if (cont_url) user=cont_url->username;
rtp_start_fwd(osip_message_get_call_id(mymsg),
user,
rtp_direction,
media_stream_no,
map_addr, &map_port,
msg_addr, msg_port);
/* and rewrite the port */
sdp_med=osip_list_get(sdp->m_medias, media_stream_no);
if (sdp_med && sdp_med->m_port) {
osip_free(sdp_med->m_port);
sdp_med->m_port=osip_malloc(8); /* 5 digits, \0 + align */
sprintf(sdp_med->m_port, "%i", map_port);
DEBUGC(DBCLASS_PROXY, "proxy_rewrite_invitation_body: "
"m= rewrote port to [%i]",map_port);
} else {
ERROR("rewriting port in m= failed sdp_med=%p, "
"m_number_of_port=%p", sdp_med, sdp_med->m_port);
if (cont_url) {
client_id=cont_url->username;
if (client_id == NULL) client_id=cont_url->host;
}
sts = rtp_start_fwd(osip_message_get_call_id(mymsg),
client_id,
rtp_direction,
media_stream_no,
map_addr, &map_port,
msg_addr, msg_port);
if (sts == STS_SUCCESS) {
/* and rewrite the port */
sdp_med=osip_list_get(sdp->m_medias, media_stream_no);
if (sdp_med && sdp_med->m_port) {
osip_free(sdp_med->m_port);
sdp_med->m_port=osip_malloc(8); /* 5 digits, \0 + align */
sprintf(sdp_med->m_port, "%i", map_port);
DEBUGC(DBCLASS_PROXY, "proxy_rewrite_invitation_body: "
"m= rewrote port to [%i]",map_port);
} else {
ERROR("rewriting port in m= failed sdp_med=%p, "
"m_number_of_port=%p", sdp_med, sdp_med->m_port);
}
} /* sts == success */
} /* if msg_port > 0 */
} else {
/* no port defined - skip entry */

View File

@ -348,7 +348,7 @@ int rtp_relay_start_fwd (osip_call_id_t *callid, char *client_id,
}
if (client_id == NULL) {
ERROR("rtp_relay_start_fwd: contact header is NULL!");
ERROR("rtp_relay_start_fwd: did not get a client ID!");
return STS_FAILURE;
}

View File

@ -83,39 +83,31 @@ int security_check_sip(osip_message_t *sip){
}
}
/* check for existing To: header */
if (sip->to == NULL) {
if ((sip->to==NULL)||(sip->to->url==NULL)||(sip->to->url->host==NULL)) {
ERROR("security check failed: NULL To Header");
return STS_FAILURE;
}
/* check for existing To: URL */
if (sip->to->url == NULL) {
ERROR("security check failed: NULL To->url Header");
return STS_FAILURE;
}
/* check for existing TO URL host*/
if (sip->to->url->host == NULL) {
ERROR("security check failed: NULL To->url->host Header");
return STS_FAILURE;
}
/* check for existing FROM */
if (sip->from == NULL) {
if ((sip->from==NULL)||(sip->from->url==NULL)||(sip->from->url->host==NULL)) {
ERROR("security check failed: NULL From Header");
return STS_FAILURE;
}
/* check for existing FROM URL */
if (sip->from->url == NULL) {
ERROR("security check failed: NULL From->url Header");
return STS_FAILURE;
}
/* check for existing FROM URL host*/
if (sip->from->url->host == NULL) {
ERROR("security check failed: NULL From->url->host Header");
/* check for existing CSEQ header */
if ((sip->cseq==NULL)||(sip->cseq->method==NULL)||(sip->cseq->number==NULL)) {
ERROR("security check failed: NULL CSeq Header");
return STS_FAILURE;
}
/*
check the RFC and implement tests for ALL mandatory headers here
*/
/* TODO: still way to go here ... */
return STS_SUCCESS;
}

View File

@ -73,10 +73,12 @@ osip_message_t *msg_make_template_reply (osip_message_t * request, int code) {
if (request->to==NULL) {
ERROR("msg_make_template_reply: empty To in request header");
return NULL;
}
if (request->from==NULL) {
ERROR("msg_make_template_reply: empty From in request header");
return NULL;
}
osip_to_clone (request->to, &response->to);
@ -97,6 +99,7 @@ osip_message_t *msg_make_template_reply (osip_message_t * request, int code) {
}
osip_call_id_clone(request->call_id,&response->call_id);
osip_cseq_clone(request->cseq,&response->cseq);
return response;