private mails are simply ignored after first advise in this regard, please CC the mailing list always.

If you read the config from the tutorial, you see how the invite is relayed to asterisk. Refer should go to asterisk in the same way if it is an out of dialog request, or follow record route/contact address for within dialog requests.

Cheers,
Daniel

On 1/20/11 11:37 AM, David J. wrote:
could you point me to the docs?

just use forward() or rewritehostport()?



On 1/20/11 5:15 AM, Daniel-Constantin Mierla wrote:
If asterisk is in the path of the call, then just forward the REFER to it, there is no need to generate a new one.

Also, note that REFER is many times part of a dialog, uac_req_send() creates requests out of the dialog.

Cheers,
Daniel

On 1/16/11 11:37 PM, David J. wrote:
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();


        }

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



--
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Jan 24-26, 2011, Irvine, CA, USA
http://www.asipto.com


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to