Yes, although I have a question on that - when running tcpdump on the FreePBX system I tried the following:
tcpdump -s0 -w/tmp/capture.pcap -C50 udp and host 1.1.1.1
and I get an enormous capture file, but when I tried limiting it:
tcpdump -s0 -w/tmp/capture.pcap -C50 udp and host 172.16.1.6 and port 5160
I get nothing. (chan_sip is set to listen to 5160, pjsip to 5060)
Any suggestions on filtering to just get the SIP events or am I going to have to digest the entire thing and just pick out the bits?
Another possible “less of a hack” way of “fixing” this is to adjust the Cisco, putting this in the config:
voice service voip
fax protocol pass-through g711alaw
modem passthrough nse codec g711alaw
sip
min-se 14400
!
increases the time that the re-INVITE is sent out. (4 hours in this case) It’s still a hack since FreePBX is still not handling the re-INVITES properly (or the re-INVITES are incorrect) but it does have the benefit of allowing FreePBX to clear stale calls (if you are OK with a max call length)
From the looks of it, SIP Session timer support was added into Cisco IOS in the Technology versions 12.2/12.3 and wasn’t in the mainline until IOS version 12.4. Most of the configs and discussion out there about using a Cisco router as a VoIP gateway for Asterisk appear to predate this so it may simply be that when chan_sip was being developed and tested, if it was tested against a Cisco device that device didn’t have session timer support at all.
It SEEMS to me that most running Asterisk gateways pick up one of those ultra-cheap Linksys gateways (which have flooded Ebay for years, and many of which are not even real they are counterfeits) and aren’t using “enterprise” gear like a Cisco so I would not at all be surprised if a tcpdump shows errors in the re-INVITES from a Cisco device.
I have had no luck at all connecting the Cisco to pjsip so clearly there’s been little interest among the Asterisk developers in even testing with this gear let alone supporting it. PSTN gateways aren’t really very popular in the Asterisk crowd anyway as so many of them are trying to wring the last few dollars of savings out of the system.
The other problem with it is that Cisco only added authentication support for SIP username/password into IOS very late in development, IOS 15 seems to be the first version that really properly supports it, prior to that authentication is only via IP address. pjsip seems to be geared towards authentication.
This also allows me to knock down the sip session timer to a couple of minutes to make getting a packet capture more manageable.