I realize that kamailio is not a b2bua;
But because we are using Asterisk in the path;
To extend the Asterisk Realtime Tutorial;
I was wondering if I could do something like this...
Kind of like how we use UAC to send a register to Asterisk;
Could we do the same and modify the method to use REFER instead?
I know it is more complex; but I am not sure where to handle this case;
Thanks for any pointers.
if(is_method("REFER")){
$var(rip) = $sel(cfg_get.asterisk.bindip);
$uac_req(method)="REFER";
$uac_req(ruri)="sip:" + $var(rip) + ":" +
$sel(cfg_get.asterisk.bindport);
$uac_req(furi)="sip:" + $au + "@" + $var(rip) +
";tag=" + $ft;
$uac_req(turi)="sip:" + $au + "@" + $var(rip) +
";tag=" + $tt;
$uac_req(hdrs)="Contact: <sip:" + $au + "@"
+ $sel(cfg_get.kamailio.bindip)
+ ":" + $sel(cfg_get.kamailio.bindport)
+ ">\r\n";
if($sel(contact.expires) != $null)
$uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
$sel(contact.expires) + "\r\n";
else
$uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
$hdr(Expires) + "\r\n";
uac_req_send();
}