[Users] textops modules

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Nov 24 13:41:28 CET 2005


I see....in this case you cannot use replace() as the public IP will all 
the time be different (the public IP of nat).

Use the fix_nated_contact() function from nathelper module: if msg is 
detected from behind nat, do fix_nated_contact() before fwd to *.

regards,
bogdan



harry gaillac wrote:

>In fact I meant:
>
>all private ip of the network replace with a pubil ip.
>what about substution ?
>
>if search("^Contact sip:user at private ip$)) {
>  replace_all ("private ip", "public ip");
>};
>
>You understand my problem .
>
>         asterisk 
>            ||
> Internet=[Ser/nat]==private network
>
>When ser receive REGISTER or INVITE the contact in sip
>hf would be fixed
>so asterisk would not record sip agent with AOR like
>sip:user at private ip.
> 
> 
>Harry
>
>--- Bogdan-Andrei Iancu <bogdan at voice-system.ro> a
>écrit :
>
>  
>
>>Hi Harry,
>>
>>yes you can do this, but not that the change will
>>not be local visible 
>>(in further script processing). the change will
>>actually apply only when 
>>the message is sent out on the network.
>>
>>regards,
>>bogdan
>>
>>harry gaillac wrote:
>>
>>    
>>
>>>Hello,
>>>
>>>How can I use textops module to rewrite all ip
>>>      
>>>
>>private
>>    
>>
>>>addresses in sip contact hf with a public ip 
>>>
>>>I can't write the right regexp.
>>>
>>>if search("^Contact sip:user at private ip$)) {
>>>replace_all ("private ip", "public ip");
>>>};
>>>
>>>Harry
>>>
>>>
>>>	
>>>
>>>	
>>>		
>>>      
>>>
>>___________________________________________________________________________
>>
>>    
>>
>>>Appel audio GRATUIT partout dans le monde avec le
>>>      
>>>
>>nouveau Yahoo! Messenger 
>>    
>>
>>>Téléchargez cette version sur
>>>      
>>>
>>http://fr.messenger.yahoo.com
>>    
>>
>>>_______________________________________________
>>>Users mailing list
>>>Users at openser.org
>>>http://openser.org/cgi-bin/mailman/listinfo/users
>>>
>>> 
>>>
>>>      
>>>
>>    
>>
>
>
>
>	
>
>	
>		
>___________________________________________________________________________ 
>Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
>Téléchargez cette version sur http://fr.messenger.yahoo.com
>  
>





More information about the Users mailing list