Hello,
On 2/2/10 1:18 PM, alex pappas wrote:
Hi Daniel,
I'm capturing with tcpdump the packets when they live the server and I don't see the extra header added.
are you having the rpid value in subscriber table? Is it loaded via load_credentials of auth_db or do you set the right avp in script?
Have you tried append_hf()? Seems you want to add r-uri to rpid, which is easier via append_hf() then.
Cheers, Daniel
Cheers Alex
On Tue, Feb 2, 2010 at 12:24 PM, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
Hi Alex, On 2/2/10 11:04 AM, alex pappas wrote: Dear friends, I'm trying to give to a user the option to have privacy in a call. I'm trying to do that by adding an extra header with: append_rpid_hf("sip", ";party=calling;id-type=subscriber;privacy=off;screen=no"); I'm using this header in the begining of the kamailio.cfg if(($rU=="99999") || ($rU=="77777")) { append_rpid_hf("sip", "$ru;party=calling;id-type=subscriber;privacy=off;screen=no"); xlog("alx ------- We have rU match --------"); } When I see the sip messages I don't see this extra header added into it. Does anyone had experience in this ? the header is visible when the message is forwarded. To see it immediately, but only in 3.0.0, you can use msg_apply_changes(). Cheers, Daniel -- Daniel-Constantin Mierla eLearning class for Kamailio 3.0.0 Starting Feb 8, 2010 * http://www.asipto.com/
Hi Daniel,
What i want to implement is when a call comes with an avp=1 then this call should not present the calling number. From examples I saw it looks like I need to add an extra header, with : append_rpid_hf("sip", "$ru;party=calling;id-type=subscriber;privacy=off;screen=no");
I don't understand for what stands the rpid even I'm reading about it:
*The SIP Remote-Party-ID header identifies the calling party and includes user, party, screen and privacy headers that specify how a call is presented and screened. *
I mean what value I should add in subscriber table if the call is coming from an IP address and from a particular number?
I'm loading now the rpid: modparam("auth_db", "load_credentials", "rpid") but I don't understand how it works :-(
Thank you Alex
On Tue, Feb 2, 2010 at 2:28 PM, Daniel-Constantin Mierla miconda@gmail.comwrote:
Hello,
On 2/2/10 1:18 PM, alex pappas wrote:
Hi Daniel,
I'm capturing with tcpdump the packets when they live the server and I don't see the extra header added.
are you having the rpid value in subscriber table? Is it loaded via load_credentials of auth_db or do you set the right avp in script?
Have you tried append_hf()? Seems you want to add r-uri to rpid, which is easier via append_hf() then.
Cheers, Daniel
Cheers Alex
On Tue, Feb 2, 2010 at 12:24 PM, Daniel-Constantin Mierla < miconda@gmail.com> wrote:
Hi Alex,
On 2/2/10 11:04 AM, alex pappas wrote:
Dear friends,
I'm trying to give to a user the option to have privacy in a call. I'm trying to do that by adding an extra header with: append_rpid_hf("sip", ";party=calling;id-type=subscriber;privacy=off;screen=no");
I'm using this header in the begining of the kamailio.cfg
if(($rU=="99999") || ($rU=="77777")) { append_rpid_hf("sip", "$ru;party=calling;id-type=subscriber;privacy=off;screen=no"); xlog("alx ------- We have rU match --------"); }
When I see the sip messages I don't see this extra header added into it.
Does anyone had experience in this ?
the header is visible when the message is forwarded. To see it immediately, but only in 3.0.0, you can use msg_apply_changes().
Cheers, Daniel
-- Daniel-Constantin Mierla eLearning class for Kamailio 3.0.0 Starting Feb 8, 2010
-- Daniel-Constantin Mierla eLearning class for Kamailio 3.0.0 Starting Feb 8, 2010
On 2/2/10 3:08 PM, alex pappas wrote:
Hi Daniel,
What i want to implement is when a call comes with an avp=1 then this call should not present the calling number. From examples I saw it looks like I need to add an extra header, with : append_rpid_hf("sip", "$ru;party=calling;id-type=subscriber;privacy=off;screen=no");
I don't understand for what stands the rpid even I'm reading about it:
_The SIP Remote-Party-ID header identifies the calling party and includes user, party, screen and privacy headers that specify how a call is presented and screened. _
I mean what value I should add in subscriber table if the call is coming from an IP address and from a particular number?
I'm loading now the rpid: modparam("auth_db", "load_credentials", "rpid") but I don't understand how it works :-(
do you have something in the column 'rpid' of subscriber table for caller record?
However, with the example above of what you want to try, you add request uri in the RPID, which is destination not caller (it is called party not calling party).
If you just need to take calling number and add it to RPID, try:
append_hf("<$fu>;party=calling;id-type=subscriber;privacy=off;screen=no\r\n");
You do not need values in subscriber table. Beware that RPID works only with some gateways, if you need full privacy, is better to replace the from URI with anonymous.
Cheers, Daniel
Daniel hi,
Now it works! I'm adding in the rpid avp the value that the RFC it says $avp(s:rpid) = $fu; and then
append_rpid_hf("$fU", ";party=calling;id-type=subscriber;privacy=off;screen=no");
In this way I see the headers added correctly in sip message. Considering what you said about the from header make it anonymus that is right! Even in our network we have a switch which din't understand rpid and we change the from to anonymous. In Kamailio the $fu and $fU are writable. In this case how can I change that ?
Thank you
Alex
On Tue, Feb 2, 2010 at 11:07 PM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
On 2/2/10 3:08 PM, alex pappas wrote:
Hi Daniel,
What i want to implement is when a call comes with an avp=1 then this call should not present the calling number. From examples I saw it looks like I need to add an extra header, with : append_rpid_hf("sip", "$ru;party=calling;id-type=subscriber;privacy=off;screen=no");
I don't understand for what stands the rpid even I'm reading about it:
*The SIP Remote-Party-ID header identifies the calling party and includes user, party, screen and privacy headers that specify how a call is presented and screened. *
I mean what value I should add in subscriber table if the call is coming from an IP address and from a particular number?
I'm loading now the rpid: modparam("auth_db", "load_credentials", "rpid") but I don't understand how it works :-(
do you have something in the column 'rpid' of subscriber table for caller record?
However, with the example above of what you want to try, you add request uri in the RPID, which is destination not caller (it is called party not calling party).
If you just need to take calling number and add it to RPID, try:
append_hf("<$fu>;party=calling;id-type=subscriber;privacy=off;screen=no\r\n");
You do not need values in subscriber table. Beware that RPID works only with some gateways, if you need full privacy, is better to replace the from URI with anonymous.
Cheers, Daniel
-- Daniel-Constantin Mierla eLearning class for Kamailio 3.0.0 Starting Feb 8, 2010
Hello,
On 2/3/10 10:43 AM, alex pappas wrote:
Daniel hi,
Now it works! I'm adding in the rpid avp the value that the RFC it says $avp(s:rpid) = $fu; and then
append_rpid_hf("$fU", ";party=calling;id-type=subscriber;privacy=off;screen=no");
In this way I see the headers added correctly in sip message. Considering what you said about the from header make it anonymus that is right! Even in our network we have a switch which din't understand rpid and we change the from to anonymous. In Kamailio the $fu and $fU are writable. In this case how can I change that ?
if the devices are SIP 2.0 (rfc3261) the you can do:
remove_hf("From"); append_hf("From: anonymous@invalid;tag=$ft\r\n", "From");
if not, look at uac module.
Cheers, Daniel