[Kamailio-Users] presence send system info

alex pappas rebel.pappas at gmail.com
Tue Dec 1 11:24:37 CET 2009


We have very similar kamailio.cfg My route 2 is:

route[2]
{
        xlog("L_INFO", "Dealing with $rm F:$fu T:$tu\n");
        sl_send_reply("100","trying");
        if (!t_newtran())
        {
                sl_reply_error();
                exit;
        xlog("L_INFO", " (!t_newtran()   Dealing with $rm F:$fu T:$tu\n");
        };
        append_to_reply("Contact: <sip:10.0.3.76:5060>\r\n");
        if(is_method("PUBLISH"))
        {
                if($hdr(Sender)!= NULL) {
                        handle_publish("$hdr(Sender)");
                        xlog("alx --------- The hdr(sender)=$hdr(sender) NOT
NULL");
                }
                else
                {
                        xlog("alx --------- The hdr(sender)=$hdr(sender) is
NULL");
                        handle_publish("");
                }

                t_release();
         xlog("L_INFO", " PUBLISH   Dealing with $rm F:$fu T:$tu\n");
        }
        else
        if( is_method("SUBSCRIBE"))
        {
                handle_subscribe();
                t_release();
         xlog("L_INFO", " SUBSCRIBE   Dealing with $rm F:$fu T:$tu\n");
        }
        exit;

        # if presence enabled, this part will not be executed
        if (is_method("PUBLISH") || $rU==null)
        {
                sl_send_reply("404", "Not here");
                exit;
        }
        return;
}



On REGISTER I  get errors which I don't understand:

Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15927]:
INFO:pua_usrloc:ul_publish: should not send ul publish
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]: Dealing with SUBSCRIBE
F:sip:77777 at 10.0.3.76 <F%3Asip%3A77777 at 10.0.3.76>
T:sip:77777 at 10.0.3.76<T%3Asip%3A77777 at 10.0.3.76>
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]:
INFO:presence:send_notify_request: NOTIFY
sip:77777 at 10.0.3.76<sip%3A77777 at 10.0.3.76>via
sip:77777 at 10.0.2.46:16456 on behalf of
sip:77777 at 10.0.3.76<sip%3A77777 at 10.0.3.76>for event message-summary
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]:  SUBSCRIBE   Dealing
with SUBSCRIBE F:sip:77777 at 10.0.3.76 <F%3Asip%3A77777 at 10.0.3.76>
T:sip:77777 at 10.0.3.76 <T%3Asip%3A77777 at 10.0.3.76>
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]: Dealing with SUBSCRIBE
F:sip:77777 at 10.0.3.76 <F%3Asip%3A77777 at 10.0.3.76>
T:sip:77777 at 10.0.3.76<T%3Asip%3A77777 at 10.0.3.76>
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]:
INFO:presence:send_notify_request: NOTIFY
sip:77777 at 10.0.3.76<sip%3A77777 at 10.0.3.76>via
sip:77777 at 10.0.2.46:16456 on behalf of
sip:77777 at 10.0.3.76<sip%3A77777 at 10.0.3.76>for event presence.winfo
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]:  SUBSCRIBE   Dealing
with SUBSCRIBE F:sip:77777 at 10.0.3.76 <F%3Asip%3A77777 at 10.0.3.76>
T:sip:77777 at 10.0.3.76 <T%3Asip%3A77777 at 10.0.3.76>
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]: Dealing with SUBSCRIBE
F:sip:77777 at 10.0.3.76 <F%3Asip%3A77777 at 10.0.3.76>
T:sip:88888 at 10.0.3.76<T%3Asip%3A88888 at 10.0.3.76>
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]:
INFO:presence:send_notify_request: NOTIFY
sip:77777 at 10.0.3.76<sip%3A77777 at 10.0.3.76>via
sip:77777 at 10.0.2.46:16456 on behalf of
sip:88888 at 10.0.3.76<sip%3A88888 at 10.0.3.76>for event presence
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]:  SUBSCRIBE   Dealing
with SUBSCRIBE F:sip:77777 at 10.0.3.76 <F%3Asip%3A77777 at 10.0.3.76>
T:sip:88888 at 10.0.3.76 <T%3Asip%3A88888 at 10.0.3.76>
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]: Dealing with SUBSCRIBE
F:sip:77777 at 10.0.3.76 <F%3Asip%3A77777 at 10.0.3.76>
T:sip:99999 at 10.0.3.76<T%3Asip%3A99999 at 10.0.3.76>
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]:
INFO:presence:send_notify_request: NOTIFY
sip:77777 at 10.0.3.76<sip%3A77777 at 10.0.3.76>via
sip:77777 at 10.0.2.46:16456 on behalf of
sip:99999 at 10.0.3.76<sip%3A99999 at 10.0.3.76>for event presence
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]:  SUBSCRIBE   Dealing
with SUBSCRIBE F:sip:77777 at 10.0.3.76 <F%3Asip%3A77777 at 10.0.3.76>
T:sip:99999 at 10.0.3.76 <T%3Asip%3A99999 at 10.0.3.76>
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]: Dealing with PUBLISH
F:sip:77777 at 10.0.3.76 <F%3Asip%3A77777 at 10.0.3.76>
T:sip:77777 at 10.0.3.76<T%3Asip%3A77777 at 10.0.3.76>
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]: alx --------- The
hdr(sender)=<null> is NULL
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]: *ERROR:core:parse_uri:
uri too short: <> (0)*
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]:
*ERROR:presence:handle_publish:
bad sender SIP address!*
Dec  1 12:20:24 YGOR /usr/local/sbin/kamailio[15926]:  PUBLISH   Dealing
with PUBLISH F:sip:77777 at 10.0.3.76 <F%3Asip%3A77777 at 10.0.3.76>
T:sip:77777 at 10.0.3.76 <T%3Asip%3A77777 at 10.0.3.76>

When I run the kamailio-publish-system.sh script I get in the syslog the
following output:

Dec  1 12:22:28 YGOR /usr/local/sbin/kamailio[15929]: Dealing with PUBLISH
F:sip:system at 10.0.3.76 <F%3Asip%3Asystem at 10.0.3.76>
T:sip:system at 10.0.3.76<T%3Asip%3Asystem at 10.0.3.76>
Dec  1 12:22:29 YGOR /usr/local/sbin/kamailio[15929]: alx --------- The
hdr(sender)=<null> is NULL
Dec  1 12:22:29 YGOR /usr/local/sbin/kamailio[15929]: *ERROR:core:parse_uri:
uri too short: <> (0)*
Dec  1 12:22:29 YGOR /usr/local/sbin/kamailio[15929]:
*ERROR:presence:handle_publish:
bad sender SIP address!*
Dec  1 12:22:29 YGOR /usr/local/sbin/kamailio[15929]:  PUBLISH   Dealing
with PUBLISH F:sip:system at 10.0.3.76 <F%3Asip%3Asystem at 10.0.3.76>
T:sip:system at 10.0.3.76 <T%3Asip%3Asystem at 10.0.3.76>

And the ouput of the script in the console is:

 ./kamailio-publish-system.sh
*200 OK
400 Bad request*


Do you see any reason for these errors ?

Thanks

Alex




On Tue, Dec 1, 2009 at 11:30 AM, BERGANZ François <
francois at acropolistelecom.net> wrote:

>  I’ve just sent the kamailio.cfg.
>
> You don’t need to French knowledge ^^
>
>
>
> There is just a problem in a modparam where it refresh the presence…
>
> Don’t follow my modparams
>
>
>
>
>
> *François ***
>
> P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
>
>
>
> *De :* alex pappas [mailto:rebel.pappas at gmail.com]
> *Envoyé :* mardi 1 décembre 2009 10:27
>
> *À :* BERGANZ François
> *Cc :* users at lists.kamailio.org
> *Objet :* Re: [Kamailio-Users] presence send system info
>
>
>
> Thank you very match
>
> I will try babelfish and if i don't get it I will ask help from my
> girlfriend ;-)
>
> Alex
>
>
>  On Tue, Dec 1, 2009 at 11:22 AM, BERGANZ François <
> francois at acropolistelecom.net> wrote:
>
> I will send you a large project I could do last year with all how-to…
>
> But it is in french J
>
>
>
>
>
>
>
> P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
>
>
>
> *De :* alex pappas [mailto:rebel.pappas at gmail.com]
> *Envoyé :* mardi 1 décembre 2009 10:19
> *À :* BERGANZ François
> *Cc :* users at lists.kamailio.org
> *Objet :* Re: [Kamailio-Users] presence send system info
>
>
>
> I have already done that (set x-lite presence agent). I also added in my
> contact list the system (as subscribe). When I run the script to send the
> publish message then I get the following errors:
>
>   /usr/local/sbin/kamailio[13921]: Dealing with PUBLISH
> F:sip:system at 10.0.3.76 <F%3Asip%3Asystem at 10.0.3.76> T:sip:system at 10.0.3.76<T%3Asip%3Asystem at 10.0.3.76>
>   /usr/local/sbin/kamailio[13921]: LOG--------- The hdr(sender)=<null> is
> NULL
>   /usr/local/sbin/kamailio[13921]: ERROR:core:parse_uri: uri too short: <>
> (0)
>   /usr/local/sbin/kamailio[13921]: ERROR:presence:handle_publish: bad
> sender SIP address!
>   /usr/local/sbin/kamailio[13921]:  PUBLISH   Dealing with PUBLISH
> F:sip:system at 10.0.3.76 <F%3Asip%3Asystem at 10.0.3.76> T:sip:system at 10.0.3.76<T%3Asip%3Asystem at 10.0.3.76>
>
> how this should work ?
>
> Thank you
>
> Alex
>
> On Tue, Dec 1, 2009 at 11:03 AM, BERGANZ François <
> francois at acropolistelecom.net> wrote:
>
> To send presence with X-Lite, first, active presence in options.
>
> Active presence to use the kamailio proxy for presence
>
>
>
>
>
>
>
> *François *
>
> P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
>
>
>
> *De :* users-bounces at lists.kamailio.org [mailto:
> users-bounces at lists.kamailio.org] *De la part de* alex pappas
> *Envoyé :* mardi 1 décembre 2009 09:33
> *À :* users at lists.kamailio.org
> *Objet :* [Kamailio-Users] presence send system info
>
>
>
> Dear friends,
>
> I'm trying to send some system info through presence in my X-Lite client ,
> following the example
> http://www.kamailio.org/dokuwiki/doku.php/presence:pua-modules#using_with_x-lite_3.0
> Does anyone knows what configuration should i have in the X-Lite side?
>
> Thanks
>
> Alex
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20091201/eb5b8398/attachment.htm>


More information about the sr-users mailing list