16 sep 2013 kl. 18:08 skrev Steve Davies <steve@connection-telecom.com>:

Hi,

I'm making slow but steady progress with my Kamailio project.

My next task: I need to "relay" a registration to an upstream service.  IE when one or more devices registers against my local registration service, I need to initiate a corresponding registration upstream.  If all my local devices unregister, all all the registrations lapse, I want to drop the upstream registration.
Why not forward the registration from the endpoint and let them handle authentication?

/O

There is an example a bit like this in the Asterisk integration example.  However in that case the Asterisk doesn't challenge for authentication.  My upstream does.

I can't find anything in the uac module docs about authenticating.

Is there any way to handle this.

One thing I did try was to create "uacreg" as a view, and use that as the source of upstream registrations:

CREATE VIEW `uacreg` AS select distinct `s`.`id` AS `id`,`l`.`username` AS `l_uuid`,`l`.`username` AS `l_username`,`s`.`domain` AS `l_domain`,`l`.`username` AS `r_username`,`s`.`domain` AS `r_domain`,`s`.`domain` AS `realm`,`l`.`username` AS `auth_username`,`s`.`password` AS `auth_password`,concat('sip:',`s`.`domain`,':5060') AS `auth_proxy`,timestampdiff(SECOND,now(),`l`.`expires`) AS `expires` from (`location` `l` join `subscriber` `s`) where (`l`.`username` = `s`.`username`)

This kinda worked - but didn't quite track the registration status.  Do you think this idea has promise?  Maybe something similar that works using triggers rather than a straight view might work better?

Thanks,
Steve

--
Steve Davies: Technical Director, Connection Telecom (Pty) Ltd

_______________________________________________
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

---
* Olle E Johansson - oej@edvina.net
* Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden