[OpenSIPS-Users] Trying to get Snom Contact List to work with OpenSIPS RLS
Duane Larson
duane.larson at gmail.com
Sun Jan 29 22:00:30 CET 2012
My main.c file has the following at the top
/*
* $Id: main.c 8506 2011-10-21 10:21:10Z vladut-paiu $
On Sun, Jan 29, 2012 at 12:17 PM, Duane Larson <duane.larson at gmail.com>wrote:
> Let get the opensips trunk version I am running when I get back home.
> I'll let you know.
> On Jan 29, 2012 12:14 PM, "Adrian Georgescu" <ag at ag-projects.com> wrote:
>
>> The way you did it is correct, it should work just fine. If it does not
>> work with the current OpenSIPS trunk version is a bug and we will fix it.
>>
>> Adrian
>>
>> On Jan 29, 2012, at 5:59 PM, duane.larson at gmail.com wrote:
>>
>> > I added the following to xcap
>> >
>> > PUT /xcap-root/rls-services/users/sip:9012732009 at irock.com/indexHTTP/1.1.
>> > Accept-Encoding: identity.
>> > Content-Length: 798.
>> > Host: xcap.X.com.
>> > User-Agent: python-xcaplib/1.0.16.
>> > Connection: close.
>> > Content-Type: application/x-www-form-urlencoded.
>> > Authorization: Digest username="9012732009", realm="irock.com",
>> nonce="332840634855165799770139975774574805066135619005395955328",
>> uri="/xcap-root/rls-services/users/sip:9012732009 at irock.com/index",
>> response="f76c6a6375156936cb0c5d6137a325ad",
>> opaque="0a430b4a4d580e7d473c2697c9d61477-MzMyODQwNjM0ODU1MTY1Nzk5NzcwMTM5OTc1Nzc0NTc0ODA1MDY2MTM1NjE5MDA1Mzk1OTU1MzI4LDE3My4yMDMuODEuMTExLDEzMjc4MTQzOTE=",
>> algorithm="MD5", qop=auth, nc=00000001, cnonce="dfd8addb86008b0e".
>> > .
>> >
>> > ##
>> > T 2012/01/28 23:19:51.385478 173.X.X.X:39849 -> 173.X.X.X:80 [AP]
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <rls-services xmlns="urn:ietf:params:xml:ns:rls-services"
>> > xmlns:rl="urn:ietf:params:xml:ns:resource-lists"
>> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>> > <service uri="sip:9012732009-list at irock.com">
>> > <resource-list>
>> http://xcap.X.com/xcap-root/resource-lists/users/sip:9012732009@irock.com/index
>> </resource-list>
>> > <packages>
>> > <package>presence</package>
>> > </packages>
>> > </service>
>> > <service uri="sip:9012732009-list at irock.com">
>> > <list name="9012732009-list">
>> > <rl:entry uri="sip:9012732005 at coolbeans.com"/>
>> > <rl:entry uri="sip:9013349020 at coolbeans.com"/>
>> > </list>
>> > <packages>
>> > <package>presence</package>
>> > </packages>
>> > </service>
>> > </rls-services>
>> >
>> > ####
>> > T 2012/01/28 23:19:52.641120 173.X.X.X:80 -> 173.X.X.X:39849 [AP]
>> > HTTP/1.1 201 Created.
>> > Date: Sun, 29 Jan 2012 05:19:52 GMT.
>> > Content-Length: 0.
>> > ETag: "0a66a8b47732adca8badebeece871fe4".
>> > Content-Type: application/rls-services+xml.
>> > Server: OpenXCAP/2.0.1.
>> > Connection: close.
>> >
>> >
>> >
>> >
>> >
>> > Then when the Snom phone subscribes things go a little better but there
>> are no contacts listed in the NOTIFY that gets sent. Also OpenSIPS shows
>> one thing in the log
>> >
>> > #
>> > U 2012/01/28 23:28:00.600321 99.67.237.217:3072 -> 173.X.X.X:5060
>> > SUBSCRIBE sip:9012732009-list at irock.com SIP/2.0.
>> > Via: SIP/2.0/UDP 99.67.237.217:3072;branch=z9hG4bK-wctkdq0ceq6u;rport.
>> > From: <sip:9012732009 at irock.com>;tag=tu0q85o124.
>> > To: <sip:9012732009-list at irock.com>.
>> > Call-ID: 2cee333cf0e6-9se6madmvpus.
>> > CSeq: 1 SUBSCRIBE.
>> > Max-Forwards: 70.
>> > Contact: <sip:9012732009 at 99.67.237.217:3072;line=ya0mpcya>;reg-id=1.
>> > Event: presence.
>> > Accept: application/pidf+xml, application/rlmi+xml, multipart/related.
>> > Supported: eventlist.
>> > User-Agent: snom821/8.4.31.
>> > Expires: 3600.
>> > Content-Length: 0.
>> > .
>> >
>> > #
>> > U 2012/01/28 23:28:00.669532 173.X.X.X:5060 -> 99.67.237.217:3072
>> > SIP/2.0 200 OK.
>> > Via: SIP/2.0/UDP 99.67.237.217:3072
>> ;received=99.67.237.217;branch=z9hG4bK-wctkdq0ceq6u;rport=3072.
>> > From: <sip:9012732009 at irock.com>;tag=tu0q85o124.
>> > To: <sip:9012732009-list at irock.com
>> >;tag=31ec65e482de21ae66d7d44df69d3d8c-363d.
>> > Call-ID: 2cee333cf0e6-9se6madmvpus.
>> > CSeq: 1 SUBSCRIBE.
>> > Expires: 3600.
>> > Contact: <sip:rls at 173.X.X.X:5060>.
>> > Require: eventlist.
>> > Server: AE SIP Proxy.
>> > Content-Length: 0.
>> > .
>> >
>> > #
>> > U 2012/01/28 23:28:00.683217 173.X.X.X:5060 -> 99.67.237.217:3072
>> > NOTIFY sip:9012732009 at 99.67.237.217:3072;line=ya0mpcya SIP/2.0.
>> > Via: SIP/2.0/UDP 173.X.X.X;branch=z9hG4bK0f9f.021e9e57.0.
>> > To: <sip:9012732009 at irock.com>;tag=tu0q85o124.
>> > From: <sip:9012732009-list at irock.com
>> >;tag=31ec65e482de21ae66d7d44df69d3d8c-363d.
>> > CSeq: 1 NOTIFY.
>> > Call-ID: 2cee333cf0e6-9se6madmvpus.
>> > Content-Length: 348.
>> > User-Agent: OpenSIPS (1.8.0-dev0-notls (x86_64/linux)).
>> > Max-Forwards: 70.
>> > Event: presence.
>> > Contact: <sip:rls at 173.X.X.X:5060>.
>> > Subscription-State: active;expires=3600.
>> > Require: eventlist.
>> > Content-Type:
>> multipart/related;type="application/rlmi+xml";start="<.1327814880.sip:
>> 9012732009-list at irock.com.1758875796
>> >";boundary="AQ6ybEHhcfURUcWaJnJuOinM".
>> > .
>> > --AQ6ybEHhcfURUcWaJnJuOinM.
>> > Content-Transfer-Encoding: binary.
>> > Content-ID: <1327814880.sip:9012732009-list at irock.com.1758875796>.
>> > Content-Type: application/rlmi+xml;charset="UTF-8".
>> > .
>> > <?xml version="1.0"?>
>> > <list uri="sip:9012732009-list at irock.com"
>> xmlns="urn:ietf:params:xml:ns:rlmi" version="0" fullState="true"/>.
>> > .
>> > --AQ6ybEHhcfURUcWaJnJuOinM--.
>> >
>> > #
>> > U 2012/01/28 23:28:00.793048 99.67.237.217:3072 -> 173.X.X.X:5060
>> > SIP/2.0 200 Ok.
>> > Via: SIP/2.0/UDP 173.X.X.X;branch=z9hG4bK0f9f.021e9e57.0.
>> > From: <sip:9012732009-list at irock.com
>> >;tag=31ec65e482de21ae66d7d44df69d3d8c-363d.
>> > To: <sip:9012732009 at irock.com>;tag=tu0q85o124.
>> > Call-ID: 2cee333cf0e6-9se6madmvpus.
>> > CSeq: 1 NOTIFY.
>> > Content-Length: 0.
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > Here is the log in the OpenSIPS list
>> > INFO:rls:resource_subscriptions: Subscription from
>> sip:9012732009 at irock.com for resource list uri
>> sip:9012732009-list at irock.com expanded to
>> > 0 contacts
>> >
>> >
>> >
>> > So the NOTIFY is missing the contacts I listed in the XML that was
>> posted in the HTTP PUT.
>> >
>> >
>> >
>> > On , Duane Larson <duane.larson at gmail.com> wrote:
>> > >
>> > > Cool. Thanks for the info.
>> > > On Jan 28, 2012 4:03 PM, "Adrian Georgescu" ag at ag-projects.com>
>> wrote:
>> > > The document you must create for RLS is called rls-services. What you
>> pasted resource-lists and pre-rules documents, which is something else. See
>> RFC 4825.
>> > >
>> > >
>> > >
>> > > Adrian
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > On Jan 28, 2012, at 8:26 PM, duane.larson at gmail.com wrote:
>> > >
>> > >
>> > >
>> > > > Adrian,
>> > >
>> > > >
>> > >
>> > > > This is what I have in the xcap table for user 9012732009.
>> > >
>> > > >
>> > >
>> > > > 527 9012732009 irock.com lists
>> xmlns="urn:ietf:params:xml:ns:resource-lists">
>> sip:9012732005 at coolbeans.com">9012732005/display-name>
>> sip:9013349020 at coolbeans.com">9013349020/display-name>list
>> name="RootGroup"/>lists> 4 9b67239aba25756f119fbcce38b156f3 0 index 0
>> > >
>> > >
>> > > >
>> > >
>> > > >
>> > >
>> > > >
>> > >
>> > > >
>> > >
>> > > > 523 9012732009 irock.com common-policy">conditions>
>> sip:9012732005 at coolbeans.com"/>sip:9013349020 at coolbeans.com"/>pres-rules">allowhandling>transformations>devices
>> xmlns="urn:ietf:params:xml:ns:pres-rules">provide-devices>persons
>> xmlns="urn:ietf:params:xml:ns:pres-rules">provide-persons>services
>> xmlns="urn:ietf:params:xml:ns:pres-rules">provide-services>transformations>ruleset>
>> 2 7389ddfe17038e107feb98b0382ed1a9 0 index.xml 0
>> > >
>> > >
>> > > >
>> > >
>> > > >
>> > >
>> > > >
>> > >
>> > > > The first I would think is a contact list right? My Presence works
>> fine with these XCAP docs.
>> > >
>> > > >
>> > >
>> > > > On , Adrian Georgescu ag at ag-projects.com> wrote:
>> > >
>> > > > > RLS is a way to expand in the SIP server a single subscription
>> sent to a SIP address into multiple subscriptions to a list of addresses
>> defined in XCAP server rls-services document.
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > Your error 5 means that your have no contacts list defined in the
>> rls-services document for sip uri 9012732009 at irock.com
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > You must build the list of contacts for 9012732009 at irock.com,
>> upload it using HTTP PUT to the XCAP server rls-services document and
>> finally subscribe to 9012732009 at irock.com
>> > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > Adrian
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > On Jan 27, 2012, at 2:15 AM, duane.larson at gmail.com wrote:
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > I am trying to get Snom's Contact List to work with RLS and
>> XCAP. When I enable the Snom phone it sends the following subscribe
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > SUBSCRIBE sip:9012732009 at irock.com;user=phone SIP/2.0
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > Via: SIP/2.0/UDP 192.168.1.70:3072
>> ;branch=z9hG4bK-o82o6mip4krp;rport
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > From: sip:9012732009 at irock.com>;tag=uqpj4kshg7
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > To: sip:9012732009 at irock.com;user=phone>
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > Call-ID: c60b313ccc40-ul069icazcpv
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > CSeq: 1 SUBSCRIBE
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > Max-Forwards: 70
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > Contact: ;reg-id=1
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > Event: presence
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > Accept: application/pidf+xml, application/rlmi+xml,
>> multipart/related
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > Supported: eventlist
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > User-Agent: snom821/8.4.31
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > Expires: 3600
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > Content-Length: 0
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > With my OpenSIPS config I have
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > # -- rls params --
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > modparam("rls", "db_url", "mysql://opensips:****@
>> 127.0.0.1/opensips")
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > modparam("rls", "server_address", "sip:rls at sdfsdfsdf:5060")
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > modparam("rls", "to_presence_code", 5)
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > modparam("rls", "integrated_xcap_server", 1)
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > modparam("rls", "presence_server", "sip:sa at asdfsadfsd:5060")
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > modparam("rls", "rls_event", "xcap-diff")
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > modparam("rls", "rls_event", "ua-profile")
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > rls_handle_subscribe();
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > switch ($retcode) {
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > case 5:
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > # RLS indicated that message should be processed by presence
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > if (is_uri_host_local()) {
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > if (db_does_uri_exist()) {
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > handle_subscribe();
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > } else {
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > t_reply("404", "User not found");
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > }
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > exit;
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > }
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > break;
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > I see with xlog messages that rls_handle_subscribe() fails with
>> a "case 5". I am not sure why the Snom SUBSCRIBE would fail with a "5".
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > I've looked at http://www.opensips.org/Resources/Rls and the
>> SUBSCRIBE from SNOM really isn't that different. So why does
>> "rls_handle_subscribe()"
>> fail?_______________________________________________
>> > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > Users mailing list
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > Users at lists.opensips.org
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > _______________________________________________
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > Users mailing list
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > Users at lists.opensips.org
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> > >
>> > > > >
>> > >
>> > > > >
>> > >
>> > > > >_______________________________________________
>> > >
>> > > > Users mailing list
>> > >
>> > > > Users at lists.opensips.org
>> > >
>> > > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > _______________________________________________
>> > >
>> > > Users mailing list
>> > >
>> > > Users at lists.opensips.org
>> > >
>> > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> > >
>> > >
>> > >
>> > >_______________________________________________
>> > Users mailing list
>> > Users at lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120129/57e31648/attachment-0001.htm>
More information about the Users
mailing list