[SR-Users] location
Slava Bendersky
volga629 at skillsearch.ca
Wed Jan 4 23:29:10 CET 2017
Hello Daniel,
Based on wiki page
http://www.kamailio.org/docs/modules/4.4.x/modules/registrar.html#registrar.f.save
I should be able do location save with pv var and supply uri.
save("location", "0x00", "sip:test at kamailio.org");
*
uri (optional - flags param has to be set and can be 0 for default behavior) - SIP URI to do be used instead of To header URI. It can be a dynamic string with pseudo-variables.
I tested multiply variation all of them ignore pv var.
Slava.
From: "volga629" <volga629 at skillsearch.ca>
To: "miconda" <miconda at gmail.com>
Cc: "sr-users" <sr-users at lists.sip-router.org>
Sent: Monday, January 2, 2017 11:40:33 AM
Subject: Re: [SR-Users] location
Hello Daniel,
I am trying save user contact on reply 200 OK from freeswitch. Contact is set in $avp(aor) which contain updated user location.
Slava.
From: "miconda" <miconda at gmail.com>
To: "volga629" <volga629 at skillsearch.ca>, "sr-users" <sr-users at lists.sip-router.org>
Sent: Monday, January 2, 2017 10:45:34 AM
Subject: Re: [SR-Users] location
Hello,
the third parameter is not for contact, it is the address of record -- the user address, eg., [ mailto:alice at sipdomain.com | alice at sipdomain.com ] , not [ mailto:alice at phone.ip | alice at phone.ip ]
What exactly do you need to achieve? Maybe there are other options that you can use.
Cheers,
Daniel
On 02/01/2017 15:12, Slava Bendersky wrote:
Hello Daniel,
Meaning if(!save("location", "0x04", "$var(aor)")) ---> $var(aor) ignored. It use default Contact. Here are the log
$var(aor) = "sip:" + $tU + "@" + $(avp(rcvcontact){uri.host}) + ":" + $(avp(rcvcontact){uri.port});
INFO: <script>: OnReply: Registration is 200 OK saving --> [ sip:4300 at client_pub_ip:31376;transport=tls | sip:4300 at client_pub_ip:31376;transport=tls ] in db ---> xlog.
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) ERROR: *** cfgtrace:onreply_route=[LOCATION_REPLY] c=[/etc/kamailio/kamailio-prod.cfg] l=621 a=27 n=save
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: <core> [sruid.c:182]: sruid_next(): new sruid is [uloc-586147f5-15aa-1] (1 / 20)
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-586147f5-15aa-1
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: <core> [sruid.c:182]: sruid_next(): new sruid is [uloc-586147f5-15aa-2] (2 / 20)
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-586147f5-15aa-2
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: usrloc [ucontact.c:1004]: db_update_ucontact_ruid(): ruid:uloc-5860b463-10c5-1
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: usrloc [ucontact.c:1133]: db_update_ucontact_ruid(): contact: [ sip:4300 at 10.18.130.27:5060;transport=udp | sip:4300 at 10.18.130.27:5060;transport=udp ] ----> LAN side contact (Use Contact header not $var(aor)
Slava.
From: "Daniel-Constantin Mierla" [ mailto:miconda at gmail.com | <miconda at gmail.com> ]
To: "sr-users" [ mailto:sr-users at lists.sip-router.org | <sr-users at lists.sip-router.org> ]
Sent: Monday, January 2, 2017 9:57:14 AM
Subject: Re: [SR-Users] location
Hello,
what do you mean by "will ignore on pv var"? Is the record not saved at all or the value of pv var is not used?
Cheers,
Daniel
On 02/01/2017 14:37, Slava Bendersky wrote:
BQ_BEGIN
Hello Everyone,
Is possible get help on issue ? I asked on IRC channel and another person so same problem with location save ?
Slava.
From: "volga629" [ mailto:volga629 at skillsearch.ca | <volga629 at skillsearch.ca> ]
To: "sr-users" [ mailto:sr-users at lists.sip-router.org | <sr-users at lists.sip-router.org> ]
Sent: Monday, December 26, 2016 1:13:49 PM
Subject: [SR-Users] location
Hello Everyone,
Why save location will ignore on pv var when trying save on reply 200 OK.
if(is_method("REGISTER") && fnmatch("$rs", "200")) {
xlog("L_INFO", "OnReply: Registration is $rs OK saving --> $avp(rcvcontact) in db\n");
$var(oar) = "sip:" + $tU + "@" + $(avp(rcvcontact){uri.host}) + ":" + $(avp(rcvcontact){uri.port});
if(!save("location", "0x04", "$var(oar)")) {
xlog("L_INFO", "Error saving the location\n");
}
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) ERROR: *** cfgtrace:onreply_route=[LOCATION_REPLY] c=[/etc/kamailio/kamailio-prod.cfg] l=619 a=26 n=xlog
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) INFO: <script>: OnReply: Registration is 200 OK saving --> [ sip:4300 at client_pub_ip:31376;transport=tls | sip:4300 at client_pub_ip:31376;transport=tls ] in db
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) ERROR: *** cfgtrace:onreply_route=[LOCATION_REPLY] c=[/etc/kamailio/kamailio-prod.cfg] l=620 a=63 n=assign
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) ERROR: *** cfgtrace:onreply_route=[LOCATION_REPLY] c=[/etc/kamailio/kamailio-prod.cfg] l=624 a=16 n=if
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) ERROR: *** cfgtrace:onreply_route=[LOCATION_REPLY] c=[/etc/kamailio/kamailio-prod.cfg] l=621 a=27 n=save
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: <core> [sruid.c:182]: sruid_next(): new sruid is [uloc-586147f5-15aa-1] (1 / 20)
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-586147f5-15aa-1
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: <core> [sruid.c:182]: sruid_next(): new sruid is [uloc-586147f5-15aa-2] (2 / 20)
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is: uloc-586147f5-15aa-2
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: usrloc [ucontact.c:1004]: db_update_ucontact_ruid(): ruid:uloc-5860b463-10c5-1
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: usrloc [ucontact.c:1133]: db_update_ucontact_ruid(): contact: [ sip:4300 at 10.18.130.27:5060;transport=udp | sip:4300 at 10.18.130.27:5060;transport=udp ] ----> LAN side contact
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: db_postgres [km_val.c:163]: db_postgres_val2str(): PQescapeStringConn: in: 10 chars, out: 10 chars
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: db_postgres [km_val.c:163]: db_postgres_val2str(): PQescapeStringConn: in: 21 chars, out: 21 chars
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: db_postgres [km_val.c:163]: db_postgres_val2str(): PQescapeStringConn: in: 33 chars, out: 33 chars
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: db_postgres [km_val.c:163]: db_postgres_val2str(): PQescapeStringConn: in: 40 chars, out: 40 chars
Dec 26 11:43:20 cavprx00 kamailio: 4(5546) DEBUG: db_postgres [km_val.c:163]: db_postgres_val2str(): PQescapeStringConn: in: 20 chars, out: 20 chars
Slava.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
[ mailto:sr-users at lists.sip-router.org | sr-users at lists.sip-router.org ]
[ http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users | http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ]
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list [ mailto:sr-users at lists.sip-router.org | sr-users at lists.sip-router.org ] [ http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users | http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ]
--
Daniel-Constantin Mierla [ http://www.twitter.com/miconda | www.twitter.com/miconda ] -- [ http://www.linkedin.com/in/miconda | www.linkedin.com/in/miconda ] Kamailio World Conference - May 8-10, 2017 - [ http://www.kamailioworld.com/ | www.kamailioworld.com ]
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
[ mailto:sr-users at lists.sip-router.org | sr-users at lists.sip-router.org ]
[ http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users | http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ]
BQ_END
--
Daniel-Constantin Mierla [ http://www.twitter.com/miconda | www.twitter.com/miconda ] -- [ http://www.linkedin.com/in/miconda | www.linkedin.com/in/miconda ] Kamailio World Conference - May 8-10, 2017 - [ http://www.kamailioworld.com/ | www.kamailioworld.com ]
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170104/b2d0d5fb/attachment.html>
More information about the sr-users
mailing list