[OpenSIPS-Users] IS_MYSELF() always uses 5060 if received port is 0

Bogdan-Andrei Iancu bogdan at opensips.org
Tue May 17 17:51:51 CEST 2016


Hi,

That is a great catch, thank you for finding and reporting this. See the 
attach patch that should address the problem. Could you please give it a 
try to see if it really solves the problem ?

Best Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 13.05.2016 22:30, Ravitez Ravi wrote:
> Hi All,
>         Good Day,
>         Here's the problem i'm facing and would be a great help if you 
> could comment.
>         Thank you.
>
> is_myself() does not check for SIPS port if connection type is TLS
> *Configuration :*
> - Opensips V1.11.5 running in secure mode on port 5061
> - Avaya trying to communicate with Opensips server.
> - Opensips server ip 192.168.1.11
> - Avaya ip : 192.168.1.20
>
>
> *Steps :*
> - Avaya sends INVITE to Opensips with route header
> Route: <sip:192.168.1.11;transport=tls;lr;phase=terminating>
> - Opensips tries to process it but fails.
> *DBG:rr:is_preloaded: is_preloaded: Yes*
> *DBG:core:grep_sock_info: checking if host==us: 14==14 && 
>  [192.168.1.11] == [192.168.1.11]*
> *DBG:core:grep_sock_info: checking if port 5061 matches port 5060*
> *DBG:core:check_self: host != me*
> *DBG:rr:after_loose: Topmost URI is NOT myself*
> ....
> ....
> ....
> SIP/2.0 403 Preload Route denied
> *Code Snippet :*
> /*
>  * Check if URI is myself
>  */
> #ifdef ENABLE_USER_CHECK
> static inline int is_myself(str *_user, str* _host, unsigned short _port)
> #else
> static inline int is_myself(str* _host, unsigned short _port)
> #endif
> {
> int ret;
>
> *ret = check_self(_host, _port ? _port : SIP_PORT, 0);/* match all 
> protos*/*
> if (ret < 0) return 0;
>
> *Should is_myself() check for connection type and then decide to 
> either use SIP or SIPS port.*
> *
> *
> *
> *
> *
> *
> Regards,
> Ravitez.D
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160517/102dfd5a/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rr_myself_port.patch
Type: text/x-patch
Size: 2449 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20160517/102dfd5a/attachment-0001.bin>


More information about the Users mailing list