[Serusers] Need to work on subst().

Greger V. Teigre greger at teigre.com
Wed Sep 13 11:24:23 CEST 2006


I think you might be better off with standard NAT-handling functions 
from nathelper module, i.e. fix_nated_contact()
g-)

ravi reddy wrote:
> Hi  Ricardo ,
>
>       I too need the same process which you had done by subst(); 
> function. two weeks back i had posted a mail to ser-users . regarding 
> this issue.
>
>     because one call-shop with the small sip-proxy using private 
> ip-adress controls the remaing phones .   and with one username i am 
> giving access to all phones so that  i can bill for one account only .
>
>   but when a sip-phone registered to that callshop make call it 
> forwards to my SER with contact id
> as eg: 12345 at 192.168.2.101 <mailto:12345 at 192.168.2.101> .so, the call 
> comes in as it just requires authorise but when we hung the phone the 
> "BYE" messages are not recieving by both end parties because SER is 
> sending "BYE" messages to that contact-id that is private ip so call 
> became "idle" for 30-40 seconds and after it shut down.
>
> so now i need to rewrite the contact part of that private ip-address 
> and just use NAT ipadress
> of that sip-proxy(call-shop)
>
>  i saw your subst(); funct. in your mail but i dont know where and how 
> to use that,(I am not a programmer)
>
>    So how you suggest me to do that for rewriting any private 
> ip-adresss and replacing NAT-address so that the call will ends when 
> it recieve "BYE" message .
>
>
> below is the trace of that:
>
> U 82.102.69.105:39871 <http://82.102.69.105:39871/> -> 
> 81.21.33.35:5060 <http://81.21.33.35:5060/>
> INVITE sip:99106883 at 81.21.33.35:5060 SIP/2.0.
> To: "99106883"<sip:99106883 at 81.21.33.35 
> <mailto:sip:99106883 at 81.21.33.35> :5060>.
> From: "12345"<sip:12345 at 81.21.33.35:5060>;tag=c86b66ad8b9187c8.
> Via: SIP/2.0/UDP 192.168.1.100:5060 
> <http://192.168.1.100:5060/>;branch=z9hG4bK-d87543-bcf89635
> ebeba2e78782465686dfaf52-1--d87543-;rport.
> Via: SIP/2.0/UDP 192.168.1.102 
> <http://192.168.1.102/>;branch=z9hG4bKf638e18b56022ea3.
> Call-ID: a78d5c993a9dd6b4 at 192.168.1.102 
> <mailto:a78d5c993a9dd6b4 at 192.168.1.102>.
> CSeq: 47344 INVITE.
> Record-Route: <sip:192.168.1.100:5060 <http://192.168.1.100:5060/>>.
> Contact: <sip: 192.168.1.100:5060 <http://192.168.1.100:5060/>>.
> Max-Forwards: 69.
> Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, INFO, SUBSCRIBE.
> Content-Type: application/sdp.
> Supported: replaces.
> User-Agent: Grandstream BT110 1.0.8.23 <http://1.0.8.23/> .
> Content-Length: 361.
>
> Ricardo here i need to replace
>
>   contact<sip:192.168.1.100 <http://192.168.1.100>> with above NAT ip 
> address
>
> that is with 82.102.69.105:39871 <http://82.102.69.105:39871/>
>  
> how ??/
>
> please assist me so that i can solve my problem.
>
>                              Thank You.
>
> Regards,
> Ravi.    
> ------------------------------------------------------------------------
>
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20060913/471a75dc/attachment.htm>


More information about the sr-users mailing list