Hi everybody,
I’ve been testing and setting up
kamalio 3.0.3 with MySQL since a few weeks ago. All the basic functionalities
are working properly, but now I have an issue which I’m not been able to
solve by myself. I’ve read documentation and posts, but no idea about
what is happening. This is the issue.
I’m trying to append Remote Party ID
field to the SIP message header. I’ve been trying with both “append_rpid_hf()”
and “append_hf()” and I can’t see any Remote Party Header at the
SIP messages sniffed with wireshark. Here is the configuration I’ve
tried:
#para cargar los Remote party ID de la tabla suscriber
modparam("auth_db",
"load_credentials", "$avp(s:rpid)=rpid")
modparam("auth",
"rpid_avp", "$avp(s:rpid)")
modparam("auth",
"rpid_prefix", "<sip:")
modparam("auth", "rpid_suffix",
";user=phone>;party=calling;screen=yes;id-type=subscriber;privacy=off")
#Modificacion para no pedir autenticacion si viene desde un
trusted
if
(!allow_trusted("$si", "$(proto{s.toupper})")) {
if (!proxy_authorize("umh.es",
"subscriber")) {
proxy_challenge("", "0");
exit;
}
if
(is_method("PUBLISH"))
{
if
($au!=$tU) {
sl_send_reply("403","Forbidden auth ID");
exit;
}
} else {
if ($au!=$fU)
{
sl_send_reply("403","Forbidden auth ID");
exit;
}
}
append_rpid_hf("$fU",
";party=calling;id-type=subscriber;privacy=off;screen=yes");
consume_credentials();
####### I also tested the
following
#
append_hf("Remote-Party-ID:
<sip:$avp(rpid)@$avp(domain);user=phone>;privacy=$avp(privacy);party=calling\r\n");
#
append_hf("P-Asserted-Identity:
<sip:$avp(rpid)@$avp(domain)>\r\n", "Call-ID");
# consume_credentials();
}
}
In a similar post I’ve read that the
user had a problem because of the domain table. I have both the domain name and
the IP of the host defined, and I also get response with "$avp(s:rpid) ,
when RPID field is defined to a subscriber.
As I said I can’t find the mistake,
so any help would be appreciated.
Thanks in advance and best regards,
Ricardo Dominguez