I am using Asterisk 220.127.116.11 and am experiencing the exact same issue as this user. Note that this user reported the issue in 2006 with an Asterisk 1.2 machine, so the attached patch may not be suitable for my system.
I have directrtpsetup=yes in sip.conf. Works great, asterisk doesn’t do any media. But the biggest issue is that when a caller hangs up, instead of me seeing a “BYE”, I instead see a “INVITE”. This causes the call to run in the background without my authorization, and continue to charge me for the leg of the call.
Would anyone know what I can do here? Or maybe it is safe to apply this patch to my version of asterisk?
Below is an example
Note that the “reinvite” does not occur on 100% of phone calls. I am not too sure what the factors are to get it to work and to fail, but here is an example of a failed hangup. Also note that the Hangup command in extensions.conf successfully executes, and I never have this issue with directmedia set to ‘no’.
Notice at the very end, it should be sending a BYE instead of a INVITE:
<--- SIP read from UDP:18.104.22.168:5060 ---> SIP/2.0 100 Trying Via: SIP/2.0/UDP 22.214.171.124:5060;branch=z9hG4bK4fed5876;rport From: "2124092233" <sip:firstname.lastname@example.org>;tag=as34bbca20 To: <sip:email@example.com>;tag=3BCA998-2442 Date: Sat, 11 Feb 2012 01:45:00 GMT Call-ID: firstname.lastname@example.org CSeq: 105 INVITE Allow-Events: telephone-event Server: Cisco-SIPGateway/IOS-12.x Content-Length: 0