On Fri, May 07, 2010 at 02:20:24AM +0000, crjw wrote:

| > I am trying to figure out the behavior of trustrpid
| >
| > Basically its not behaving the way I expected it to or maybe I am
| > missing a configuration option or something else.
| 
| I had a similar situation in which playing with "trustrpid" did not seem to 
have any effect.
| The solution was to use the "I" option to Dial.  (that is an upper case "i").
| In the end I could not say whether or not "trustpid" is broken because it is 
not entirely clear what it is supposed to do.
| -crjw

I think in the end I patched asterisk directly for this.  This is
unlikely to apply cleanly but here you go, you get the general idea:

Index: chan_sip.c
===================================================================
--- chan_sip.c  (revision 182593)
+++ chan_sip.c  (working copy)
@@ -9721,6 +9722,8 @@
                /* replace callerid if rpid found, and not restricted */
                if (!ast_strlen_zero(rpid_num) && ast_test_flag(&p->flags[0], 
SIP_TRUSTRPID)) {
                        char *tmp;
+                       memset(calleridname, 0, sizeof(calleridname));
+                       get_calleridname(rpid, calleridname, 
sizeof(calleridname));
                        if (*calleridname)
                                ast_string_field_set(p, cid_name, calleridname);
                        tmp = ast_strdupa(rpid_num);
 

Hope it helps!
-d


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to