Hi everyone, 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. When a call from a phone is sent to the * box it has the following sip headers: From: "From Phone" <sip:1001 at 10.0.0.29>;tag=4bf4bb4e11e92476. Remote-Party-ID: "Cloutier" <sip:5147714203 at 10.0.0.29>;privacy=off;screen=no;party=calling;id-type=subscriber;screen=yes. And when the second leg of the call from the * box to our voip provider is setup the call has the following sip headers: From: "From Phone" <sip:5147714203 at 10.0.0.24>;tag=as73d69a8f. Remote-Party-ID: "From Phone" <sip:5147714203 at 10.0.0.24>;privacy=off;screen=no. Shouldnt the Remote-Party-ID stay what I origionally set it to? in sip.conf for the phone I have set "trustrpid=yes" and for our provider I have "sendrpid=yes" I am using asterisk 1.6.0.10 Thanks Alot Jesse Cloutier
> 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. > > When a call from a phone is sent to the * box it has the following sip > headers: > > > From: "From Phone" <sip:1001 at 10.0.0.29>;tag=4bf4bb4e11e92476. > Remote-Party-ID: "Cloutier" > <sip:5147714203 at 10.0.0.29>;privacy=off;screen=no;party=calling;id-type=subscriber;screen=yes. > > > And when the second leg of the call from the * box to our voip provider > is setup the call has the following sip headers: > > > From: "From Phone" <sip:5147714203 at 10.0.0.24>;tag=as73d69a8f. > Remote-Party-ID: "From Phone" > <sip:5147714203 at 10.0.0.24>;privacy=off;screen=no. > > Shouldnt the Remote-Party-ID stay what I origionally set it to? > > in sip.conf for the phone I have set "trustrpid=yes" > and for our provider I have "sendrpid=yes" > > I am using asterisk 1.6.0.10 > > Thanks Alot > > Jesse CloutierI 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
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