[SR-Users] "append_rpid_hf()" and "append_hf()" issues

Alex Balashov abalashov at evaristesys.com
Wed Nov 10 11:23:46 CET 2010


Ricardo,

The 'rpid' value is loaded from the 'subscriber' table as part of the 
authentication functions;  if you consume_credentials() before it, it 
will be gone.  You should append_rpid_hf() the RPID header first, and 
consume_credentials() afterward.

Cheers,

-- Alex

On 11/10/2010 03:57 AM, Dominguez Jover, Ricardo wrote:

> 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
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


-- 
Alex Balashov - Principal
Evariste Systems LLC
1170 Peachtree Street NE
12th Floor, Suite 1200
Atlanta, GA 30309
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/



More information about the sr-users mailing list