[svn-commits] may: branch may/ooh323_ipv6 r294119 - in /team/may/ooh323_ipv6: ./ addons/ ad...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sat Nov 6 09:47:15 CDT 2010
Author: may
Date: Sat Nov 6 09:47:08 2010
New Revision: 294119
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=294119
Log:
using ast_stringify_host
Modified:
team/may/ooh323_ipv6/addons/chan_ooh323.c
team/may/ooh323_ipv6/addons/ooh323c/src/oochannels.c
team/may/ooh323_ipv6/todo
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=294119&r1=294118&r2=294119
==============================================================================
--- team/may/ooh323_ipv6/addons/chan_ooh323.c (original)
+++ team/may/ooh323_ipv6/addons/chan_ooh323.c Sat Nov 6 09:47:08 2010
@@ -1784,10 +1784,14 @@
} else {
ast_mutex_unlock(&p->lock);
ast_log(LOG_ERROR, "Unacceptable ip %s\n", call->remoteIP);
- if (!user)
+ if (!user) {
ooHangCall(call->callToken, ooh323_convert_hangupcause_asteriskToH323(AST_CAUSE_CALL_REJECTED), AST_CAUSE_CALL_REJECTED);
- else
+ call->callEndReason = OO_REASON_REMOTE_REJECTED;
+ }
+ else {
ooHangCall(call->callToken, ooh323_convert_hangupcause_asteriskToH323(AST_CAUSE_NORMAL_CIRCUIT_CONGESTION), AST_CAUSE_NORMAL_CIRCUIT_CONGESTION);
+ call->callEndReason = OO_REASON_REMOTE_REJECTED;
+ }
ast_set_flag(p, H323_NEEDDESTROY);
return -1;
}
@@ -3886,7 +3890,7 @@
int configure_local_rtp(struct ooh323_pvt *p, ooCallData *call)
{
- char *lhost=NULL, *lport=NULL;
+ char lhost[INET6_ADDRSTRLEN], *lport=NULL;
struct ast_sockaddr tmp;
ooMediaInfo mediaInfo;
int x;
@@ -3909,8 +3913,7 @@
}
/* figure out our local RTP port and tell the H.323 stack about it*/
ast_rtp_instance_get_local_address(p->rtp, &tmp);
- /* lhost = ast_sockaddr_stringify_host(&tmp);*/
- lhost = gIP;
+ strncpy(lhost, ast_sockaddr_stringify_addr(&tmp), sizeof(lhost));
lport = ast_sockaddr_stringify_port(&tmp);
ast_verbose("rtp address: %s:%s\n", lhost, lport);
@@ -3955,7 +3958,7 @@
if (p->udptl) {
ast_udptl_get_us(p->udptl, &tmp);
- lhost = ast_sockaddr_stringify_host(&tmp);
+ strncpy(lhost, ast_sockaddr_stringify_addr(&tmp), sizeof(lhost));
lport = ast_sockaddr_stringify_port(&tmp);
}
ast_copy_string(mediaInfo.lMediaIP, lhost, sizeof(mediaInfo.lMediaIP));
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=294119&r1=294118&r2=294119
==============================================================================
--- team/may/ooh323_ipv6/addons/ooh323c/src/oochannels.c (original)
+++ team/may/ooh323_ipv6/addons/ooh323c/src/oochannels.c Sat Nov 6 09:47:08 2010
@@ -684,7 +684,7 @@
"(%s, %s)\n", call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
{
- call->callEndReason = OO_REASON_INVALIDMESSAGE;
+ if (!call->callEndReason) call->callEndReason = OO_REASON_INVALIDMESSAGE;
call->callState = OO_CALL_CLEAR;
}
}
Modified: team/may/ooh323_ipv6/todo
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/todo?view=diff&rev=294119&r1=294118&r2=294119
==============================================================================
--- team/may/ooh323_ipv6/todo (original)
+++ team/may/ooh323_ipv6/todo Sat Nov 6 09:47:08 2010
@@ -1,3 +1,4 @@
-understand about stringify_host
+understand about stringify_host + (done)
make accurate ooParseDestination
ipv4 in ipv6 mode
+bind on unknown address?
More information about the svn-commits
mailing list