Re: [OpenSIPS-Users] Private IP in registered AOR causing failure
But handle_subscribe() has nothing to do the registration or soit is presence related Regards, Bogdan osiris123d wrote: > opensipslist, > > I am not sure if you ever figured this out or not. I just ran into the same > issue and the way to resolve it is to do the following before > handle_subscribe() > > fix_nated_register() > > > So you would need to do > > > fix_nated_register() > handle_subscribe() > > > I hope that is the issue you were having. > -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Private IP in registered AOR causing failure
opensipslist, I am not sure if you ever figured this out or not. I just ran into the same issue and the way to resolve it is to do the following before handle_subscribe() fix_nated_register() So you would need to do fix_nated_register() handle_subscribe() I hope that is the issue you were having. -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Private-IP-in-registered-AOR-causing-failure-tp4421398p5025386.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Private IP in registered AOR causing failure
Hi Brian, maybe adding some extra logging (info or notice) to print (when building a SUBSCRIBE) the RURI , the OBP (received) and other info to see that presence is doing (or not) the right job After that you simply run it and check from time to time the logs What do you say ? Regards, Bogdan opensipsl...@encambio.com wrote: > Hello Bogdan, > > An ven., janv 29, 2010, Bogdan-Andrei Iancu schrieb: > >> opensipsl...@encambio.com wrote: >> 1) the BLA part is sending the SUBSCRIBEs based on user location and it is using the "received" field if present, so it should be ok. Unless you set in the bla module the "outbound" param - this will override the received info. >>> My module parameters for presence and BLA are: >>> >>> modparam("presence", "server_address", "sip:p...@name.host.tld") >>> modparam("presence_xml", "force_active", 1) >>> modparam("pua_bla", "server_address", "sip:p...@name.host.tld") >>> modparam("pua_bla", "default_domain", "name.host.tld") >>> modparam("pua_bla", "header_name", "Sender") >>> >>> ...so I'm not setting the 'outbound' parameter it seems, right? >>> >>> >> In such a case, check in usrloc if the registrations for the user >> the SUBSCRIBE belongs to, do has the received field - maybe the >> error is when saving the contacts and not when using them. >> >> > That would be nice, but I don't think so: > > # /pfx/sbin/opensipsctl ul show > AOR:: user1 > Contact:: sip:us...@192.168.0.31:3618;transport=tls;line=9hm7f0ua Q=1 > Expires:: 352 > Callid:: 703c26357076-zmjcebpdyaey > Cseq:: 1058 > User-agent:: Unimportant > Received:: sip:82.90.12.232:2108;transport=TLS > State:: CS_SYNC > Flags:: 0 > Cflag:: 64 > Socket:: tls:62.124.111.222:5061 > Methods:: 7999 > > > After running a socket listener on 192.168.0.31 on the OpenSIPS host: > >$ socat TCP4-LISTEN:2310,bind=192.168.0.31,reuseaddr - >SUBSCRIBE > sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm SIP/2.0 >Via: SIP/2.0/TCP 86.90.39.44;branch=G4z9hb82dK8.f144.0 >To: ;tag=ty6sjh9iz9 >From: ;tag=6c9d4319c74d756e6b696-baa1 >CSeq: 11 SUBSCRIBE >Call-ID: b1c04118-8...@86.90.39.44 >Content-Length: 0 >User-Agent: OpenSIPS (1.6.1-tls) >Max-Forwards: 70 >Event: dialog;sla >Contact: >Expires: 610 > > >>> Any ideas? >>> >>> >> If you could try to get a capture of the whole flow - starting with >> REGISTER, etc.plus the logs... But first check the usrloc (see >> 1)) >> >> > I'll do that next, when I have time over the weekend. Capturing is > actually quite difficult because everything is TLS, and there are > more than one phone, as well as a voicemail server... > > Thanks for helping so far, and if you think of anything based on > your suggestion 1) and my answer, then please advise. > > Thanks, > Brian > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Private IP in registered AOR causing failure
Hello Bogdan, An ven., janv 29, 2010, Bogdan-Andrei Iancu schrieb: >opensipsl...@encambio.com wrote: >>> 1) the BLA part is sending the SUBSCRIBEs based on user location >>> and it is using the "received" field if present, so it should be >>> ok. Unless you set in the bla module the "outbound" param - this >>> will override the received info. >>> >> My module parameters for presence and BLA are: >> >> modparam("presence", "server_address", "sip:p...@name.host.tld") >> modparam("presence_xml", "force_active", 1) >> modparam("pua_bla", "server_address", "sip:p...@name.host.tld") >> modparam("pua_bla", "default_domain", "name.host.tld") >> modparam("pua_bla", "header_name", "Sender") >> >> ...so I'm not setting the 'outbound' parameter it seems, right? >> >In such a case, check in usrloc if the registrations for the user >the SUBSCRIBE belongs to, do has the received field - maybe the >error is when saving the contacts and not when using them. > That would be nice, but I don't think so: # /pfx/sbin/opensipsctl ul show AOR:: user1 Contact:: sip:us...@192.168.0.31:3618;transport=tls;line=9hm7f0ua Q=1 Expires:: 352 Callid:: 703c26357076-zmjcebpdyaey Cseq:: 1058 User-agent:: Unimportant Received:: sip:82.90.12.232:2108;transport=TLS State:: CS_SYNC Flags:: 0 Cflag:: 64 Socket:: tls:62.124.111.222:5061 Methods:: 7999 After running a socket listener on 192.168.0.31 on the OpenSIPS host: $ socat TCP4-LISTEN:2310,bind=192.168.0.31,reuseaddr - SUBSCRIBE sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm SIP/2.0 Via: SIP/2.0/TCP 86.90.39.44;branch=G4z9hb82dK8.f144.0 To: ;tag=ty6sjh9iz9 From: ;tag=6c9d4319c74d756e6b696-baa1 CSeq: 11 SUBSCRIBE Call-ID: b1c04118-8...@86.90.39.44 Content-Length: 0 User-Agent: OpenSIPS (1.6.1-tls) Max-Forwards: 70 Event: dialog;sla Contact: Expires: 610 >> Any ideas? >> >If you could try to get a capture of the whole flow - starting with >REGISTER, etc.plus the logs... But first check the usrloc (see >1)) > I'll do that next, when I have time over the weekend. Capturing is actually quite difficult because everything is TLS, and there are more than one phone, as well as a voicemail server... Thanks for helping so far, and if you think of anything based on your suggestion 1) and my answer, then please advise. Thanks, Brian ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Private IP in registered AOR causing failure
Hi Brian, opensipsl...@encambio.com wrote: >> 1) the BLA part is sending the SUBSCRIBEs based on user location >> and it is using the "received" field if present, so it should be >> ok. Unless you set in the bla module the "outbound" param - this >> will override the received info. >> >> > I know that at least some part of the BLA logic or presence logic > is indeed using the 'received' field, because OpenSIPS is sending > to the correct UAS 1/2 the time. It is equially clear that some > other part of BLA or presence is ignoring the 'received' field. > For each UAS which registers tcpdump shows two SUBSCRIBE messages. > One with the 'received' IP and one with the private IP. > > My module parameters for presence and BLA are: > > modparam("presence", "server_address", "sip:p...@name.host.tld") > modparam("presence_xml", "force_active", 1) > modparam("pua_bla", "server_address", "sip:p...@name.host.tld") > modparam("pua_bla", "default_domain", "name.host.tld") > modparam("pua_bla", "header_name", "Sender") > > ...so I'm not setting the 'outbound' parameter it seems, right? > > I'm using: > > Solaris 11 x86 (nv-b91) > OpenSIPS 1.6.0 with TLS > > In such a case, check in usrloc if the registrations for the user the SUBSCRIBE belongs to, do has the received field - maybe the error is when saving the contacts and not when using them. >> 2) the subscribe you posted - as you captured it, I supposed it >> exists on network. But I see that the transport in TLS (so TCP >> based), but how come you see the message if opensips is not able to >> open the TCP conn to the private IP.. >> >> > Good question, but I showed you just how I was capturing traffic > to the private IP. You probably missed it, so here it is again: > > >>> After running a socket listener on 192.168.0.31 on the OpenSIPS host: >>> >>>$ socat TCP4-LISTEN:2310,bind=192.168.0.31,reuseaddr - >>>SUBSCRIBE >>> sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm SIP/2.0 >>>Via: SIP/2.0/TCP 86.90.39.44;branch=G4z9hb82dK8.f144.0 >>>To: ;tag=ty6sjh9iz9 >>>From: ;tag=6c9d4319c74d756e6b696-baa1 >>>CSeq: 11 SUBSCRIBE >>>Call-ID: b1c04118-8...@86.90.39.44 >>>Content-Length: 0 >>>User-Agent: OpenSIPS (1.6.1-tls) >>>Max-Forwards: 70 >>>Event: dialog;sla >>>Contact: >>>Expires: 610 >>> >>> > It's plain old TCP/IP networking. First do a ifconfig to create > a virtual interface with IP 192.168.0.31, then set a static route, > and finally run software to listen on the TCP socket on the address. > This works as long as I do it on the same machine that OpenSIPS (the > presence modules) are running on. > > Any ideas? > If you could try to get a capture of the whole flow - starting with REGISTER, etc.plus the logs... But first check the usrloc (see 1) ) Regards, Bogdan > Thanks, > Brian > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Private IP in registered AOR causing failure
Hello Bogdan and Anca, An mar., janv 26, 2010, Bogdan-Andrei Iancu schrieb: >Just consulted with Anca (she is the presence guru) and 2 questions >for you: > Thanks to Anca very much for such good work with the presence modules. I'm excited to be able to use them correctly (thus my troubleshooting and questions.) >1) the BLA part is sending the SUBSCRIBEs based on user location >and it is using the "received" field if present, so it should be >ok. Unless you set in the bla module the "outbound" param - this >will override the received info. > I know that at least some part of the BLA logic or presence logic is indeed using the 'received' field, because OpenSIPS is sending to the correct UAS 1/2 the time. It is equially clear that some other part of BLA or presence is ignoring the 'received' field. For each UAS which registers tcpdump shows two SUBSCRIBE messages. One with the 'received' IP and one with the private IP. My module parameters for presence and BLA are: modparam("presence", "server_address", "sip:p...@name.host.tld") modparam("presence_xml", "force_active", 1) modparam("pua_bla", "server_address", "sip:p...@name.host.tld") modparam("pua_bla", "default_domain", "name.host.tld") modparam("pua_bla", "header_name", "Sender") ...so I'm not setting the 'outbound' parameter it seems, right? I'm using: Solaris 11 x86 (nv-b91) OpenSIPS 1.6.0 with TLS >2) the subscribe you posted - as you captured it, I supposed it >exists on network. But I see that the transport in TLS (so TCP >based), but how come you see the message if opensips is not able to >open the TCP conn to the private IP.. > Good question, but I showed you just how I was capturing traffic to the private IP. You probably missed it, so here it is again: >> After running a socket listener on 192.168.0.31 on the OpenSIPS host: >> >>$ socat TCP4-LISTEN:2310,bind=192.168.0.31,reuseaddr - >>SUBSCRIBE sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm >> SIP/2.0 >>Via: SIP/2.0/TCP 86.90.39.44;branch=G4z9hb82dK8.f144.0 >>To: ;tag=ty6sjh9iz9 >>From: ;tag=6c9d4319c74d756e6b696-baa1 >>CSeq: 11 SUBSCRIBE >>Call-ID: b1c04118-8...@86.90.39.44 >>Content-Length: 0 >>User-Agent: OpenSIPS (1.6.1-tls) >>Max-Forwards: 70 >>Event: dialog;sla >>Contact: >>Expires: 610 >> It's plain old TCP/IP networking. First do a ifconfig to create a virtual interface with IP 192.168.0.31, then set a static route, and finally run software to listen on the TCP socket on the address. This works as long as I do it on the same machine that OpenSIPS (the presence modules) are running on. Any ideas? Thanks, Brian ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Private IP in registered AOR causing failure
Hi Brian, Just consulted with Anca (she is the presence guru) and 2 questions for you: 1) the BLA part is sending the SUBSCRIBEs based on user location and it is using the "received" field if present, so it should be ok. Unless you set in the bla module the "outbound" param - this will override the received info. 2) the subscribe you posted - as you captured it, I supposed it exists on network. But I see that the transport in TLS (so TCP based), but how come you see the message if opensips is not able to open the TCP conn to the private IP.. Regards, Bogdan opensipsl...@encambio.com wrote: > Hello Bogdan, > > An ven., janv 22, 2010, Bogdan-Andrei Iancu schrieb: > >> opensipsl...@encambio.com wrote: >> >>> An jeu., janv 21, 2010, opensipsl...@encambio.com schrieb: >>> An mer., janv 20, 2010, Bogdan-Andrei Iancu schrieb: > opensipsl...@encambio.com wrote: > After running a socket listener on 192.168.0.31 on the OpenSIPS host: $ socat TCP4-LISTEN:2310,bind=192.168.0.31,reuseaddr - SUBSCRIBE sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm SIP/2.0 Via: SIP/2.0/TCP 86.90.39.44;branch=G4z9hb82dK8.f144.0 To: ;tag=ty6sjh9iz9 From: ;tag=6c9d4319c74d756e6b696-baa1 CSeq: 11 SUBSCRIBE Call-ID: b1c04118-8...@86.90.39.44 Content-Length: 0 User-Agent: OpenSIPS (1.6.1-tls) Max-Forwards: 70 Event: dialog;sla Contact: Expires: 610 I'm trying to implement presence by using the presence, presence_xml, pua, and pua_bla modules. So it seems that one of these modules (see event dialog;sla) is getting the contact from the locations table (in AAA on our server) and ignoring the Received header. OpenSIPS replies to messages from UACs such as INVITE and CANCEL properly, and opens connections to the IP in Received. This problem is limited to the SUBSCRIBES sent from one of the presence modules. >>> ...and similar SUBSCRIBE messages (sent from one of the presence >>> modules) are not having this problem. They are almost the same as >>> the one above, but simply don't have a to tag. >>> >>> >> So you have problems with a SUBSCRIBE that is internally generated >> by one of the presence modules? It is not a proxied request, right? >> >> > Problem > I know I have a problem because tcpdump shows that OpenSIPS is > trying to reach a private IP address across the Internet. > > Workaround > It seems that one of the presence modules is responsible for that, > because when I remove bla_handle_notify() and bla_set_flag() from > the route script, then the attempted private IP connections stop. > > Proxied request > ...and because I see no SUBSCRIBE (event dialog;sla) messages coming > from all the connected UAs (in their logs), it is quite clear that > some presence module of OpenSIPS is creating the SUBSCRIBEs. > > Guesses > At first I was sure it was the pua_bla, but after looking at the > code I see that pua_bla uses other presence modules (pua, presence, > presence_xml?) So it could be that another one is constructing or > sending the SUBSCRIBE without observing the 'Received' header, and > thus using a private IP instead. > > Greetings, > Brian > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Private IP in registered AOR causing failure
Hello Bogdan, An ven., janv 22, 2010, Bogdan-Andrei Iancu schrieb: >opensipsl...@encambio.com wrote: >> An jeu., janv 21, 2010, opensipsl...@encambio.com schrieb: >>> An mer., janv 20, 2010, Bogdan-Andrei Iancu schrieb: opensipsl...@encambio.com wrote: >>> After running a socket listener on 192.168.0.31 on the OpenSIPS host: >>> >>>$ socat TCP4-LISTEN:2310,bind=192.168.0.31,reuseaddr - >>>SUBSCRIBE >>> sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm SIP/2.0 >>>Via: SIP/2.0/TCP 86.90.39.44;branch=G4z9hb82dK8.f144.0 >>>To: ;tag=ty6sjh9iz9 >>>From: ;tag=6c9d4319c74d756e6b696-baa1 >>>CSeq: 11 SUBSCRIBE >>>Call-ID: b1c04118-8...@86.90.39.44 >>>Content-Length: 0 >>>User-Agent: OpenSIPS (1.6.1-tls) >>>Max-Forwards: 70 >>>Event: dialog;sla >>>Contact: >>>Expires: 610 >>> >>> I'm trying to implement presence by using the presence, >>> presence_xml, pua, and pua_bla modules. >>> >>> So it seems that one of these modules (see event dialog;sla) is >>> getting the contact from the locations table (in AAA on our server) >>> and ignoring the Received header. >>> >>> OpenSIPS replies to messages from UACs such as INVITE and CANCEL >>> properly, and opens connections to the IP in Received. This problem >>> is limited to the SUBSCRIBES sent from one of the presence modules. >>> >> ...and similar SUBSCRIBE messages (sent from one of the presence >> modules) are not having this problem. They are almost the same as >> the one above, but simply don't have a to tag. >> >So you have problems with a SUBSCRIBE that is internally generated >by one of the presence modules? It is not a proxied request, right? > Problem I know I have a problem because tcpdump shows that OpenSIPS is trying to reach a private IP address across the Internet. Workaround It seems that one of the presence modules is responsible for that, because when I remove bla_handle_notify() and bla_set_flag() from the route script, then the attempted private IP connections stop. Proxied request ...and because I see no SUBSCRIBE (event dialog;sla) messages coming from all the connected UAs (in their logs), it is quite clear that some presence module of OpenSIPS is creating the SUBSCRIBEs. Guesses At first I was sure it was the pua_bla, but after looking at the code I see that pua_bla uses other presence modules (pua, presence, presence_xml?) So it could be that another one is constructing or sending the SUBSCRIBE without observing the 'Received' header, and thus using a private IP instead. Greetings, Brian ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Private IP in registered AOR causing failure
Hi Brian, So you have problems with a SUBSCRIBE that is internally generated by one of the presence modules? It is not a proxied request, right ? Regards, Bogdan opensipsl...@encambio.com wrote: > Hello list, > > An jeu., janv 21, 2010, opensipsl...@encambio.com schrieb: > >> An mer., janv 20, 2010, Bogdan-Andrei Iancu schrieb: >> >>> opensipsl...@encambio.com wrote: >>> Here's a record I see when I run 'opensipsctl ul show': AOR:: mylogin-osips Contact:: sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm Q=1 Expires:: 560 Callid:: 2b21cdfae784-av13rj1txbsq Cseq:: 2 User-agent:: Bigphone123 Received:: sip:85.182.68.45:2240;transport=TLS State:: CS_SYNC Flags:: 0 Cflag:: 64 Socket:: tls:80.200.123.45:5061 Methods:: 7999 OpenSIPS is trying to reach the private IP number above from time to time, and I see this in the logs: Jan 19 17:57:20 name.host.tld opensips[23432]: ERROR:tm:t_uac: attempt to send to 'sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm' failed >>> the problem is not the private IP in the contact, as opensips >>> properly saved the source IP (of the REGISTER) too -> see the >>> Received field. So the Received field will be used over the Contact >>> for sending the requests to UAC. >>> >>> Now, what probably goes wrong in your case is that when using >>> TLS/TCP (connection oriented protos), after the REGISTER, the >>> connection is dropped and opensips cannot open later a TCP >>> connection behind a NAT :(By default opensips closes the >>> inactive TCP connections. >>> >>> >> After running a socket listener on 192.168.0.31 on the OpenSIPS host: >> >>$ socat TCP4-LISTEN:2310,bind=192.168.0.31,reuseaddr - >>SUBSCRIBE sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm >> SIP/2.0 >>Via: SIP/2.0/TCP 86.90.39.44;branch=G4z9hb82dK8.f144.0 >>To: ;tag=ty6sjh9iz9 >>From: ;tag=6c9d4319c74d756e6b696-baa1 >>CSeq: 11 SUBSCRIBE >>Call-ID: b1c04118-8...@86.90.39.44 >>Content-Length: 0 >>User-Agent: OpenSIPS (1.6.1-tls) >>Max-Forwards: 70 >>Event: dialog;sla >>Contact: >>Expires: 610 >> >> I'm trying to implement presence by using the presence, >> presence_xml, pua, and pua_bla modules. >> >> So it seems that one of these modules (see event dialog;sla) is >> getting the contact from the locations table (in AAA on our server) >> and ignoring the Received header. >> >> OpenSIPS replies to messages from UACs such as INVITE and CANCEL >> properly, and opens connections to the IP in Received. This problem >> is limited to the SUBSCRIBES sent from one of the presence modules. >> >> > ...and similar SUBSCRIBE messages (sent from one of the presence > modules) are not having this problem. They are almost the same as > the one above, but simply don't have a to tag. > > Greetings, > Brian > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Private IP in registered AOR causing failure
Hello list, An jeu., janv 21, 2010, opensipsl...@encambio.com schrieb: >An mer., janv 20, 2010, Bogdan-Andrei Iancu schrieb: >>opensipsl...@encambio.com wrote: >>> Here's a record I see when I run 'opensipsctl ul show': >>> >>> AOR:: mylogin-osips >>> Contact:: >>> sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm Q=1 >>> Expires:: 560 >>> Callid:: 2b21cdfae784-av13rj1txbsq >>> Cseq:: 2 >>> User-agent:: Bigphone123 >>> Received:: sip:85.182.68.45:2240;transport=TLS >>> State:: CS_SYNC >>> Flags:: 0 >>> Cflag:: 64 >>> Socket:: tls:80.200.123.45:5061 >>> Methods:: 7999 >>> >>> OpenSIPS is trying to reach the private IP number above from time >>> to time, and I see this in the logs: >>> >>> Jan 19 17:57:20 name.host.tld opensips[23432]: ERROR:tm:t_uac: >>> attempt to send to >>> 'sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm' failed >>> >>the problem is not the private IP in the contact, as opensips >>properly saved the source IP (of the REGISTER) too -> see the >>Received field. So the Received field will be used over the Contact >>for sending the requests to UAC. >> >>Now, what probably goes wrong in your case is that when using >>TLS/TCP (connection oriented protos), after the REGISTER, the >>connection is dropped and opensips cannot open later a TCP >>connection behind a NAT :(By default opensips closes the >>inactive TCP connections. >> >After running a socket listener on 192.168.0.31 on the OpenSIPS host: > >$ socat TCP4-LISTEN:2310,bind=192.168.0.31,reuseaddr - >SUBSCRIBE sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm > SIP/2.0 >Via: SIP/2.0/TCP 86.90.39.44;branch=G4z9hb82dK8.f144.0 >To: ;tag=ty6sjh9iz9 >From: ;tag=6c9d4319c74d756e6b696-baa1 >CSeq: 11 SUBSCRIBE >Call-ID: b1c04118-8...@86.90.39.44 >Content-Length: 0 >User-Agent: OpenSIPS (1.6.1-tls) >Max-Forwards: 70 >Event: dialog;sla >Contact: >Expires: 610 > >I'm trying to implement presence by using the presence, >presence_xml, pua, and pua_bla modules. > >So it seems that one of these modules (see event dialog;sla) is >getting the contact from the locations table (in AAA on our server) >and ignoring the Received header. > >OpenSIPS replies to messages from UACs such as INVITE and CANCEL >properly, and opens connections to the IP in Received. This problem >is limited to the SUBSCRIBES sent from one of the presence modules. > ...and similar SUBSCRIBE messages (sent from one of the presence modules) are not having this problem. They are almost the same as the one above, but simply don't have a to tag. Greetings, Brian ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Private IP in registered AOR causing failure
Hello again, An mer., janv 20, 2010, Bogdan-Andrei Iancu schrieb: >opensipsl...@encambio.com wrote: >> Here's a record I see when I run 'opensipsctl ul show': >> >> AOR:: mylogin-osips >> Contact:: >> sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm Q=1 >> Expires:: 560 >> Callid:: 2b21cdfae784-av13rj1txbsq >> Cseq:: 2 >> User-agent:: Bigphone123 >> Received:: sip:85.182.68.45:2240;transport=TLS >> State:: CS_SYNC >> Flags:: 0 >> Cflag:: 64 >> Socket:: tls:80.200.123.45:5061 >> Methods:: 7999 >> >> OpenSIPS is trying to reach the private IP number above from time >> to time, and I see this in the logs: >> >> Jan 19 17:57:20 name.host.tld opensips[23432]: ERROR:tm:t_uac: >> attempt to send to >> 'sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm' failed >> >the problem is not the private IP in the contact, as opensips >properly saved the source IP (of the REGISTER) too -> see the >Received field. So the Received field will be used over the Contact >for sending the requests to UAC. > >Now, what probably goes wrong in your case is that when using >TLS/TCP (connection oriented protos), after the REGISTER, the >connection is dropped and opensips cannot open later a TCP >connection behind a NAT :(By default opensips closes the >inactive TCP connections. > After running a socket listener on 192.168.0.31 on the OpenSIPS host: $ socat TCP4-LISTEN:2310,bind=192.168.0.31,reuseaddr - SUBSCRIBE sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm SIP/2.0 Via: SIP/2.0/TCP 86.90.39.44;branch=G4z9hb82dK8.f144.0 To: ;tag=ty6sjh9iz9 From: ;tag=6c9d4319c74d756e6b696-baa1 CSeq: 11 SUBSCRIBE Call-ID: b1c04118-8...@86.90.39.44 Content-Length: 0 User-Agent: OpenSIPS (1.6.1-tls) Max-Forwards: 70 Event: dialog;sla Contact: Expires: 610 I'm trying to implement presence by using the presence, presence_xml, pua, and pua_bla modules. So it seems that one of these modules (see event dialog;sla) is getting the contact from the locations table (in AAA on our server) and ignoring the Received header. OpenSIPS replies to messages from UACs such as INVITE and CANCEL properly, and opens connections to the IP in Received. This problem is limited to the SUBSCRIBES sent from one of the presence modules. ...but I'm still not sure how to fix the problem. Any ideas? Greetings, Brian ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Private IP in registered AOR causing failure
Hello Bogdan, An mer., janv 20, 2010, Bogdan-Andrei Iancu schrieb: >opensipsl...@encambio.com wrote: >> Here's a record I see when I run 'opensipsctl ul show': >> >> AOR:: mylogin-osips >> Contact:: >> sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm Q=1 >> Expires:: 560 >> Callid:: 2b21cdfae784-av13rj1txbsq >> Cseq:: 2 >> User-agent:: Bigphone123 >> Received:: sip:85.182.68.45:2240;transport=TLS >> State:: CS_SYNC >> Flags:: 0 >> Cflag:: 64 >> Socket:: tls:80.200.123.45:5061 >> Methods:: 7999 >> >> OpenSIPS is trying to reach the private IP number above from time >> to time, and I see this in the logs: >> >> Jan 19 17:57:20 name.host.tld opensips[23432]: ERROR:tm:t_uac: >> attempt to send to >> 'sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm' failed >> >> Thanks for any advice on correcting the failed private IP attempts. >> >the problem is not the private IP in the contact, as opensips properly >saved the source IP (of the REGISTER) too -> see the Received field. So >the Received field will be used over the Contact for sending the >requests to UAC. > Yes, that's what was confusing me, that the Received header was correct and the TCP connection still failed. >Now, what probably goes wrong in your case is that when using TLS/TCP >(connection oriented protos), after the REGISTER, the connection is >dropped and opensips cannot open later a TCP connection behind a NAT >:(By default opensips closes the inactive TCP connections. > >To make opensips to keep the connection (even with no traffic going on), >see the tcp_persistent_flag: > >http://www.opensips.org/html/docs/modules/devel/registrar.html#id228181 > Good guess, but sadly your're wrong. I'm well informed of manipulating the TCP connection using the tcp_persistent_flag. It just wasn't where you expected it (and didn't appear in my email.) The tcp_persistent_flag is being set on all registrations just before save(). When I use tcpdump to see which address OpenSIPS is trying to connect to before reporting the failure above, I see that it really is trying to connect to 192.168.0.31 (over the Internet.) If I write fix_contact() just before save() then this behaviour and the failure goes away. It would seem that a lookup("location") does not always use the AOR's Received header, or what do you think could be the problem? It doesn't seem right changing the AOR's contact string to hack this problem away. Greetings, Brian ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Private IP in registered AOR causing failure
Hi Brian, the problem is not the private IP in the contact, as opensips properly saved the source IP (of the REGISTER) too -> see the Received field. So the Received field will be used over the Contact for sending the requests to UAC. Now, what probably goes wrong in your case is that when using TLS/TCP (connection oriented protos), after the REGISTER, the connection is dropped and opensips cannot open later a TCP connection behind a NAT :(By default opensips closes the inactive TCP connections. To make opensips to keep the connection (even with no traffic going on), see the tcp_persistent_flag: http://www.opensips.org/html/docs/modules/devel/registrar.html#id228181 Regards, Bogdan opensipsl...@encambio.com wrote: > Hello list, > > Here's a record I see when I run 'opensipsctl ul show': > > AOR:: mylogin-osips > Contact:: > sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm Q=1 > Expires:: 560 > Callid:: 2b21cdfae784-av13rj1txbsq > Cseq:: 2 > User-agent:: Bigphone123 > Received:: sip:85.182.68.45:2240;transport=TLS > State:: CS_SYNC > Flags:: 0 > Cflag:: 64 > Socket:: tls:80.200.123.45:5061 > Methods:: 7999 > > As you see it is quite normal, but I'm wondering about the private > IP 192.168.0.31. That's indeed the address of the phone. > > OpenSIPS is trying to reach the private IP number above from time > to time, and I see this in the logs: > > Jan 19 17:57:20 name.host.tld opensips[23432]: ERROR:tm:t_uac: > attempt to send to > 'sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm' failed > > The part of my config which could be causing this problem is: > > # configure NAT keepalives > if (client_nat_test("3")) { > if (method=="SUBSCRIBE") { > nat_keepalive(); > } > if (!has_totag()) { > if (method=="REGISTER") { > $avp(s:regrcv) = $source_uri; > fix_nated_register(); # add Received header > if (proto==UDP) { > nat_keepalive(); > } > } > else if (!is_present_hf("Record-Route")) { > #fix_nated_contact(); > fix_contact(); > force_rport(); > if (is_method("INVITE")) { > fix_nated_sdp("3"); > } > } > } > setbflag(6);# mark message as NATed > } > > Thanks for any advice on correcting the failed private IP attempts. > > Greetings, > Brian > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Private IP in registered AOR causing failure
Hello list, Here's a record I see when I run 'opensipsctl ul show': AOR:: mylogin-osips Contact:: sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm Q=1 Expires:: 560 Callid:: 2b21cdfae784-av13rj1txbsq Cseq:: 2 User-agent:: Bigphone123 Received:: sip:85.182.68.45:2240;transport=TLS State:: CS_SYNC Flags:: 0 Cflag:: 64 Socket:: tls:80.200.123.45:5061 Methods:: 7999 As you see it is quite normal, but I'm wondering about the private IP 192.168.0.31. That's indeed the address of the phone. OpenSIPS is trying to reach the private IP number above from time to time, and I see this in the logs: Jan 19 17:57:20 name.host.tld opensips[23432]: ERROR:tm:t_uac: attempt to send to 'sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm' failed The part of my config which could be causing this problem is: # configure NAT keepalives if (client_nat_test("3")) { if (method=="SUBSCRIBE") { nat_keepalive(); } if (!has_totag()) { if (method=="REGISTER") { $avp(s:regrcv) = $source_uri; fix_nated_register(); # add Received header if (proto==UDP) { nat_keepalive(); } } else if (!is_present_hf("Record-Route")) { #fix_nated_contact(); fix_contact(); force_rport(); if (is_method("INVITE")) { fix_nated_sdp("3"); } } } setbflag(6);# mark message as NATed } Thanks for any advice on correcting the failed private IP attempts. Greetings, Brian ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users