]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Get Alert-Info from inbound invite and set to the channel variable so that it can...
authorMichael Jerris <mike@jerris.com>
Thu, 19 Oct 2006 17:04:58 +0000 (17:04 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 19 Oct 2006 17:04:58 +0000 (17:04 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3108 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index c46f69da190c7f3141e4a7dbab5f75e65f3e4a83..33e57b9369fb276ef86c6564f6a54b131eb418af 100644 (file)
@@ -3515,9 +3515,13 @@ static void sip_i_invite(nua_t *nua,
                                
                                
                                for (un=sip->sip_unknown; un; un=un->un_next) {
+                                       if (!strncasecmp(un->un_name, "Alert-Info", 10)) {
+                                               if (!switch_strlen_zero(un->un_value)) { 
+                                                       switch_channel_set_variable(channel, "alert_info", (char *)un->un_value);
+                                               }
                                        // Loop thru Known Headers Here so we can do something with them
                                        // John Doe <sip:+19018577141@209.247.16.1>;party=calling;screen=yes;privacy=off
-                                       if (!strncasecmp(un->un_name, "Remote-Party-ID", 15)) {
+                                       } else if (!strncasecmp(un->un_name, "Remote-Party-ID", 15)) {
                                                int argc, x, screen = 1;
                                                char *mydata, *argv[10] = { 0 };
                                                if (!switch_strlen_zero(un->un_value)) {