diff options
author | Russell Bryant <russell@russellbryant.com> | 2011-06-02 22:09:05 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2011-06-02 22:09:05 +0000 |
commit | 9cd3cf2e719a460d2557f92a5ae0fc249416b4d2 (patch) | |
tree | 9657bd7b7eb854bd5a65dad3db3f6360d09763f3 /channels | |
parent | 49927bcbb868cfb717effc57b859529b866ffaf6 (diff) |
Fix message destination extension.
Don't send all messages to 's'. Get the destination from the request URI.
(Found using automated test cases).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 6556b3a07..a4f2febc1 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -16044,10 +16044,11 @@ static void receive_message(struct sip_pvt *p, struct sip_request *req, struct a return; } + copy_request(&p->initreq, req); + if (sip_cfg.auth_message_requests) { int res; - copy_request(&p->initreq, req); set_pvt_allowed_methods(p, req); res = check_user(p, req, SIP_MESSAGE, e, XMIT_UNRELIABLE, addr); if (res == AUTH_CHALLENGE_SENT) { @@ -16085,6 +16086,8 @@ static void receive_message(struct sip_pvt *p, struct sip_request *req, struct a } } + get_destination(p, NULL, NULL); + if (!(msg = ast_msg_alloc())) { transmit_response(p, "500 Internal Server Error", req); if (!p->owner) { |