I tried nua_subscribe with SIPTAG_EXPIRES_STR("0"), but I had the same problem.
Attached sofia-sip level 9 log
Thanks,
Filippo


-----Original Message-----
From: Pekka Pessi [mailto:[EMAIL PROTECTED]
Sent: mercoledì 6 agosto 2008 20.08
To: Della Betta Filippo
Cc: sofia-sip-devel@lists.sourceforge.net
Subject: Re: [Sofia-sip-devel] NOTIFY and 481

2008/8/1 Della Betta Filippo <[EMAIL PROTECTED]>:
> Hello All,
>        I wrote a simple sofia-sip application that REGISTER itself to a 
> proxy, send a SUBSCRIBE, an (un)SUBSCRIBE and (un)REGISTER (see flow and code 
> below).
> In response to the last NOTIFY (after the (un)SUBSCRIBE) sofia-sip sends 481 
> Call Does Not Exist.
> In my opinion it is not correct. The correct answer should be 200 OK since 
> dialog must be destroyed on incoming NOTIFY with Subscription-State: 
> terminated (RFC3265)
> Do you agree ?

You are correct.

> If so, am I doing something wrong with the code ?

You can avoid the problem by using nua_subscribe() when unsubscribing, too, like

nua_subscribe(nsh, SIPTAG_EXPIRES_STR("0"),
                SIPTAG_EVENT_STR("presence.winfo"),
                TAG_END());


--
Pekka.Pessi mail at nokia.com
--------------------------------------------------------------------

CONFIDENTIALITY NOTICE

This message and its attachments are addressed solely to the persons above and 
may contain confidential information. If you have received the message in 
error, be informed that any use of the content hereof is prohibited. Please 
return it immediately to the sender and delete the message. Should you have any 
questions, please contact us by replying to [EMAIL PROTECTED]

        Thank you

                                        www.telecomitalia.it

--------------------------------------------------------------------
                        
su_socket_port_init(00EE4F00, 101E6120) called
su_pthread_port_init(00EE4F00, 101E6120) called
su_socket_port_init(00EE22E0, 101E6120) called
su_pthread_port_init(00EE22E0, 101E6120) called
soa_create("default", 00EE68D0, 00EE6A10) called
soa_set_params(static::00EE7030, ...) called
soa_set_params(static::00EE7030, ...) called
nta_agent_create: initialized hash tables
nta_agent_create: initialized transports
nta_agent_create: initialized random identifiers
nta_agent_create: initialized timer
Adding nameserver: 10.229.22.18
Adding nameserver: 10.229.22.15
Adding nameserver: 156.54.17.165
Adding nameserver: 163.162.4.47
Adding nameserver: 163.162.4.70
nta_agent_create: initialized resolver
tport_create(): 00EE91E0
nta: master transport created
tport(00EE91E0) to */0.0.0.0:7191/sip
tport(00EE91E0): calling tport_listen for udp
tport(00EE91E0): new primary tport 00EE9610
tport(00EE9610): listening at udp/163.162.233.17:7191/sip
tport(00EE91E0): calling tport_listen for tcp
tport(00EE91E0): new primary tport 00EE9930
tport(00EE9930): listening at tcp/163.162.233.17:7191/sip
tport(00EE91E0): calling tport_listen for udp
tport(00EE91E0): new primary tport 00EE9C50
tport(00EE9C50): listening at udp/10.229.8.29:7191/sip
tport(00EE91E0): calling tport_listen for tcp
tport(00EE91E0): new primary tport 00EEA008
tport(00EEA008): listening at tcp/10.229.8.29:7191/sip
tport(00EE91E0): calling tport_listen for udp
tport(00EE91E0): new primary tport 00EEA3C0
tport(00EEA3C0): listening at udp/192.168.187.1:7191/sip
tport(00EE91E0): calling tport_listen for tcp
tport(00EE91E0): new primary tport 00EEA778
tport(00EEA778): listening at tcp/192.168.187.1:7191/sip
tport(00EE91E0): calling tport_listen for udp
tport(00EE91E0): new primary tport 00EEB008
tport(00EEB008): listening at udp/192.168.136.1:7191/sip
tport(00EE91E0): calling tport_listen for tcp
tport(00EE91E0): new primary tport 00EEB328
tport(00EEB328): listening at tcp/192.168.136.1:7191/sip
tport(00EE91E0): calling tport_listen for udp
tport(00EE91E0): new primary tport 00EEB688
tport(00EEB688): listening at udp/127.0.0.1:7191/sip
tport(00EE91E0): calling tport_listen for tcp
tport(00EE91E0): new primary tport 00EEBA38
tport(00EEBA38): listening at tcp/127.0.0.1:7191/sip
nta: bound to (0.0.0.0:7191;transport=*)
nta: agent_init_via: SIP/2.0/udp 163.162.233.17:7191 (sip)
nta: agent_init_via: SIP/2.0/tcp 163.162.233.17:7191 (sip)
nta: agent_init_via: SIP/2.0/udp 10.229.8.29:7191 (sip)
nta: agent_init_via: SIP/2.0/tcp 10.229.8.29:7191 (sip)
nta: agent_init_via: SIP/2.0/udp 192.168.187.1:7191 (sip)
nta: agent_init_via: SIP/2.0/tcp 192.168.187.1:7191 (sip)
nta: agent_init_via: SIP/2.0/udp 192.168.136.1:7191 (sip)
nta: agent_init_via: SIP/2.0/tcp 192.168.136.1:7191 (sip)
nta: agent_init_via: SIP/2.0/udp 127.0.0.1:7191 (sip)
nta: agent_init_via: SIP/2.0/tcp 127.0.0.1:7191 (sip)
nta: Via fields initialized
nta: Contact header created
nua_register: Adding contact URL '163.162.233.17' to list.
nua_register: Adding contact URL '10.229.8.29' to list.
nua_register: Adding contact URL '192.168.187.1' to list.
nua_register: Adding contact URL '192.168.136.1' to list.
nua_register: ignoring contact candidate 127.0.0.1:7191.
tport_wakeup_pri(00EE9610): events IN
tport_recv_event(00EE9610)
tport(00EE9610) msg 00EEDB58 from (udp/163.162.233.17:7191) has 4 bytes, veclen 
= 1
tport(00EE9610): bad msg 00EEDB58 (0 bytes) from udp/163.162.233.17:7191/sip 
next=00000000
nta_agent: received garbage from udp/163.162.233.17:7191/sip
nua(00EEDB58): sent signal r_register
soa_clone(static::00EE7030, 00EE68D0, 00EEDB58) called
soa_set_params(static::00EEE188, ...) called
soa_set_params(static::00EEE188, ...) called
nta_leg_tcreate(00EEEA60)
nua(00EEDB58): adding register usage
nta: selecting scheme sip
tport_tsend(00EE9610) tpn = */163.162.159.160:5060
tport_resolve addrinfo = 163.162.159.160:5060
tport(00EE9610): not found by name */163.162.159.160:5060
tport_vsend returned 518
nta: sent REGISTER (102970695) to */163.162.159.160:5060
tport_pend(00EE9610): pending 00EEF600 for udp/163.162.233.17:7191 (already 0)
nta: timer set to 32000 ms
nta: timer shortened to 500 ms
tport_wakeup_pri(00EE9C50): events IN
tport_recv_event(00EE9C50)
tport(00EE9C50) msg 00DA09E0 from (udp/10.229.8.29:7191) has 4 bytes, veclen = 1
tport(00EE9C50): bad msg 00DA09E0 (0 bytes) from udp/10.229.8.29:7191/sip 
next=00000000
nta_agent: received garbage from udp/10.229.8.29:7191/sip
tport_wakeup_pri(00EEA3C0): events IN
tport_recv_event(00EEA3C0)
tport(00EEA3C0) msg 00DA09E0 from (udp/192.168.187.1:7191) has 4 bytes, veclen 
= 1
tport(00EEA3C0): bad msg 00DA09E0 (0 bytes) from udp/192.168.187.1:7191/sip 
next=00000000
nta_agent: received garbage from udp/192.168.187.1:7191/sip
tport_wakeup_pri(00EEB008): events IN
tport_recv_event(00EEB008)
tport(00EEB008) msg 00DA09E0 from (udp/192.168.136.1:7191) has 4 bytes, veclen 
= 1
tport(00EEB008): bad msg 00DA09E0 (0 bytes) from udp/192.168.136.1:7191/sip 
next=00000000
nta_agent: received garbage from udp/192.168.136.1:7191/sip
tport_wakeup_pri(00EEB688): events IN
tport_recv_event(00EEB688)
tport(00EEB688) msg 00DA09E0 from (udp/127.0.0.1:7191) has 4 bytes, veclen = 1
tport(00EEB688): bad msg 00DA09E0 (0 bytes) from udp/127.0.0.1:7191/sip 
next=00000000
nta_agent: received garbage from udp/127.0.0.1:7191/sip
tport_wakeup_pri(00EE9610): events IN
tport_recv_event(00EE9610)
tport(00EE9610) msg 00DA09E0 from (udp/163.162.233.17:7191) has 525 bytes, 
veclen = 1
tport(00EE9610): msg 00DA09E0 (525 bytes) from udp/163.162.159.160:7191/sip 
next=00000000
nta: received 200 OK for REGISTER (102970695)
nta: 200 OK is going to a transaction
nta_outgoing: RTT is 344.74 ms
tport(00EE9610): 00EEF600 by 00DA01F0 with 00DA09E0
nua(): refresh register after 489 seconds (in [225..675])
nua(): refresh register after 489 seconds
nua_callback> nua_r_register status 200 OK
nta: timer set next to 4807 ms
nua(00EEDD80): sent signal r_subscribe
soa_clone(static::00EE7030, 00EE68D0, 00EEDD80) called
soa_set_params(static::00DA29A0, ...) called
soa_set_params(static::00DA29A0, ...) called
nta_leg_tcreate(00DA3290)
nua(00EEDD80): adding subscribe usage with event presence.winfo
nta: selecting scheme sip
tport_tsend(00EE9610) tpn = */163.162.159.160:5060
tport_resolve addrinfo = 163.162.159.160:5060
tport(00EE9610): not found by name */163.162.159.160:5060
tport_vsend returned 597
nta: sent SUBSCRIBE (102970696) to */163.162.159.160:5060
tport_pend(00EE9610): pending 00DA3900 for udp/163.162.233.17:7191 (already 0)
nta: timer shortened to 500 ms
tport_wakeup_pri(00EE9610): events IN
tport_recv_event(00EE9610)
tport(00EE9610) msg 00DA51C0 from (udp/163.162.233.17:7191) has 482 bytes, 
veclen = 1
tport(00EE9610): msg 00DA51C0 (482 bytes) from udp/163.162.159.160:7191/sip 
next=00000000
nta: received 200 OK for SUBSCRIBE (102970696)
nta: 200 OK is going to a transaction
nta_outgoing: RTT is 97.66 ms
tport(00EE9610): 00DA3900 by 00DA4628 with 00DA51C0
nua(): refresh subscribe after 2345 seconds (in [900..2700])
nua(): refresh subscribe after 2345 seconds
nua_callback> nua_r_subscribe status 200 OK
tport_wakeup_pri(00EE9610): events IN
tport_recv_event(00EE9610)
tport(00EE9610) msg 00DA6080 from (udp/163.162.233.17:7191) has 865 bytes, 
veclen = 1
tport(00EE9610): msg 00DA6080 (865 bytes) from udp/163.162.159.160:7191/sip 
next=00000000
nta: received NOTIFY sip:163.162.233.17:7191 SIP/2.0 (CSeq 2)
nta: canonizing sip:163.162.233.17:7191 with contact
nta: NOTIFY (2) going to existing leg
nua(00EEDD80): nua_notify_server_preprocess: active ()
tport_tsend(00EE9610) tpn = UDP/163.162.159.160:5062
tport_resolve addrinfo = 163.162.159.160:5062
tport(00EE9610): not found by name UDP/163.162.159.160:5062
tport_vsend returned 616
nta: sent 200 OK for NOTIFY (2)
nua(): refresh subscribe after 2696 seconds (in [900..2700])
nua_callback> nua_i_notify status 200 OK
nua(): refresh subscribe after 2696 seconds
nta: timer set next to 2822 ms
nta: timer K fired, terminate REGISTER (102970695)
outgoing_reclaim_all(00000000, 00000000, 002DF918)
nta_outgoing_timer: 0/0 resent, 0/0 tout, 1/2 term, 1/2 free
nta: timer set next to 1748 ms
nua(00EEDD80): sent signal r_subscribe
soa_set_params(static::00DA29A0, ...) called
nta: selecting scheme sip
tport_tsend(00EE9610) tpn = */163.162.159.160:5060
tport_resolve addrinfo = 163.162.159.160:5060
tport(00EE9610): not found by name */163.162.159.160:5060
tport_vsend returned 661
nta: sent SUBSCRIBE (102970697) to */163.162.159.160:5060
tport_pend(00EE9610): pending 00EEF980 for udp/163.162.233.17:7191 (already 0)
nta: timer shortened to 500 ms
tport_wakeup_pri(00EE9610): events IN
tport_recv_event(00EE9610)
tport(00EE9610) msg 00DA8B88 from (udp/163.162.233.17:7191) has 367 bytes, 
veclen = 1
tport(00EE9610): msg 00DA8B88 (367 bytes) from udp/163.162.159.160:7191/sip 
next=00000000
nta: received 200 OK for SUBSCRIBE (102970697)
nta: 200 OK is going to a transaction
nta_outgoing: RTT is 79.105 ms
tport(00EE9610): 00EEF980 by 00DA27C0 with 00DA8B88
nua_callback> nua_r_subscribe status 200 OK
nua(00EEDD80): removing subscribe usage with event presence.winfo
nta_leg_destroy(00DA3290)
tport_wakeup_pri(00EE9610): events IN
tport_recv_event(00EE9610)
tport(00EE9610) msg 00DA3290 from (udp/163.162.233.17:7191) has 871 bytes, 
veclen = 1
tport(00EE9610): msg 00DA3290 (871 bytes) from udp/163.162.159.160:7191/sip 
next=00000000
nta: received NOTIFY sip:163.162.233.17:7191 SIP/2.0 (CSeq 3)
nta: canonizing sip:163.162.233.17:7191 with contact
nta: NOTIFY (3) going to a default leg
tport_tsend(00EE9610) tpn = UDP/163.162.159.160:5062
tport_resolve addrinfo = 163.162.159.160:5062
tport(00EE9610): not found by name UDP/163.162.159.160:5062
tport_vsend returned 485
nta: sent 481 Call Does Not Exist for NOTIFY (3)
nta: timer set next to 578 ms
nta: timer K fired, terminate SUBSCRIBE (102970696)
outgoing_reclaim_all(00000000, 00000000, 002DF918)
nta_outgoing_timer: 0/0 resent, 0/0 tout, 1/2 term, 1/2 free
nta: timer set next to 3973 ms
nua(00EEDB58): sent signal r_unregister
soa_set_params(static::00EEE188, ...) called
nua(00EEDB58): adding already existing register usage
nta: selecting scheme sip
tport_tsend(00EE9610) tpn = udp/163.162.159.160:5060/sip
tport_resolve addrinfo = 163.162.159.160:5060
tport(00EE9610): not found by name udp/163.162.159.160:5060/sip
tport_vsend returned 518
nta: sent REGISTER (102970696) to udp/163.162.159.160:5060/sip
tport_pend(00EE9610): pending 00DA38F0 for udp/163.162.233.17:7191 (already 0)
nta: timer shortened to 500 ms
nta: timer E fired, retransmit REGISTER (102970696)
tport_tsend(00EE9610) tpn = udp/163.162.159.160:5060/sip
tport_resolve addrinfo = 163.162.159.160:5060
tport(00EE9610): not found by name udp/163.162.159.160:5060/sip
tport_vsend returned 518
nta: resent REGISTER (102970696) to udp/163.162.159.160:5060/sip
tport(00EE9610): 00DA38F0 by 00DAA6A0 with 00000000
tport_pend(00EE9610): pending 00DA38F0 for udp/163.162.233.17:7191 (already 0)
nta_outgoing_timer: 1/1 resent, 0/1 tout, 0/1 term, 0/2 free
nta: timer set next to 1000 ms
tport_wakeup_pri(00EE9610): events IN
tport_recv_event(00EE9610)
tport(00EE9610) msg 00DAAD80 from (udp/163.162.233.17:7191) has 300 bytes, 
veclen = 1
tport(00EE9610): msg 00DAAD80 (300 bytes) from udp/163.162.159.160:7191/sip 
next=00000000
nta: received 200 OK for REGISTER (102970696)
nta: 200 OK is going to a transaction
nta_outgoing: RTT is 562.521 ms
tport(00EE9610): 00DA38F0 by 00DAA6A0 with 00DAAD80
nua(00EEDB58): removing register usage
nua_callback> nua_r_unregister status 200 OK
nta_leg_destroy(00EEEA60)
nta: timer set next to 1545 ms
nua(00EEDB58): sent signal r_destroy
nua(00EEDD80): sent signal r_destroy
nua(00000000): sent signal r_shutdown
nta_leg_destroy(00000000)
soa_destroy(static::00EEE188) called
nta_leg_destroy(00000000)
soa_destroy(static::00DA29A0) called
soa_destroy(static::00EE7030) called
nta: incoming_free(00DA6F28)
nta: incoming_free(00DA9110)
nta: outgoing_free(00DA27C0)
nta: outgoing_free(00DAA6A0)
sres_sofia_update(00EE8508, -1, -1)
sres_sofia_update(00000000, -1, -1)
tport(00EE91E0)
nua_callback> nua_r_shutdown status 200 Shutdown successful
su_wsevent_port_deinit(00EE22E0) called
su_wsevent_port_deinit(00EE4F00) called
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to