<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div><div style="font-size:10pt;font-family:verdana,arial,helvetica,sans-serif;">Greetings,<br><br>I have OpenSips installed on an Amazon EC2 with an elastic IP (54.242.85.140). All non REGISTER methods are passed through rewritehostport("mytwiliodomain.sip.twilio.com") to another SIP proxy.<br><br>Everything is working except when BYE is sent from a callee that is registered to my OpenSips server. The caller never receives the BYE.<br>I've changed my config file at least 100 times and still have no success. Please let me know if I need to include anything from my config.<br><br><u><b>My First Invite:</b></u><br><br><br><b>U 2013/12/20 12:44:21.298060 107.21.231.147:5060 -&gt; 10.167.11.171:5060<br>INVITE sip:<a href="mailto:700@sip.opensipsserver.com" target="_blank">700@sip.opensipsserver.com</a> SIP/2.0.<br>Record-Route: &lt;sip:107.21.231.147:5060;lr;ftag=31945052_6772d868_3b1eb7f5-c41b-4da5-9a97-c756d7cd8fe3&gt;.<br>From: "17175554895" &lt;sip:<a href="mailto:17175554895@sip.twilio.com" target="_blank">17175554895@sip.twilio.com</a>&gt;;tag=31945052_6772d868_3b1eb7f5-c41b-4da5-9a97-c756d7cd8fe3.<br>To: &lt;sip:<a href="mailto:700@sip.opensipsserver.com" target="_blank">700@sip.opensipsserver.com</a>&gt;.<br>CSeq: 102 INVITE.<br>Max-Forwards: 68.<br>Date: Fri, 20 Dec 2013 17:42:59 GMT.<br>Call-ID: 6fa66f8ea2ce4b2dae83149f8b34b2e2@0.0.0.0.<br>Contact: "17175554895" &lt;sip:17175554895@10.70.227.82:5060;transport=udp&gt;.<br>Allow: INVITE,ACK,CANCEL,OPTIONS,BYE.<br>User-Agent: Twilio Gateway.<br>X-Twilio-ApiVersion: 2010-04-01.<br>X-Twilio-AccountSid: AC7ae5d84004d4269fgfhfhfjghgjghgbb.<br>Content-Type: application/sdp.<br>X-Twilio-CallSid: CA79e7a3c2c1c418af0777467467474747.<br>Via: SIP/2.0/UDP 107.21.231.147:5060;branch=z9hG4bKaeaf.02902511.0.<br>Via: SIP/2.0/UDP 10.70.227.82:5060;branch=z9hG4bK3b1eb7f5-c41b-4da5-9a97-c756d7cd8fe3_6772d868_425297635397116.<br>Content-Length: 251.<br>.<br>v=0.<br>o=- 1274389856 1274389856 IN IP4 54.196.144.208.<br>s=session.<br>c=IN IP4 54.196.144.208.<br>t=0 0.<br>m=audio 18800 RTP/AVP 0 101.<br>a=rtpmap:0 PCMU/8000.<br>a=rtpmap:101 telephone-event/8000.<br>a=fmtp:101 0-16.<br>a=silenceSupp:off - - - -.<br>a=ptime:20.<br>a=sendrecv.</b><br><br><u><b>My First Bye:</b></u><br><br><b>U 2013/12/20 12:44:24.194615 74.106.255.63:5907 -&gt; 10.167.11.171:5060<br>BYE sip:17175554895@107.21.231.147:5060;transport=udp;nat=yes SIP/2.0.<br>Via: SIP/2.0/UDP 74.106.255.63:5907;branch=z9hG4bK-41214dcd.<br>From: &lt;sip:<a href="mailto:700@sip.opensipsserver.com" target="_blank">700@sip.opensipsserver.com</a>&gt;;tag=5ed7c43daadb6f7fi0.<br>To: "17175554895" &lt;sip:<a href="mailto:17175554895@sip.twilio.com" target="_blank">17175554895@sip.twilio.com</a>&gt;;tag=31945052_6772d868_3b1eb7f5-c41b-4da5-9a97-c756d7cd8fe3.<br>Call-ID: </b><b><b>6fa66f8ea2ce4b2dae83149f8b34b2e2</b>@0.0.0.0.<br>CSeq: 101 BYE.<br>Max-Forwards: 70.<br>Route:  &lt;sip:700@54.204.19.238:5060;lr54.204.19.238;did=b1c.e6603363&gt;,  &lt;sip:107.21.231.147:5060;lr;ftag=31945052_6772d868_3b1eb7f5-c41b-4da5-9a97-c756d7cd8fe3&gt;.<br>User-Agent: Linksys/SPA942-6.1.3(a).<br>Content-Length: 0.</b><br><br><b>My Debug Log:</b><br><a href="http://pastebin.com/0pAAZ68J" target="_blank">http://pastebin.com/0pAAZ68J</a><br><br><b>NGrep:<br></b><a href="http://pastebin.com/TVYUmM58">http://pastebin.com/TVYUmM58</a><br></div></div></div></body></html>