- Hack for Grandstream SIP phones and SUBSCRIBE response
now SELECTIVE for Grandstream phones (kphone did not seem to like 404 answers... How picky these little thingies are...)
This commit is contained in:
parent
abf4b77229
commit
9225138b91
@ -1,6 +1,6 @@
|
||||
0.5.4
|
||||
=====
|
||||
14-Feb-2004: - Hack for Grandstream SIP phones and SUBSCRIBE response
|
||||
16-Feb-2004: - Hack for Grandstream SIP phones and SUBSCRIBE response
|
||||
|
||||
0.5.3
|
||||
=====
|
||||
|
||||
89
doc/FAQ
89
doc/FAQ
@ -217,92 +217,3 @@ A: That is not a bug but a known limitation of siproxd. Currently it
|
||||
locally is not supported.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
yet unstructured:
|
||||
Hi there
|
||||
|
||||
|
||||
As the maintainer of siproxd I may provide some useful informations ;-)
|
||||
|
||||
First I have to admin that the documentation of siproxd is
|
||||
a) far from complete
|
||||
b) not very detailed yet
|
||||
c) could be better ;-)
|
||||
|
||||
For your enviroment the config of the linphone SIP parameters
|
||||
would look like:
|
||||
|
||||
Your sip address: sip:rbrewer@<your_ppp_IP_address>
|
||||
Server address: sip:192.168.0.1
|
||||
Address of record: sip:rbrewer@<your_ppp_IP_address>
|
||||
|
||||
The following check boxes enabled:
|
||||
- use sip registrar
|
||||
- Proxy server
|
||||
- Outbound Proxy
|
||||
|
||||
<your_ppp_IP_address> is the IP address (or host name) that you
|
||||
got on the PPP link.
|
||||
|
||||
For siproxd, the outbound address will be <your_ppp_IP_address>.
|
||||
Currently, you have two possibilities to use dynamic IP addresses
|
||||
with siproxd:
|
||||
|
||||
a) Edit the config file each time you IP changes
|
||||
I agree, this is not desirable
|
||||
|
||||
b) use some dynamic DNS service and then use the host name.
|
||||
I personally use DynDNS (-> http://www.dyndns.org)
|
||||
|
||||
I may add some better support for dynamic IP addresses within
|
||||
siproxd.
|
||||
|
||||
(has anybody some C code snipplets at hand how to fetch the IP
|
||||
address of a specific interface by knowing just its name?)
|
||||
|
||||
|
||||
Regards,
|
||||
|
||||
/Thomas
|
||||
|
||||
|
||||
> Message: 3
|
||||
> To: linphone-users@nongnu.org
|
||||
> Date: Tue, 12 Nov 2002 01:38:04 -0500 (EST)
|
||||
> Reply-To: rbrewer@op.net
|
||||
> From: rbrewer@op.net (Robert W. Brewer)
|
||||
> Subject: [Linphone-users]use with outbound proxy siproxd
|
||||
>
|
||||
> I'm running the Linphone 0.9.1 Debian package. It's working correctly
|
||||
> as much as I've tested so far, which is just talking to sipomatic.
|
||||
>
|
||||
> Now I'm trying to operate with siproxd as an outbound proxy, since
|
||||
> my Linphone machine connects to the Internet via another Linux box
|
||||
> configured as an IP masquerading firewall.
|
||||
>
|
||||
> I've read the documentation, and it isn't very clear about
|
||||
> what the different addresses mean. In particular, I'm
|
||||
> confused about what to fill in for the following fields
|
||||
> in the SIP Parameters tab:
|
||||
>
|
||||
> Your sip address: sip:rbrewer@wiz
|
||||
> Server address: sip:192.168.0.1
|
||||
> Address of record sip:rbrewer@192.168.0.1
|
||||
>
|
||||
> Do those look correct? Do they even matter since I'm not
|
||||
> really registering with a server? Note that wiz is not a valid
|
||||
> external DNS name. Linphone does seem to be registering with
|
||||
> my siproxd.
|
||||
>
|
||||
> 192.168.0.1 is the internal address of my firewall machine
|
||||
> 209.92.x.y is the external (ppp) address of my firewall machine,
|
||||
> which is dynamic
|
||||
> 192.168.0.10 is the internal address of my Linphone machine
|
||||
>
|
||||
> Also, it appears that every time I start my ppp session
|
||||
> I will have to edit the siproxd config file and tell it
|
||||
> my new outbound ppp address. Is that true?
|
||||
>
|
||||
> Thanks for any hints.
|
||||
>
|
||||
> -Rob
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <osipparser2/osip_parser.h>
|
||||
#include <osipparser2/osip_port.h>
|
||||
#include <osipparser2/osip_md5.h>
|
||||
|
||||
#include "digcalc.h"
|
||||
@ -364,7 +363,7 @@ void DigestCalcHA1(
|
||||
if (pszPassword) MD5Update(&Md5Ctx, pszPassword, strlen(pszPassword));
|
||||
MD5Final(HA1, &Md5Ctx);
|
||||
|
||||
if ((pszAlg!=NULL)&&strcasecmp(pszAlg, "md5-sess") == 0) {
|
||||
if ((pszAlg!=NULL) && (osip_strcasecmp(pszAlg, "md5-sess") == 0)) {
|
||||
MD5Init(&Md5Ctx);
|
||||
MD5Update(&Md5Ctx, HA1, HASHLEN);
|
||||
MD5Update(&Md5Ctx, ":", 1);
|
||||
|
||||
@ -725,11 +725,16 @@ int proxy_response (osip_message_t *response, struct sockaddr_in *from) {
|
||||
* '404 unknown destination'
|
||||
*
|
||||
*/
|
||||
if ((MSG_IS_RESPONSE_FOR(response,"SUBSCRIBE")) &&
|
||||
{
|
||||
osip_header_t *ua_hdr=NULL;
|
||||
osip_message_get_user_agent(response, 0, &ua_hdr);
|
||||
if (ua_hdr && ua_hdr->hvalue &&
|
||||
(osip_strncasecmp(ua_hdr->hvalue,"grandstream", 11)==0) &&
|
||||
(MSG_IS_RESPONSE_FOR(response,"SUBSCRIBE")) &&
|
||||
(MSG_TEST_CODE(response, 202))) {
|
||||
response->status_code=404;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
|
||||
@ -36,7 +36,6 @@
|
||||
#include <pwd.h>
|
||||
|
||||
#include <osipparser2/osip_parser.h>
|
||||
#include <osipparser2/osip_port.h>
|
||||
#include <osipparser2/osip_md5.h>
|
||||
|
||||
#include "siproxd.h"
|
||||
@ -259,7 +258,7 @@ int compare_url(osip_uri_t *url1, osip_uri_t *url2) {
|
||||
|
||||
/* compare SCHEME (if present) case INsensitive */
|
||||
if (url1->scheme && url2->scheme) {
|
||||
if (strcasecmp(url1->scheme, url2->scheme) != 0) {
|
||||
if (osip_strcasecmp(url1->scheme, url2->scheme) != 0) {
|
||||
DEBUGC(DBCLASS_PROXY, "compare_url: scheme mismatch");
|
||||
return STS_FAILURE;
|
||||
}
|
||||
@ -305,7 +304,7 @@ int compare_url(osip_uri_t *url1, osip_uri_t *url2) {
|
||||
}
|
||||
} else {
|
||||
/* compare hostname strings case INsensitive */
|
||||
if (strcasecmp(url1->host, url2->host) != 0) {
|
||||
if (osip_strcasecmp(url1->host, url2->host) != 0) {
|
||||
DEBUGC(DBCLASS_PROXY, "compare_url: host name mismatch");
|
||||
return STS_FAILURE;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user