summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/chan_sip.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 18c14eacd..528403d8a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -8553,6 +8553,7 @@ static void change_callid_pvt(struct sip_pvt *pvt, const char *callid)
{
int in_dialog_container;
int in_rtp_container;
+ char *oldid = ast_strdupa(pvt->callid);
ao2_lock(dialogs);
ao2_lock(dialogs_rtpcheck);
@@ -8573,6 +8574,10 @@ static void change_callid_pvt(struct sip_pvt *pvt, const char *callid)
}
ao2_unlock(dialogs_rtpcheck);
ao2_unlock(dialogs);
+
+ if (strcmp(oldid, pvt->callid)) {
+ ast_debug(1, "SIP call-id changed from '%s' to '%s'\n", oldid, pvt->callid);
+ }
}
/*! \brief Build SIP Call-ID value for a REGISTER transaction */
@@ -21553,7 +21558,12 @@ static char *sip_cli_notify(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
}
}
- /* Recalculate our side, and recalculate Call ID */
+ /* Now that we have the peer's address, set our ip and change callid */
+ ast_sip_ouraddrfor(&p->sa, &p->ourip, p);
+ build_via(p);
+
+ change_callid_pvt(p, NULL);
+
ast_cli(a->fd, "Sending NOTIFY of type '%s' to '%s'\n", a->argv[2], a->argv[i]);
sip_scheddestroy(p, SIP_TRANS_TIMEOUT);
transmit_invite(p, SIP_NOTIFY, 0, 2, NULL);