|
|
|
@ -119,12 +119,25 @@ route[ATTEMPT_AUTHORIZATION] |
|
|
|
$var(expires) = 190; |
|
|
|
} |
|
|
|
|
|
|
|
$var(fs_path) = "%3C" + $rz + "%3A" + $Ri + "%3A" + $Rp + "%3Btransport=" + $proto + "%3Blr%3Breceived=" + $si+":"+$sp+"%3E"; |
|
|
|
$var(fs_contact) = "<" + $(ct{tobody.uri}) + ";fs_path=" + $var(fs_path) + ">"; |
|
|
|
if($(ct{tobody.params}) != $null) { |
|
|
|
$var(fs_contact) = $var(fs_contact) + ";" + $(ct{tobody.params}); |
|
|
|
if($(proto{s.tolower}) == "udp" || $(proto{s.tolower}) == "tcp" || $(proto{s.tolower}) == "tls") { |
|
|
|
$var(return_port) = "$Rp"; |
|
|
|
} else { |
|
|
|
$var(return_port) = "5060"; |
|
|
|
} |
|
|
|
|
|
|
|
$var(params) = "fs_path=<sip:MY_IP_ADDRESS:" + $var(return_port) + ";lr;received='" + $rz + ":" + $si + ":" + $sp + ";transport=" + $proto + "'>"; |
|
|
|
|
|
|
|
## TODO: fix escaping, some phones send us -- reg-id=1;+sip.instance="urn:uuid:9b8bd513-0e6e-4660-ad5e-5e35d88cc68f"; |
|
|
|
## and if we can store it but not use it because it looses the escapes (that weren't there...) |
|
|
|
#if($(ct{tobody.params}) != $null) { |
|
|
|
# $var(params) = $(ct{tobody.params}{s.escape.common}) + ";" + $var(params); |
|
|
|
#} |
|
|
|
|
|
|
|
if ($avp(AVP_RECV_PARAM) == $null) { |
|
|
|
$var(fs_contact) = "<" + $(ct{tobody.uri}) + ";" + $var(params) + ">"; |
|
|
|
} else { |
|
|
|
$var(fs_contact) = "<sip:" + $(ct{tobody.user}) + "@" + $si + ":" + $sp + ";transport=" + $proto + ";" + $var(params) + ">"; |
|
|
|
} |
|
|
|
|
|
|
|
xlog("L_INFO", "$ci|end|successful registration with contact $var(fs_contact)"); |
|
|
|
$var(register_contants) = " 'Presence-Hosts' : 'n/a', 'Profile-Name' : 'sipinterface_1', 'Status' : 'Registered', 'Event-Timestamp' : '" + $TS + "'"; |
|
|
|
@ -137,7 +150,7 @@ route[ATTEMPT_AUTHORIZATION] |
|
|
|
|
|
|
|
kazoo_publish("callmgr", $var(amqp_routing_key), $var(amqp_payload_request)); |
|
|
|
|
|
|
|
xlog("L_INFO", "$ci|end|successful registration with contact $ct"); |
|
|
|
xlog("L_INFO", "$ci|end|successful registration with contact $var(fs_contact)"); |
|
|
|
exit; |
|
|
|
} |
|
|
|
|
|
|
|
|