]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip.c: AMI & CLI notify methods get different values of asterisk's own ip. 26/2126/4
authorStefanEng86 <stefanen@kth.se>
Fri, 29 Jan 2016 13:39:06 +0000 (14:39 +0100)
committerJoshua Colp <jcolp@digium.com>
Sun, 31 Jan 2016 16:23:56 +0000 (10:23 -0600)
commit55a7367ad4d3c45856554b4be32d2fd0f70c0dda
tree65cffd921a3947cdb652dbb1e44fb7c3c1e56678
parent51547175c0a456465930a31f66273ed997d5add2
chan_sip.c: AMI & CLI notify methods get different values of asterisk's own ip.

When I ask asterisk to send a SIP NOTIFY message to a sip peer using either a)
AMI action: SIPnotify or b) cli command: sip notify <cmd> <peer>, I expect
asterisk to include the same value for its own ip in both cases a) and b),
but it seems a) produces a contact header like Contact:
<sip:asterisk@192.168.1.227:8060> whereas b) produces a contact header like
<sip:asterisk@127.0.0.1:8060>. 0.0.0.0:8060 is my udpbindaddr in sip.conf

My guess is that manager_sipnotify should call
ast_sip_ouraddrfor(&p->sa, &p->ourip, p) the same way sip_cli_notify does,
because after applying this patch, both cases a) and b) produce
the contact header that I expect: <sip:asterisk@192.168.1.227:8060>

Reported by: Stefan Engström
Tested by: Stefan Engström

Change-Id: I86af5e209db64aab82c25417de6c768fb645f476
channels/chan_sip.c