Hello,
the third parameter is not for contact, it is the address of record --
the user address, eg., alice(a)sipdomain.com, not alice(a)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@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@10.18.130.27:5060;transport=udp ----> LAN side
contact (Use Contact header not $var(aor)
Slava.
------------------------------------------------------------------------
*From: *"Daniel-Constantin Mierla" <miconda(a)gmail.com>
*To: *"sr-users" <sr-users(a)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:
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" <volga629(a)skillsearch.ca>
*To: *"sr-users" <sr-users(a)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@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@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
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 -
www.kamailioworld.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users