[asterisk-bugs] [JIRA] Closed: (ASTERISK-19677) SIP dial string //IPorHost does not work like expected

Digium Subversion (JIRA) noreply at issues.asterisk.org
Fri Aug 3 16:42:21 CDT 2012


     [ https://issues.asterisk.org/jira/browse/ASTERISK-19677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Digium Subversion closed ASTERISK-19677.
----------------------------------------

    Resolution: Fixed

> SIP dial string //IPorHost does not work like expected
> ------------------------------------------------------
>
>                 Key: ASTERISK-19677
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-19677
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General
>    Affects Versions: 1.8.11.0, 10.3.0
>            Reporter: Walter Doekes
>            Severity: Minor
>
> The SIP dial string is supposedly able to take an additional "host-or-ip" parameter which should be used as destination when making an outgoing call. This is new since 1.8.
> This value is overruled/ignored on multiple occasions, making it unusable.
> *Problem*
> - sip_request_call takes the parameter, sets remote_address_sa and passes that to create_addr
> - create_addr takes that and puts it in dialog->sa
> That's all good. But, when the call attempt is finally made, we get this:
> - transmit_invite ... send_request ... __sip_xmit
> - __sip_xmit calls sip_real_dst() and that one checks the SIP_NAT_FORCE_RPORT and SIP_NAT_RPORT_PRESENT and returns p->recv instead of p->sa if either is set
> Disabling NAT does not help a lot.
> - __sip_xmit now returns the right p->sa... but
> - when e.g. a 401 is returned from that machine, we reply to the IP found in the To: header instead of to the p->sa that we were communicating with
> - therefore our ACK to the 401 goes to the original host=... and
> - consequtive packets (invite with auth) does to original host= too
> *Steps to reproduce*
> {noformat}
> [sipuser]
> host=127.0.0.2
> {noformat}
> {noformat}
> Dial(SIP/sipuser/123/1.2.3.4)
> {noformat}
> Results in:
> {noformat}
> INVITE => 1.2.3.4 (if nat=no, otherwise 127.0.0.2 is selected here too)
>    401 <= 1.2.3.4
> (set_destination: Parsing <sip:123 at 127.0.0.2> for address/port to send to)
> (set_destination: set destination to 127.0.0.2:5060)
>    ACK => 127.0.0.2
> INVITE => 127.0.0.2
> {noformat}
> *Expected behaviour*
> I'd expect to see my packets go to 1.2.3.4 up until the ACK to the 200.
> *Why?*
> I was using the IPorHost feature because I need to select a proxy at dialplan call time and this was the option that seemed like it would do the trick.
> Regards,
> Walter

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list