[OpenSIPS-Users] opensips als LB for multi-FS cluster: nasty problems with TCP/TLS registered clients

Johannes Jakob lists.jj at googlemail.com
Wed Aug 15 22:46:10 CEST 2012


Hi guys,

First of all, I'm rather new to OpenSIPs and still struggling with
details of configuration.
OpenSIPs is used for "load balancing" in front of currently only one
active and one standby FreeSWITCH servers.



As a starting point, I used the example config I found here:
 http://wiki.freeswitch.org/wiki/OpenSIPS_configuration_for_2_or_more_FreeSWITCH_installs#Edit_opensips.cfg


Since it worked out of the box, I didn't change much:
- enabled TLS support
- modified addresses and ports
	listen=udp:222.222.222.222:5060
	listen=tcp:222.222.222.222:5060
	listen=tls:222.222.222.222:5061
	disable_tls=no
	tls_method=SSLv23

	fixed localcache.so -> cachedb_local.so with variables
	loaded sipmsgops.so



Well, the problem is, that OpenSIPs doesn't consider the transport
protocol, the sip client is using.

Until now, all the clients were using UDP to register, so I didn't
have any problems. But now, some
clients need to register via TCP or even better TLS, because iPhone
clients need a tcp session to be
notified of incoming calls when the app is running backgrounded.

Clients (iPhone Groundwire) can connect just fine via TCP or TLS, can
make calls without any issues, BUT
can't receive calls at all. (when registering via UDP, they can
receive calls until they suspend the app)

For starters, let's asume the client registers via TCP.


Scenario:

iPhone <TCP> OpenSIPs <UDP> FreeSWITCH

Registering works fine with these protocols (the iPhone sends and
receives TCP messages)





FreeSWITCH's perspective:


Registrations:
=================================================================================================
Call-ID:    	E5D9A907EC8E61D20B0A59F00D5810FC20EF7D63
User:       	1002 at sip.isp.net
Contact:    	"user"
<sip:1002 at 17.17.17.235:52364;rinstance=8AC2D8C4;transport=tcp;fs_path=%3Csip%3A222.222.222.222%3Br2%3Don%3Blr%3Breceived%3Dsip%3A17.17.17.235%3A52364%3E>
Agent:      	Acrobits Softphone Business/2.4
Status:     	Registered(TCP)(unknown) EXP(2012-08-15 22:17:58) EXPSECS(91)
Host:       	pbx.isp.net
IP:         	222.222.222.222
Port:       	5060
Auth-User:  	1002
Auth-Realm: 	sip.isp.net
MWI-Account:	1002 at sip.isp.net

Total items returned: 1
=================================================================================================


So, there is ";transport=tcp" present and FreeSWITCH even says
"Registered(TCP)" even though it never
really sees any TCP packets from the client, or OpenSIPs.




Testcall:


--------------------------------------------------------------------------------------------------------------------------
freeswitch at internal> expand originate ${sofia_contact(1002 at sip.isp.net)} &echo
-ERR RECOVERY_ON_TIMER_EXPIRE

2012-08-15 22:15:09.835230 [DEBUG] switch_ivr_originate.c:1961 Parsing
global variables
2012-08-15 22:15:09.835230 [NOTICE] switch_channel.c:941 New Channel
sofia/internal/sip:1002 at 17.17.17.235:52364
[089415ae-4a31-46f2-9042-81cb900a88be]
2012-08-15 22:15:09.835230 [DEBUG] mod_sofia.c:4796
(sofia/internal/sip:1002 at 17.17.17.235:52364) State Change CS_NEW ->
CS_INIT
2012-08-15 22:15:09.835230 [DEBUG] switch_core_session.c:1229 Send
signal sofia/internal/sip:1002 at 17.17.17.235:52364 [BREAK]
2012-08-15 22:15:09.835230 [DEBUG] switch_core_state_machine.c:385
(sofia/internal/sip:1002 at 17.17.17.235:52364) Running State Change
CS_INIT
2012-08-15 22:15:09.835230 [DEBUG] switch_core_state_machine.c:424
(sofia/internal/sip:1002 at 17.17.17.235:52364) State INIT
2012-08-15 22:15:09.835230 [DEBUG] mod_sofia.c:85
sofia/internal/sip:1002 at 17.17.17.235:52364 SOFIA INIT
2012-08-15 22:15:09.835230 [DEBUG] sofia_glue.c:2580
sip:222.222.222.222;r2=on;lr;received=sip:17.17.17.235:52364;transport=tcp
Setting proxy route to sofia/internal/sip:1002 at 17.17.17.235:52364
2012-08-15 22:15:09.835230 [DEBUG] sofia_glue.c:2609 Local SDP:
v=0
o=FreeSWITCH 1345044033 1345044034 IN IP4 13.13.13.66
s=FreeSWITCH
c=IN IP4 13.13.13.66
t=0 0
m=audio 17676 RTP/AVP 8 0 98 99 9 100 3 101 13
a=rtpmap:98 G7221/32000
a=fmtp:98 bitrate=48000
a=rtpmap:99 G7221/16000
a=fmtp:99 bitrate=32000
a=rtpmap:100 iLBC/8000
a=fmtp:100 mode=30
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
m=video 16724 RTP/AVP 34 102
a=rtpmap:34 H263/90000
a=rtpmap:102 H264/90000

2012-08-15 22:15:09.835230 [DEBUG] switch_core_session.c:924 Send
signal sofia/internal/sip:1002 at 17.17.17.235:52364 [BREAK]
2012-08-15 22:15:09.835230 [DEBUG] mod_sofia.c:125
(sofia/internal/sip:1002 at 17.17.17.235:52364) State Change CS_INIT ->
CS_ROUTING
2012-08-15 22:15:09.835230 [DEBUG] switch_core_session.c:1229 Send
signal sofia/internal/sip:1002 at 17.17.17.235:52364 [BREAK]
2012-08-15 22:15:09.835230 [DEBUG] switch_core_state_machine.c:424
(sofia/internal/sip:1002 at 17.17.17.235:52364) State INIT going to sleep
2012-08-15 22:15:09.835230 [DEBUG] switch_core_state_machine.c:385
(sofia/internal/sip:1002 at 17.17.17.235:52364) Running State Change
CS_ROUTING
2012-08-15 22:15:09.835230 [DEBUG] switch_channel.c:1934
(sofia/internal/sip:1002 at 17.17.17.235:52364) Callstate Change DOWN ->
RINGING
2012-08-15 22:15:09.835230 [DEBUG] switch_core_state_machine.c:433
(sofia/internal/sip:1002 at 17.17.17.235:52364) State ROUTING
2012-08-15 22:15:09.835230 [DEBUG] mod_sofia.c:148
sofia/internal/sip:1002 at 17.17.17.235:52364 SOFIA ROUTING
2012-08-15 22:15:09.835230 [DEBUG] switch_ivr_originate.c:67
(sofia/internal/sip:1002 at 17.17.17.235:52364) State Change CS_ROUTING
-> CS_CONSUME_MEDIA
2012-08-15 22:15:09.835230 [DEBUG] switch_core_session.c:1229 Send
signal sofia/internal/sip:1002 at 17.17.17.235:52364 [BREAK]
2012-08-15 22:15:09.835230 [DEBUG] switch_core_state_machine.c:433
(sofia/internal/sip:1002 at 17.17.17.235:52364) State ROUTING going to
sleep
2012-08-15 22:15:09.835230 [DEBUG] switch_core_state_machine.c:385
(sofia/internal/sip:1002 at 17.17.17.235:52364) Running State Change
CS_CONSUME_MEDIA
2012-08-15 22:15:09.835230 [DEBUG] switch_core_state_machine.c:452
(sofia/internal/sip:1002 at 17.17.17.235:52364) State CONSUME_MEDIA
2012-08-15 22:15:09.835230 [DEBUG] switch_core_state_machine.c:452
(sofia/internal/sip:1002 at 17.17.17.235:52364) State CONSUME_MEDIA going
to sleep
2012-08-15 22:15:09.835230 [DEBUG] sofia.c:6058 Channel
sofia/internal/sip:1002 at 17.17.17.235:52364 entering state [calling][0]
2012-08-15 22:15:14.965051 [DEBUG] switch_core_session.c:924 Send
signal sofia/internal/sip:1002 at 17.17.17.235:52364 [BREAK]
2012-08-15 22:15:14.965051 [DEBUG] switch_core_session.c:924 Send
signal sofia/internal/sip:1002 at 17.17.17.235:52364 [BREAK]
2012-08-15 22:15:14.965051 [DEBUG] switch_core_session.c:924 Send
signal sofia/internal/sip:1002 at 17.17.17.235:52364 [BREAK]
2012-08-15 22:15:14.965051 [DEBUG] sofia.c:6058 Channel
sofia/internal/sip:1002 at 17.17.17.235:52364 entering state
[terminated][408]
2012-08-15 22:15:14.965051 [DEBUG] switch_channel.c:2914
(sofia/internal/sip:1002 at 17.17.17.235:52364) Callstate Change RINGING
-> HANGUP
2012-08-15 22:15:14.965051 [NOTICE] sofia.c:6850 Hangup
sofia/internal/sip:1002 at 17.17.17.235:52364 [CS_CONSUME_MEDIA]
[RECOVERY_ON_TIMER_EXPIRE]
2012-08-15 22:15:14.965051 [DEBUG] switch_channel.c:2937 Send signal
sofia/internal/sip:1002 at 17.17.17.235:52364 [KILL]
2012-08-15 22:15:14.965051 [DEBUG] switch_core_session.c:1229 Send
signal sofia/internal/sip:1002 at 17.17.17.235:52364 [BREAK]
2012-08-15 22:15:14.965051 [DEBUG] switch_core_state_machine.c:385
(sofia/internal/sip:1002 at 17.17.17.235:52364) Running State Change
CS_HANGUP
2012-08-15 22:15:14.965051 [DEBUG] switch_core_state_machine.c:625
(sofia/internal/sip:1002 at 17.17.17.235:52364) State HANGUP
2012-08-15 22:15:14.965051 [DEBUG] mod_sofia.c:474 Channel
sofia/internal/sip:1002 at 17.17.17.235:52364 hanging up, cause:
RECOVERY_ON_TIMER_EXPIRE
2012-08-15 22:15:14.965051 [DEBUG] switch_ivr_originate.c:3458
Originate Resulted in Error Cause: 102 [RECOVERY_ON_TIMER_EXPIRE]
2012-08-15 22:15:14.975212 [DEBUG] switch_core_state_machine.c:47
sofia/internal/sip:1002 at 17.17.17.235:52364 Standard HANGUP, cause:
RECOVERY_ON_TIMER_EXPIRE
2012-08-15 22:15:14.975212 [DEBUG] switch_core_state_machine.c:625
(sofia/internal/sip:1002 at 17.17.17.235:52364) State HANGUP going to
sleep
2012-08-15 22:15:14.975212 [DEBUG] switch_core_state_machine.c:416
(sofia/internal/sip:1002 at 17.17.17.235:52364) State Change CS_HANGUP ->
CS_REPORTING
2012-08-15 22:15:14.975212 [DEBUG] switch_core_session.c:1229 Send
signal sofia/internal/sip:1002 at 17.17.17.235:52364 [BREAK]
2012-08-15 22:15:14.975212 [DEBUG] switch_core_state_machine.c:385
(sofia/internal/sip:1002 at 17.17.17.235:52364) Running State Change
CS_REPORTING
2012-08-15 22:15:14.975212 [DEBUG] switch_core_state_machine.c:685
(sofia/internal/sip:1002 at 17.17.17.235:52364) State REPORTING
2012-08-15 22:15:15.035061 [DEBUG] switch_core_state_machine.c:79
sofia/internal/sip:1002 at 17.17.17.235:52364 Standard REPORTING, cause:
RECOVERY_ON_TIMER_EXPIRE
2012-08-15 22:15:15.035061 [DEBUG] switch_core_state_machine.c:685
(sofia/internal/sip:1002 at 17.17.17.235:52364) State REPORTING going to
sleep
2012-08-15 22:15:15.035061 [DEBUG] switch_core_state_machine.c:410
(sofia/internal/sip:1002 at 17.17.17.235:52364) State Change CS_REPORTING
-> CS_DESTROY
2012-08-15 22:15:15.035061 [DEBUG] switch_core_session.c:1229 Send
signal sofia/internal/sip:1002 at 17.17.17.235:52364 [BREAK]
2012-08-15 22:15:15.035061 [DEBUG] switch_core_session.c:1429 Session
2380 (sofia/internal/sip:1002 at 17.17.17.235:52364) Locked, Waiting on
external entities
2012-08-15 22:15:15.035061 [NOTICE] switch_core_session.c:1447 Session
2380 (sofia/internal/sip:1002 at 17.17.17.235:52364) Ended
2012-08-15 22:15:15.035061 [NOTICE] switch_core_session.c:1449 Close
Channel sofia/internal/sip:1002 at 17.17.17.235:52364 [CS_DESTROY]
2012-08-15 22:15:15.035061 [DEBUG] switch_core_state_machine.c:514
(sofia/internal/sip:1002 at 17.17.17.235:52364) Callstate Change HANGUP
-> DOWN
2012-08-15 22:15:15.035061 [DEBUG] switch_core_state_machine.c:517
(sofia/internal/sip:1002 at 17.17.17.235:52364) Running State Change
CS_DESTROY
2012-08-15 22:15:15.035061 [DEBUG] switch_core_state_machine.c:527
(sofia/internal/sip:1002 at 17.17.17.235:52364) State DESTROY
2012-08-15 22:15:15.035061 [DEBUG] mod_sofia.c:374
sofia/internal/sip:1002 at 17.17.17.235:52364 SOFIA DESTROY
2012-08-15 22:15:15.035061 [DEBUG] switch_core_state_machine.c:86
sofia/internal/sip:1002 at 17.17.17.235:52364 Standard DESTROY
2012-08-15 22:15:15.035061 [DEBUG] switch_core_state_machine.c:527
(sofia/internal/sip:1002 at 17.17.17.235:52364) State DESTROY going to
sleep

--------------------------------------------------------------------------------------------------------------------------

so, somewhere in between, the call gets stuck.

Packets between FreeSWITCH <> OpenSIPs:
--------------------------------------------------------------------------------------------------------------------------
T(6) 13.13.13.66:49684 -> 222.222.222.222:5060 [A]
INVITE sip:1002 at 17.17.17.235:52364;rinstance=8AC2D8C4;transport=tcp SIP/2.0.
Via: SIP/2.0/TCP 13.13.13.66;branch=z9hG4bK2806Htm7H3jXc.
Route: <sip:222.222.222.222;r2=on;lr;received=sip:17.17.17.235:52364>.
Max-Forwards: 70.
From: "" <sip:0000000000 at 13.13.13.66>;tag=jceDZSa3y2Kej.
To: <sip:1002 at 17.17.17.235:52364;rinstance=8AC2D8C4;transport=tcp>.
Call-ID: c1087393-61b8-1230-2c88-0016367615cd.
CSeq: 32194790 INVITE.
Contact: <sip:mod_sofia at 13.13.13.66:5060;transport=tcp>.
User-Agent: FreeSWITCH.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO,
REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE.
Supported: timer, precondition, path, replaces.
Allow-Events: talk, hold, conference, presence, dialog, line-seize,
call-info, sla, include-session-description, presence.winfo,
message-summary, refer.
Content-Type: application/sdp.
Content-Disposition: session.
Content-Length: 442.
X-FS-Support: update_display,send_info.
Remote-Party-ID:
<sip:0000000000 at 13.13.13.66>;party=calling;screen=yes;privacy=off.
.
v=0.
o=FreeSWITCH 1345044033 1345044034 IN IP4 13.13.13.66.
s=FreeSWITCH.
c=IN IP4 13.13.13.66.
t=0 0.
m=audio 17676 RTP/AVP 8 0 98 99 9 100 3 101 13.
a=rtpmap:98 G7221/32000.
a=fmtp:98 bitrate=48000.
a=rtpmap:99 G7221/16000.
a=fmtp:99 bitrate=32000.
a=rtpmap:100 iLBC/8000.
a=fmtp:100 mode=30.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
m=video 16724 RTP/AVP 34 102.
a=rtpmap:34 H263/90000.

T(6) 222.222.222.222:5060 -> 13.13.13.66:49684 [AP]
SIP/2.0 100 Giving a try.
Via: SIP/2.0/TCP 13.13.13.66;branch=z9hG4bK2806Htm7H3jXc.
From: "" <sip:0000000000 at 13.13.13.66>;tag=jceDZSa3y2Kej.
To: <sip:1002 at 17.17.17.235:52364;rinstance=8AC2D8C4;transport=tcp>.
Call-ID: c1087393-61b8-1230-2c88-0016367615cd.
CSeq: 32194790 INVITE.
Content-Length: 0.
.


T(6) 222.222.222.222:5060 -> 13.13.13.66:49684 [AP]
SIP/2.0 408 Request Timeout.
Via: SIP/2.0/TCP 13.13.13.66;branch=z9hG4bK2806Htm7H3jXc.
From: "" <sip:0000000000 at 13.13.13.66>;tag=jceDZSa3y2Kej.
To: <sip:1002 at 17.17.17.235:52364;rinstance=8AC2D8C4;transport=tcp>;tag=a5cab58048d4dd8f69e59a1e9a450a6f-abe7.
Call-ID: c1087393-61b8-1230-2c88-0016367615cd.
CSeq: 32194790 INVITE.
Content-Length: 0.
.


T(6) 13.13.13.66:49684 -> 222.222.222.222:5060 [AP]
ACK sip:1002 at 17.17.17.235:52364;rinstance=8AC2D8C4;transport=tcp SIP/2.0.
Via: SIP/2.0/TCP 13.13.13.66;branch=z9hG4bK2806Htm7H3jXc.
Route: <sip:222.222.222.222;r2=on;lr;received=sip:17.17.17.235:52364>.
Max-Forwards: 70.
From: "" <sip:0000000000 at 13.13.13.66>;tag=jceDZSa3y2Kej.
To: <sip:1002 at 17.17.17.235:52364;rinstance=8AC2D8C4;transport=tcp>;tag=a5cab58048d4dd8f69e59a1e9a450a6f-abe7.
Call-ID: c1087393-61b8-1230-2c88-0016367615cd.
CSeq: 32194790 ACK.
Content-Length: 0.

--------------------------------------------------------------------------------------------------------------------------


Packets between OpenSIPs <> Client
--------------------------------------------------------------------------------------------------------------------------
U(17) 222.222.222.222:5060 -> 17.17.17.235:52364
INVITE sip:1002 at 17.17.17.235:52364;rinstance=8AC2D8C4;transport=tcp SIP/2.0.
Record-Route: <sip:222.222.222.222;lr;ftag=jceDZSa3y2Kej;did=97b.0e7f5fd3>.
Via: SIP/2.0/UDP 222.222.222.222;branch=z9hG4bK9728.d8c6c7c.0;i=f.
Via: SIP/2.0/TCP 13.13.13.66;branch=z9hG4bK2806Htm7H3jXc.
Max-Forwards: 30.
From: "" <sip:0000000000 at 13.13.13.66>;tag=jceDZSa3y2Kej.
To: <sip:1002 at 17.17.17.235:52364;rinstance=8AC2D8C4;transport=tcp>.
Call-ID: c1087393-61b8-1230-2c88-0016367615cd.
CSeq: 32194790 INVITE.
Contact: <sip:mod_sofia at 13.13.13.66:5060;transport=tcp>.
User-Agent: FreeSWITCH.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO,
REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE.
Supported: timer, precondition, path, replaces.
Allow-Events: talk, hold, conference, presence, dialog, line-seize,
call-info, sla, include-session-description, presence.winfo,
message-summary, refer.
Content-Type: application/sdp.
Content-Disposition: session.
Content-Length: 442.
X-FS-Support: update_display,send_info.
Remote-Party-ID:
<sip:0000000000 at 13.13.13.66>;party=calling;screen=yes;privacy=off.
.
v=0.
o=FreeSWITCH 1345044033 1345044034 IN IP4 13.13.13.66.
s=FreeSWITCH.
c=IN IP4 13.13.13.66.
t=0 0.
m=audio 17676 RTP/AVP 8 0 98 99 9 100 3 101 13.
a=rtpmap:98 G7221/32000.
a=fmtp:98 bitrate=48000.
a=rtpmap:99 G7221/16000.
a=fmtp:99 bitrate=32000.
a=rtpmap:100 iLBC/8000.
a=fmtp:100 mode=30.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
m=video

--------------------------------------------------------------------------------------------------------------------------


So, even though OpenSIPs spoke UDP with FreeSWITCH at the REGISTER,
FreeSWITCH decides to speak TCP with OpenSIPS at the INVITE, because
it considers 1002 registered via TCP. So far so good...

But then OpenSIPs decides to speak UDP with the iPhone, that has been
registered via TCP and thus the firewalls won't allow
the UDP messages to pass.


--------------------------------------------------------------------------------------------------------------------------
Aug 15 22:16:48 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|start|received tcp request INVITE
sip:1002 at 17.17.17.235:52364;rinstance=8AC2D8C4;transport=tcp
Aug 15 22:16:48 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|log|source 13.13.13.66:49684
Aug 15 22:16:48 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|log|from
sip:0000000000 at 13.13.13.66
Aug 15 22:16:48 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|log|to
sip:1002 at 17.17.17.235:52364;rinstance=8AC2D8C4;transport=tcp
Aug 15 22:16:48 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|log|originated from internal
sources
Aug 15 22:16:48 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|log|added this server to the
route set
Aug 15 22:16:48 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|pass|17.17.17.235:52364
Aug 15 22:16:53 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|start|received tcp request ACK
sip:1002 at 17.17.17.235:52364;rinstance=8AC2D8C4;transport=tcp
Aug 15 22:16:53 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|log|source 13.13.13.66:49684
Aug 15 22:16:53 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|log|from
sip:0000000000 at 13.13.13.66
Aug 15 22:16:53 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|log|to
sip:1002 at 17.17.17.235:52364;rinstance=8AC2D8C4;transport=tcp
Aug 15 22:16:53 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|log|originated from internal
sources
Aug 15 22:16:53 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|log|forwarding based on the route
set
Aug 15 22:16:53 pbxlb1 opensips[17018]:
c1087393-61b8-1230-2c88-0016367615cd|pass|17.17.17.235:52364
--------------------------------------------------------------------------------------------------------------------------

Strange enough: it still knows transport=tcp, so it _should_ be able
to send it out via TCP, shouldn't it?



Something else:

FreeSWITCH is sending Voicemail waiting notifications via UDP, even
though it knew to send TCP when doing the INVITE before....:
Those are being sent

	FreeSWITCH <UDP> OpenSIPs <UDP> iPhone

which can't be successfull, since the NAT gateway and firewalls are
expecting TCP :


--------------------------------------------------------------------------------------------------------------------------
U(17) 13.13.13.66:5060 -> 222.222.222.222:5060
NOTIFY sip:1002 at 17.17.17.235:52347;rinstance=8AC2D8C4;transport=tcp SIP/2.0.
Via: SIP/2.0/UDP 13.13.13.66;rport;branch=z9hG4bKvZXHgpDj0435K.
Route: <sip:222.222.222.222;r2=on;lr;received=sip:17.17.17.235:52347>.
Max-Forwards: 70.
From: <sip:1002 at sip.isp.net>;tag=7a8va2373KpUB.
To: <sip:1002 at sip.isp.net>.
Call-ID: 82f87795-61b5-1230-2c88-0016367615cd.
CSeq: 32194094 NOTIFY.
Contact: <sip:mod_sofia at 13.13.13.66:5060>.
User-Agent: FreeSWITCH.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO,
REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE.
Supported: timer, precondition, path, replaces.
Event: message-summary.
Allow-Events: talk, hold, conference, presence, dialog, line-seize,
call-info, sla, include-session-description, presence.winfo,
message-summary, refer.
Subscription-State: terminated;reason=noresource.
Content-Type: application/simple-message-summary.
Content-Length: 77.
.
Messages-Waiting: no.
Message-Account: sip:1002 at sip.isp.net.
.


U(17) 222.222.222.222:5060 -> 17.17.17.235:52347
NOTIFY sip:1002 at 17.17.17.235:52347;rinstance=8AC2D8C4;transport=tcp SIP/2.0.
Record-Route: <sip:222.222.222.222;lr;ftag=7a8va2373KpUB>.
Via: SIP/2.0/UDP 222.222.222.222;branch=z9hG4bKa602.b40dc823.0.
Via: SIP/2.0/UDP
13.13.13.66;received=13.13.13.66;rport=5060;branch=z9hG4bKvZXHgpDj0435K.
Max-Forwards: 30.
From: <sip:1002 at sip.isp.net>;tag=7a8va2373KpUB.
To: <sip:1002 at sip.isp.net>.
Call-ID: 82f87795-61b5-1230-2c88-0016367615cd.
CSeq: 32194094 NOTIFY.
Contact: <sip:mod_sofia at 13.13.13.66:5060>.
User-Agent: FreeSWITCH.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO,
REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE.
Supported: timer, precondition, path, replaces.
Event: message-summary.
Allow-Events: talk, hold, conference, presence, dialog, line-seize,
call-info, sla, include-session-description, presence.winfo,
message-summary, refer.
Subscription-State: terminated;reason=noresource.
Content-Type: application/simple-message-summary.
Content-Length: 77.
.
Messages-Waiting: no.
Message-Account: sip:1002 at sip.isp.net.


U(17) 222.222.222.222:5060 -> 13.13.13.66:5060
SIP/2.0 408 Request Timeout.
Via: SIP/2.0/UDP
13.13.13.66;received=13.13.13.66;rport=5060;branch=z9hG4bKvZXHgpDj0435K.
From: <sip:1002 at sip.isp.net>;tag=7a8va2373KpUB.
To: <sip:1002 at sip.isp.net>;tag=a5cab58048d4dd8f69e59a1e9a450a6f-5d71.
Call-ID: 82f87795-61b5-1230-2c88-0016367615cd.
CSeq: 32194094 NOTIFY.
Content-Length: 0.

--------------------------------------------------------------------------------------------------------------------------






# opensips -V
version: opensips 1.8.0-tls (x86_64/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, DISABLE_NAGLE,
USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC,
FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
svnrevision: 2:9124
@(#) $Id: main.c 8772 2012-03-08 11:16:13Z bogdan_iancu $
main.c compiled on 17:31:12 Jul  2 2012 with gcc 4.6







To be clear on this: I need to support all three protocols, UDP, TCP
and TLS between client and OpenSIPs. So I can't do any static
packet manipulation, it should be as dynamic as possible.



I'd really appreciate any hint in the right direction!


Thanks for your time and wisdom,

  Johannes



More information about the Users mailing list