[OpenSIPS-Users] How can I Save the Contact URI adding transport=tcp in It?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Oct 9 10:13:56 CEST 2008


Hi Ricardo,

save() function may store (along with the registered contact) a second 
URI to be used for actually sending the requests to (instead of using 
contact) after doing lookup(). It it the mechanism used for NAT 
traversal (learning the public address at network level instead of using 
the private IP from contact.
See the received_avp param:
    http://www.opensips.org/html/docs/modules/devel/registrar.html#id2507796

Before save(), populate this AVP with the modified contact (only URI 
part, without the header params - like q and expires) - use PVs and 
regexp to change it to "sip:2501 at 10.0.0.25:5060;transport=TCP".

Then, after lookup(), the message eill be sent to 
"sip:2501 at 10.0.0.25:5060;transport=TCP" instead of the contact.

Regards,
Bogdan
   



Ricardo Lopez Camino wrote:
> Hi List,
> I would like to know how can I save a Contact URI adding transport=TCP 
> in it.
>  
> If a User Agent registers to OpenSIPS using TCP as transport protocol 
> but it doesnt include transport=TCP in the Contact Header, then that 
> User Agent is unable to receive calls even if the Request URI contains 
> transport=TCP.
>  
> i.e:
> Contact: <sip:2501 at 10.0.0.25:5060 
> <http://sip:2501@10.0.0.25:5060>>;q=0.9;expires=3600                           
> (Original Contact)
> Contact: <sip:2501 at 10.0.0.25:5060;transport=TCP>;q=0.9;expires=3600     (Modified 
> Contact)
>  
> So, I know that this should (or could)  be fixed on the User Agent 
> side; but It would be nice if I can modify the Contact URI in the 
> REGISTER before calling the save("location") function.
>  
> Thanks,
>  
> Ricardo
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list