[asterisk-commits] may: branch may/ooh323_ipv6 r294123 - in /team/may/ooh323_ipv6: ./ addons/ ad...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Nov 7 14:34:41 CST 2010
Author: may
Date: Sun Nov 7 14:34:35 2010
New Revision: 294123
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=294123
Log:
small cleanups in clearing failed calls
correction for parse remote address for outgoing call
enhancements for parsing ip addrs per host/user
removed todo - all things implemented
Removed:
team/may/ooh323_ipv6/todo
Modified:
team/may/ooh323_ipv6/addons/chan_ooh323.c
team/may/ooh323_ipv6/addons/ooh323c/src/oochannels.c
team/may/ooh323_ipv6/addons/ooh323c/src/ooq931.c
Modified: team/may/ooh323_ipv6/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/addons/chan_ooh323.c?view=diff&rev=294123&r1=294122&r2=294123
==============================================================================
--- team/may/ooh323_ipv6/addons/chan_ooh323.c (original)
+++ team/may/ooh323_ipv6/addons/chan_ooh323.c Sun Nov 7 14:34:35 2010
@@ -2231,12 +2231,14 @@
&user->capability, tcodecs, 1);
} else if (!strcasecmp(v->name, "amaflags")) {
user->amaflags = ast_cdr_amaflags2int(v->value);
- } else if (!strcasecmp(v->name, "ip")) {
- strncpy(user->mIP, v->value, sizeof(user->mIP)-1);
+ } else if (!strcasecmp(v->name, "ip") || !strcasecmp(v->name, "host")) {
+ struct ast_sockaddr p;
+ if (!ast_parse_arg(v->value, PARSE_ADDR, &p)) {
+ ast_copy_string(user->mIP, ast_sockaddr_stringify_addr(&p), sizeof(user->mIP)-1);
+ } else {
+ ast_copy_string(user->mIP, v->value, sizeof(user->mIP)-1);
+ }
user->mUseIP = 1;
- } else if (!strcasecmp(v->name, "host")) {
- strncpy(user->mIP, v->value, sizeof(user->mIP)-1);
- user->mUseIP = 1;
} else if (!strcasecmp(v->name, "dtmfmode")) {
if (!strcasecmp(v->value, "rfc2833"))
user->dtmfmode = H323_DTMF_RFC2833;
@@ -2332,10 +2334,14 @@
}
} else if (!strcasecmp(v->name, "port")) {
peer->port = atoi(v->value);
- } else if (!strcasecmp(v->name, "ip")) {
- ast_copy_string(peer->ip, v->value, sizeof(peer->ip));
- } else if (!strcasecmp(v->name, "host")) {
- ast_copy_string(peer->ip, v->value, sizeof(peer->ip));
+ } else if (!strcasecmp(v->name, "host") || !strcasecmp(v->name, "ip")) {
+ struct ast_sockaddr p;
+ if (!ast_parse_arg(v->value, PARSE_ADDR, &p)) {
+ ast_copy_string(peer->ip, ast_sockaddr_stringify_host(&p), sizeof(peer->ip));
+ } else {
+ ast_copy_string(peer->ip, v->value, sizeof(peer->ip));
+ }
+
} else if (!strcasecmp(v->name, "outgoinglimit")) {
peer->outgoinglimit = atoi(v->value);
if (peer->outgoinglimit < 0)
@@ -3959,7 +3965,6 @@
ast_rtp_instance_get_local_address(p->rtp, &tmp);
strncpy(lhost, ast_sockaddr_stringify_addr(&tmp), sizeof(lhost));
lport = ast_sockaddr_stringify_port(&tmp);
- ast_verbose("rtp address: %s:%s\n", lhost, lport);
if (p->rtptimeout) {
ast_rtp_instance_set_timeout(p->rtp, p->rtptimeout);
Modified: team/may/ooh323_ipv6/addons/ooh323c/src/oochannels.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/addons/ooh323c/src/oochannels.c?view=diff&rev=294123&r1=294122&r2=294123
==============================================================================
--- team/may/ooh323_ipv6/addons/ooh323c/src/oochannels.c (original)
+++ team/may/ooh323_ipv6/addons/ooh323c/src/oochannels.c Sun Nov 7 14:34:35 2010
@@ -1427,7 +1427,8 @@
{
call->callEndReason = OO_REASON_TRANSPORTFAILURE;
call->callState = OO_CALL_CLEAR;
- }
+ } else if (call->callState == OO_CALL_CLEAR)
+ call->callState = OO_CALL_CLEAR_RELEASESENT;
return OO_FAILED;
}
}/* end of type==OOQ931MSG */
Modified: team/may/ooh323_ipv6/addons/ooh323c/src/ooq931.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/addons/ooh323c/src/ooq931.c?view=diff&rev=294123&r1=294122&r2=294123
==============================================================================
--- team/may/ooh323_ipv6/addons/ooh323c/src/ooq931.c (original)
+++ team/may/ooh323_ipv6/addons/ooh323c/src/ooq931.c Sun Nov 7 14:34:35 2010
@@ -3616,7 +3616,7 @@
return OO_OK;
}
- if (ast_parse_arg(dest, PARSE_ADDR, &tmpaddr)) {
+ if (!ast_parse_arg(dest, PARSE_ADDR, &tmpaddr)) {
if(strlen(dest)+1>len)
{
OOTRACEERR1("Error:Insufficient buffer space for parsed ip - "
More information about the asterisk-commits
mailing list