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

Ravitez Ravi ravitez.dondeti at gmail.com
Fri May 13 21:30:58 CEST 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160513/6c74752e/attachment.htm>


More information about the Users mailing list