[SR-Users] On register

Keith keith at hubner.co.uk
Tue Oct 8 15:35:42 CEST 2013


Thanks for looking at it, I have put in a notice message in the
failure_route and it's not showing in the log which suggests it's not
triggering this route at all.

I don't think it is treating the 401 as a failure route.

Keith


On Tue, Oct 8, 2013 at 1:54 PM, <sr-users-request at lists.sip-router.org>wrote:

> Send sr-users mailing list submissions to
>         sr-users at lists.sip-router.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> or, via email, send a message with subject or body 'help' to
>         sr-users-request at lists.sip-router.org
>
> You can reach the person managing the list at
>         sr-users-owner at lists.sip-router.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sr-users digest..."
>
>
> Today's Topics:
>
>    1. Re: On register (Keith)
>    2. Re: On register (Daniel-Constantin Mierla)
>    3. Re: Apply changes made to sip reply in onreply_route
>       (Klaus Darilion)
>    4. Re: Presence: Duplicate entry
>       'username-domain-presence-*#-OFFLINE-#*' for key 'presentity_idx'
>       when multiple clients register using the same credentials (Yufei Tao)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 8 Oct 2013 12:31:20 +0100
> From: Keith <keith at hubner.co.uk>
> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
>         Users   Mailing List" <sr-users at lists.sip-router.org>
> Subject: Re: [SR-Users] On register
> Message-ID:
>         <CAK7Ybu96QT+xt6BqJCjemai5En8uZ7VHigCg=
> AFvpP5tUYKXWw at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I am trying to "on register" from kamailio to an asterisk box. I am having
> trouble when asterisk sends a 401 to the first register response. I have
> tried to set a failure route as follows:
> t_on_failure("FAILURE_HANDLE");
>
> failure_route[FAILURE_HANDLE] {
>
>        if (t_is_canceled()) {
> exit;
> }
>
>        if(t_check_status("401")) {
>           uac_auth();
>        }
>
>
>
>        t_relay();
>     }
>
> But it doesn't see to send the credentials back.
>
> Any help would be appreciated.
> Thanks.
> Keith
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.sip-router.org/pipermail/sr-users/attachments/20131008/880c82c1/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 08 Oct 2013 13:36:57 +0200
> From: Daniel-Constantin Mierla <miconda at gmail.com>
> To: "Kamailio (SER) - Users Mailing List"
>         <sr-users at lists.sip-router.org>
> Subject: Re: [SR-Users] On register
> Message-ID: <5253EE59.6030906 at gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Hello,
>
> haven't had time to look into sources, can you try:
>
> $ru = $ru;
>
> after uac_auth()?
>
> What I am trying to discover is if uac_auth() creates a new branch,
> because if it doesn't and you don't update any of the elements related
> to next hop address, kamailio won't detect there is need for a new relay.
>
> If still doesn't work, then provide the log messages with debug=3 in
> config file.
>
> Cheers,
> Daniel
>
> On 10/8/13 1:31 PM, Keith wrote:
> > Hi,
> >
> > I am trying to "on register" from kamailio to an asterisk box. I am
> > having trouble when asterisk sends a 401 to the first register
> > response. I have tried to set a failure route as follows:
> > t_on_failure("FAILURE_HANDLE");
> >
> > failure_route[FAILURE_HANDLE] {
> >
> >        if (t_is_canceled()) {
> > exit;
> > }
> >
> >        if(t_check_status("401")) {
> >           uac_auth();
> >        }
> >
> >
> >        t_relay();
> >     }
> >
> > But it doesn't see to send the credentials back.
> >
> > Any help would be appreciated.
> > Thanks.
> > Keith
> >
> >
> > _______________________________________________
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > sr-users at lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla - http://www.asipto.com
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
> Kamailio Advanced Trainings - Berlin, Nov 25-28; Miami, Nov 18-20, 2013
>    - more details about Kamailio trainings at http://www.asipto.com -
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.sip-router.org/pipermail/sr-users/attachments/20131008/318c7a9a/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Tue, 08 Oct 2013 14:50:40 +0200
> From: Klaus Darilion <klaus.mailinglists at pernau.at>
> To: sr-users at lists.sip-router.org
> Subject: Re: [SR-Users] Apply changes made to sip reply in
>         onreply_route
> Message-ID: <5253FFA0.7070201 at pernau.at>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Am 08.10.2013 12:14, schrieb Grant Bagdasarian:
> >
> > Hello,
> >
> > I've setup two Kamailio machines, one which does all the processing
> > and the second one which always replies with a 500 Server Internal
> > Error, to test my Dispatcher fail-over.
> >
> > When routing a call, the call is always routed to the second Kamailio
> > first, to test the fail-over.
> >
> > What happens in this scenario is the 500 is received by the main
> > Kamailio and the 500 message is duplicated to the capture server.
> > After this the failure_route kicks in and the 500 is obviously never
> > sent back to the initiator.
> >
> > The changes made to the 500 message  (adding a new header), in
> > onreply_route, aren't present when the message is duplicated to the
> > capture server, because the original 500 message is duplicated instead
> > of the modified one.
> >
> Out of curiosity -why do you add a header to the response if it is
> likely to be dropped (depending of the response in the second branch)?
> Just to signal data to the capture server?
>
> klaus
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.sip-router.org/pipermail/sr-users/attachments/20131008/d68c13e0/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 4
> Date: Tue, 8 Oct 2013 13:54:47 +0100
> From: Yufei Tao <yufei.tao at redembedded.com>
> To: <sr-users at lists.sip-router.org>
> Subject: Re: [SR-Users] Presence: Duplicate entry
>         'username-domain-presence-*#-OFFLINE-#*' for key 'presentity_idx'
> when
>         multiple clients register using the same credentials
> Message-ID: <52540097.9080408 at redembedded.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Thank you Juha for your replies!
>
> >From RFC3856:
>
> A Presence Event Package for the Session Initiation Protocol (SIP)
>
>
> 6.11.  State Agents
>
>    RFC 3265 [2] requires each package to consider the role of state
>    agents in the package, and if they are used, to specify how
>    authentication and authorization are done.
>
>    State agents are core to this package.  Whenever the PA is not
>    co-located with the PUA for the presentity, the PA is acting as a
>    state agent.  It collects presence state from the PUA, and aggregates
>    it into a presence document.  Because there can be multiple PUA, a
>    centralized state agent is needed to perform this aggregation.  That
>    is why state agents are fundamental to presence.  Indeed, they have a
>    specific term that describes them - a presence server.
>
> Seems the presence server needs to aggregate statuses from different PUAs
> for the same presentity into a single presence document, if I understand it
> correctly? Anyway it is not what happens currently with Kamailio 4.0.3
> unless I'm missing anything.
>
> Cheers,
> Yufei
>
> On 08/10/13 11:00, sr-users-request at lists.sip-router.org<mailto:
> sr-users-request at lists.sip-router.org> wrote:
>
> Message: 2
> Date: Mon, 7 Oct 2013 13:31:17 +0300
> From: Juha Heinanen <jh at tutpro.com><mailto:jh at tutpro.com>
> To: "Kamailio \(SER\) - Users Mailing List"
>         <sr-users at lists.sip-router.org><mailto:
> sr-users at lists.sip-router.org>
> Subject: Re: [SR-Users] Presence: Duplicate entry
>         'username-domain-presence-*#-OFFLINE-#*' for key 'presentity_idx'
> when
>         multiple clients register using the same credentials
> Message-ID: <21074.36213.575240.614265 at siika.tutpro.com><mailto:
> 21074.36213.575240.614265 at siika.tutpro.com>
> Content-Type: text/plain; charset=us-ascii
>
> Yufei Tao writes:
>
>
>
> > When a client (S) subscribes to this contact (username at domain) whose
> > credentials are used by two clients, (S) gets NOTIFYs containing
> > statuses from either of the username at domain contacts in alternation. But
> > all these NOTIFYs have the same call-id.
> >
> > I've tried remove the constraint 'CONSTRAINT presentity_idx UNIQUE
> > (username, domain, event, etag)' from the presentity table and the
> > errors have gone away. Just wondering if this is something that *should*
> > be done to cope with the situation where multiple presentities use the
> > same credentials.
>
>
> before knowing how to answer to that, i would like to know what presence
> rfcs say about this situation, i.e., is current kamailio presence
> implementation somehow broken when an aor (= presentity) has several
> active contacts.
>
> should notify give status of both contacts separately or should presence
> server try somehow to combine status of the contacts into a single
> notify?  what does it mean if one contact tells that it is offline and
> another online?  should presence server send only one notify telling
> that the presentity is online (since it is if one contact tells so)?
>
> -- juha
>
>
>
>
> On 05/10/13 11:00, sr-users-request at lists.sip-router.org<mailto:
> sr-users-request at lists.sip-router.org> wrote:
>
>
> Hi
>
> I use kamailio 4.0.3 with presence. I sometimes get these errors:
>
> Oct  4 09:26:24 server /usr/sbin/kamailio[1292]: ERROR: presence
> [publish.c:171]: msg_presentity_clean(): Marking presentity
> Oct  4 09:26:34 server /usr/sbin/kamailio[1292]: ERROR: db_mysql
> [km_dbase.c:122]: db_mysql_submit_query(): driver error on query:
> Duplicate entry 'username-domain-presence-*#-OFFLINE-#*' for key
> 'presentity_idx'
> Oct  4 09:26:34 server /usr/sbin/kamailio[1292]: ERROR: <core>
> [db_query.c:337]: db_do_update(): error while submitting query
> Oct  4 09:26:34 server /usr/sbin/kamailio[1292]: ERROR: presence
> [presentity.c:1281]: mark_presentity_for_delete(): unsuccessful sql
> update operation
>
> This is when multiple SIP clients are registered using the same
> credentials, they each have a presentity entry, with the same username
> and domain but different etags, which is fine. But when they expire, the
> presentity.etag will be filled with '*#-OFFLINE-#*', and when both
> expire at about the same time, kamailio tries to fill both with the same
> '*#-OFFLINE-#*' etag. Because presentity table has a 'CONSTRAINT
> presentity_idx UNIQUE (username, domain, event, etag)', this gives the
> errors.
>
> Should the constraint be removed to cope with this situation?
>
> Thank you!
> Yufei
>
> --
> Yufei Tao
> Red Embedded
>
> This E-mail and any attachments hereto are strictly confidential and
> intended solely for the addressee. If you are not the intended addressee
> please notify the sender by return and delete the message.
>
> You must not disclose, forward or copy this E-mail or attachments to any
> third party without the prior consent of the sender.
>
> Red Embedded Design, Company Number 06688253 Registered in England: The
> Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.sip-router.org/pipermail/sr-users/attachments/20131008/41e137a4/attachment.html
> >
>
> ------------------------------
>
> _______________________________________________
> sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> End of sr-users Digest, Vol 101, Issue 32
> *****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20131008/48815440/attachment-0001.html>


More information about the sr-users mailing list