Ticket #3584: sip-outcast-03-21-2012.patch
| File sip-outcast-03-21-2012.patch, 1.9 KB (added by outcast, 15 months ago) |
|---|
-
twisted/protocols/sip.py
1648 1648 1649 1649 if via.host != addr[0]: 1650 1650 via.received = addr[0] 1651 if via.rport is True:1651 if via.rportValue is True: 1652 1652 via.rport = addr[1] 1653 1653 msg.headers['via'][0] = via.toString() 1654 1654 … … 1665 1665 def addNewServerTransaction(st): 1666 1666 if st: 1667 1667 if msg.method == 'INVITE': 1668 st.messageReceivedFromTU(Response.fromRequest( 100, msg))1668 st.messageReceivedFromTU(Response.fromRequest(TRYING, msg)) 1669 1669 self._newServerTransaction(st, msg, via) 1670 1670 1671 1671 if st: … … 1744 1744 """ 1745 1745 1746 1746 def start(transport): 1747 """Connects the transport to the TU. 1747 """ 1748 Connects the transport to the TU. 1748 1749 1749 1750 @param transport: a L{SIPTransport} instance. 1750 1751 """ … … 1839 1840 """ 1840 1841 if self._mode == 'trying': 1841 1842 self._respond(msg) 1842 if 100 <= msg.code < 200:1843 if TRYING <= msg.code < OK: 1843 1844 self._mode = 'proceeding' 1844 1845 else: 1845 1846 self._complete() 1846 1847 elif self._mode == 'proceeding': 1847 1848 self._respond(msg) 1848 if msg.code >= 200:1849 if msg.code >= OK: 1849 1850 self._complete() 1850 1851 elif self._mode == 'terminated': 1851 1852 raise RuntimeError('No further responses can be sent in this ' … … 2016 2017 self.branch = None 2017 2018 else: 2018 2019 self.branch = request.computeBranch() 2019 self.request.headers['via'].insert(0, Via(None, branch=self.branch 2020 ).toString()) 2020 self.request.headers['via'].insert(0, Via(None, branch=self.branch).toString()) 2021 2021 2022 2022 def send(self): 2023 2023 """
