]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add some params to request for xml_curl type stuff
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 14 Oct 2008 22:13:49 +0000 (22:13 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 14 Oct 2008 22:13:49 +0000 (22:13 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10018 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_reg.c

index cf33e079e3b39a034db6ad5fefd10917b5aa97a7..98acede608ce2604ed0653ade8a4ad49a27e94c0 100644 (file)
@@ -1296,6 +1296,36 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, sip_authorization_t co
        switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_auth_realm", realm);
        switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_auth_nonce", nonce);
        switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_auth_uri", uri);
+
+       if (sip->sip_contact) {
+               switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_contact_user", sip->sip_contact->m_url->url_user);
+               switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_contact_host", sip->sip_contact->m_url->url_host);
+       }
+
+       if (sip->sip_to) {
+               switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_to_user", sip->sip_to->a_url->url_user);
+               switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_to_host", sip->sip_to->a_url->url_host);
+               if (sip->sip_to->a_url->url_port) {
+                       switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_to_port", sip->sip_to->a_url->url_port);
+               }
+       }
+
+       if (sip->sip_from) {
+               switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_from_user", sip->sip_from->a_url->url_user);
+               switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_from_host", sip->sip_from->a_url->url_host);
+               if (sip->sip_from->a_url->url_port) {
+                       switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_from_port", sip->sip_from->a_url->url_port);
+               }
+       }
+
+       if (sip->sip_request) {
+               switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_request_user", sip->sip_request->rq_url->url_user);
+               switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_request_host", sip->sip_request->rq_url->url_host);
+               if (sip->sip_request->rq_url->url_port) {
+                       switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_request_port", sip->sip_request->rq_url->url_port);
+               }
+       }
+
        if (qop) {
                switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "sip_auth_qop", qop);
        }