[asterisk-bugs] [JIRA] (ASTERISK-28057) chan_sip: SipNotify via AMI behaves differently to CLI

Asterisk Team (JIRA) noreply at issues.asterisk.org
Mon Dec 3 17:16:51 CST 2018


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

Asterisk Team updated ASTERISK-28057:
-------------------------------------

    Target Release Version/s: 15.7.0

> chan_sip: SipNotify via AMI behaves differently to CLI
> ------------------------------------------------------
>
>                 Key: ASTERISK-28057
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28057
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/Messaging, Channels/chan_sip/TCP-TLS
>    Affects Versions: 13.22.0
>         Environment: ubuntu xenial
>            Reporter: Peter Katzmann
>            Assignee: Unassigned
>            Severity: Minor
>      Target Release: 13.24.0, 15.7.0
>
>
> During test with secure connections with Mitel deskphones we examined a problem with notify action via ami. 
> Asterisk generates a message like :
> *chan_sip.c: peer '3001' HAS NOT USED (OR SWITCHED TO) TLS in favor of 'UDP' (but this was allowed in sip.conf)!*
> and the Mitel phones does not react to the message.
> On the other side when i initiate the notify message vi cli command *sip notify* the phones reacts and the message does not appear.
> Now we compared the notify code via ami and cli and saw that there is plenty of duplicated code in the network setup with one small difference:
> creat_addr differs, cli uses "create_addr(p, channame, NULL, 1)" and ami uses "create_addr(p, channame, NULL, 0)" instead.
> After we made a small patch 
> {color:blue}
> --- a/channels/chan_sip.c       2018-09-05 19:12:27.000000000 +0200
> +++ b/channels/chan_sip.c       2018-09-14 16:13:33.903984495 +0200
> @@ -15572,7 +15572,7 @@
>                         return 0;
>                 }
>  
> -               if (create_addr(p, channame, NULL, 0)) {
> +               if (create_addr(p, channame, NULL, 1)) {
>                         /* Maybe they're not registered, etc. */
>                         dialog_unlink_all(p);
>                         dialog_unref(p, "unref dialog inside for loop" );
> {color}
> against asterisk 13.23 the message vanished and the notify via ami worked.
> Due the lack of documentation of the parameter we are not sure if this is a valid fix for the problem or a cause of new problems.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list