[asterisk-bugs] [Asterisk 0018920]: chan_sip.c with a out-f-call message

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Mar 3 10:03:43 CST 2011


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18920 
====================================================================== 
Reported By:                ded
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18920
Category:                   Channels/chan_sip/NewFeature
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:          
http://svn.digium.com/svn/asterisk/team/russell/messaging/ 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 309251 
Request Review:              
====================================================================== 
Date Submitted:             2011-03-03 10:03 CST
Last Modified:              2011-03-03 10:03 CST
====================================================================== 
Summary:                    chan_sip.c  with a out-f-call message
Description: 

@@ -23125,6 +23097,8 @@
        struct sip_pvt *pvt;
        int res;
        char *peer;
+       char *num = NULL;
+       char *c;

        if (!(pvt = sip_alloc(NULL, NULL, 0, SIP_MESSAGE, NULL))) {
                return -1;
@@ -23141,6 +23115,15 @@
                return -1;
        }

+
+       if (from)
+       {
+               num = ast_strdupa(from);
+               c = strchr(num, ':');
+               if (c)
+                       *c = '\0';
+       }
+
        sip_pvt_lock(pvt);

        if (create_addr(pvt, peer, NULL, TRUE, NULL)) {
@@ -23152,6 +23135,9 @@
        ast_sip_ouraddrfor(&pvt->sa, &pvt->ourip, pvt);
        ast_set_flag(&pvt->flags[0], SIP_OUTGOING);

+       ast_string_field_set(pvt, todnid, to);  //kir++
+       ast_string_field_set(pvt, fromuser, num);       //kir++

??? ??? ??? ???? ????? 721

+       ast_string_field_set(pvt, fromname, num);       //kir++

? ??? ??? ??? ??????????????? ???
?? ????????? ??? ???????? ??? ?????? ? ??? ????????? ????? ?? ??? ? ?????

        /* XXX Does pvt->expiry need to be set? */

        res = transmit_message_with_text(pvt, ast_msg_get_body(msg), 1,
0);
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-03-03 10:03 ded            New Issue                                    
2011-03-03 10:03 ded            Asterisk Version          => SVN             
2011-03-03 10:03 ded            Regression                => No              
2011-03-03 10:03 ded            Reviewboard Link          =>
http://svn.digium.com/svn/asterisk/team/russell/messaging/
2011-03-03 10:03 ded            SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
2011-03-03 10:03 ded            SVN Revision (number only!) => 309251          
======================================================================




More information about the asterisk-bugs mailing list