RE: Re: Re: Rewriting E164 numbers after GW selection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This feature is only present in 2.0.6??????????
or this is also available in 2.2 beta . if in 2.0.6 is
available from where i can get this patch

--- Oleg Ustinov <Oleg.Ustinov@nectis.com> wrote:
> To Jan Willamowius
> And Michal Zigmuntowicz
> 
> Gentleman,
> May we all ask you to implement this patch to 2.0.7
> This is really necessary for all GNUGK users,
> especially for a VoIP
> terminators and traders.
> 
> Thank you in advance,
> Oleg
>  
> 
> -----Original Message-----
> From: openh323gk-users-admin@lists.sourceforge.net
>
[mailto:openh323gk-users-admin@lists.sourceforge.net]
> On Behalf Of
> Ian.Campbell@band-x.com
> Sent: Tuesday, December 16, 2003 1:23 PM
> To: openh323gk-users@lists.sourceforge.net;
> openh323gk-developer@lists.sourceforge.net
> Cc: Justin.Wells@band-x.com
> Subject:  Re: Re: Rewriting E164
> numbers after GW
> selection
> 
> Hello All,
> 	I have finally got round to implementing per
> gateway E164 number
> rewriting as discussed in this thread in early
> November. Attached is a patch
> providing it for version 2.0.6. The code provides
> triple stage rewriting:
> 
> per gw input E164 rewriting -> standard E164
> rewriting -> (endpoint
> selection) -> per gw output E164 rewriting 
> 
> This is configured in a new configuration section as
> follows:
> 
> [RasSrv::GWRewriteE164]
> foo=out=1223=2323
> foo=out=13=4444
> foo=in=777=8888
> bar=in=777=9999 
> 
> And so on. The first element in the line is the GW
> that the rule is being
> applied to the second the direction (whether it is
> applied before the
> standard rewriting and the endpoint selection or
> after) and finally the rule
> itself in the same as the standard rewriting
> ([RasSrv::RewriteE164]). All
> this allows much more sophisticated control of what
> is sent to the endpoint
> for example an authentication prefix and per
> endpoint routing policies to be
> constructed. The code has been tested by me, but
> should probably be
> considered alpha quality for now. 
> 
> Jan et al. is there anything I need to do (beyond
> applying this to the 2.2
> CVS archive) to get this included in a future
> release? 
> 
> Regards,
> 
> Ian Campbell
> Band-X Ltd.
> 
> diff -r -U 3 openh323gk/ProxyChannel.cxx
> openh323gk.gwrewrite/ProxyChannel.cxx
> --- openh323gk/ProxyChannel.cxx	2003-09-24
> 10:19:44.000000000 +0000
> +++ openh323gk.gwrewrite/ProxyChannel.cxx	2003-12-15
> 16:55:05.000000000 +0000
> @@ -393,6 +393,8 @@
>  
>  ProxySocket::Result CallSignalSocket::ReceiveData()
>  {
> +	PString in_rewrite_id,out_rewrite_id;
> +
>  	if (!ReadTPKT())
>  		return NoData;
>  
> @@ -424,7 +426,7 @@
>  			}
>  			m_crv = (m_lastQ931->GetCallReference() |
> 0x8000u);
>  			m_setupUUIE = new
> H225_H323_UserInformation(signal);
> -			changed = OnSetup(body);
> +			changed =
> OnSetup(body,in_rewrite_id,out_rewrite_id);
>  			break;
>  		case
>
H225_H323_UU_PDU_h323_message_body::e_callProceeding:
>  			changed = OnCallProceeding(body);
> @@ -492,11 +494,28 @@
>  	if (m_lastQ931->HasIE(Q931::CalledPartyNumberIE))
> {
>  		unsigned plan, type;
>  		PString calledNumber;
> +
> +		// Do per GW inbound rewrite before global
> rewrite
> +		if
> (m_lastQ931->GetCalledPartyNumber(calledNumber,
> &plan,
> &type) &&
> +
>
Toolkit::Instance()->GWRewritePString(in_rewrite_id,true,calledNumber))
> {
> +			m_lastQ931->SetCalledPartyNumber(calledNumber,
> plan,
> type);
> +			changed = true;
> +		}
> +
> +		// Normal rewrite
>  		if
> (m_lastQ931->GetCalledPartyNumber(calledNumber,
> &plan,
> &type) &&
>  		   
> Toolkit::Instance()->RewritePString(calledNumber)) {
>  			m_lastQ931->SetCalledPartyNumber(calledNumber,
> plan,
> type);
>  			changed = true;
>  		}
> +
> +		// Do per GW outbound rewrite after global
> rewrite
> +		if
> (m_lastQ931->GetCalledPartyNumber(calledNumber,
> &plan,
> &type) &&
> +
>
Toolkit::Instance()->GWRewritePString(out_rewrite_id,false,calledNumber))
> {
> +			m_lastQ931->SetCalledPartyNumber(calledNumber,
> plan,
> type);
> +			changed = true;
> +		}
> +
>  	}
>  
>  	if (m_lastQ931->HasIE(Q931::DisplayIE)) { @@
> -687,6 +706,9 @@
>  
>  TCPProxySocket *CallSignalSocket::ForwardCall()  {
> +
> +	PString in_rewrite_id,out_rewrite_id;
> +
>  	// disconnect from forwarder
>  
>
SendReleaseComplete(H225_ReleaseCompleteReason::e_facilityCallDeflection);
>  	Close();
> @@ -744,7 +766,7 @@
>  	ret->m_h245handler = 0;
>  
>  	CallSignalSocket *result = 0;
> -	if (ret->OnSetup(SetupUUIE)) {
> +	if
>
(ret->OnSetup(SetupUUIE,in_rewrite_id,out_rewrite_id))
> {
>  		SetUUIE(*Setup, suuie);
>  		Setup->Encode(ret->buffer);
>  		PrintQ931(5, "Forward Setup to " +
> ret->remote->Name(),
> Setup, &suuie); @@ -774,7 +796,7 @@
>  	return result;
>  }
>  
> -bool CallSignalSocket::OnSetup(H225_Setup_UUIE &
> Setup)
> +bool CallSignalSocket::OnSetup(H225_Setup_UUIE &
> Setup, PString
> &in_rewrite_id, PString &out_rewrite_id)  {
>  	const time_t setupTime = time(NULL);
>  
> @@ -791,8 +813,26 @@
>  			H323SetAliasAddress(destination,
> Setup.m_destinationAddress[0]);
>  		}
>  	}
> -	if
>
(Setup.HasOptionalField(H225_Setup_UUIE::e_destinationAddress))
> +	if
>
(Setup.HasOptionalField(H225_Setup_UUIE::e_destinationAddress))
> {
> +
> +		// Do inbound per GWRewrite if we can before
> global rewrite
> +		if
>
(Setup.HasOptionalField(H225_Setup_UUIE::e_sourceAddress)
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
List: Openh323gk-users@lists.sourceforge.net
Archive: http://sourceforge.net/mailarchive/forum.php?forum_id=8549
Homepage: http://www.gnugk.org/

[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux