[OpenSIPS-Users] NOTIFY nat_keepalive - Bad Event

Dan Pascu dan at ag-projects.com
Fri Feb 27 14:55:39 CET 2009


On Friday 27 February 2009, Carlo Dimaggio wrote:
> Hi all,
>
> I'm using nat_traversal and the nat_keepalive function. For phones-
> compatibility I have to use the "NOTIFY" method but all my registered
> phones reply to opensips with "Bad Request / Bad Event" (with OPTIONS
> method some phones reply with "200 OK"). What I am wrong?

You did nothing wrong. Those devices do not understand a NOTIFY method 
with Event keep-alive, so they give a negative reply. In the end it 
doesn't matter, all it matters is to get back something from the device. 
The difference between OPTIONS and NOTIFY and all these effects are 
explained in the nat_traversal module README. Did you read that?

>
> Can you help me?
>
> Thanks,
> Carlo Dimaggio
>
>
>
> ---- Opensips.cfg
>
> modparam("nat_traversal", "keepalive_interval", 90)
> modparam("nat_traversal", "keepalive_method", "NOTIFY")
> modparam("nat_traversal", "keepalive_state_file", "/var/run/opensips/
> keepalive_state")
> [...]
>
> if ((method=="REGISTER" || (method=="INVITE" && !has_totag())) &&
> client_nat_test("3"))
>      {
>          nat_keepalive();
>      }
>
> ----
>
> ---- Trace with "NOTIFY"
>
> #
> U <IP_OPENSIPS>:5060 -> 10.0.8.183:5060
> NOTIFY sip:10.0.8.183:5060 SIP/2.0.
> Via: SIP/2.0/UDP <IP_OPENSIPS>:5060;branch=0.
> From: sip:keepalive@<IP_OPENSIPS>;tag=4c2a2dbf.
> To: sip:10.0.8.183:5060.
> Call-ID: 2fe80f67-6c647fe7-27@<IP_OPENSIPS>.
> CSeq: 1 NOTIFY.
> Event: keep-alive.
> Content-Length: 0.
> .
>
> #
> U 10.0.8.183:5060 -> <IP_OPENSIPS>:5060
> SIP/2.0 489 Bad Event.
> Via: SIP/2.0/UDP <IP_OPENSIPS>:5060;branch=0.
> From: sip:keepalive@<IP_OPENSIPS>;tag=4c2a2dbf.
> To: <sip:10.0.8.183:5060>;tag=224300607.
> Call-ID: 2fe80f67-6c647fe7-27@<IP_OPENSIPS>.
> CSeq: 1 NOTIFY.
> Contact: <sip:10.0.8.183:5060>.
> Server: Aastra 55i/2.3.1.26.
> Content-Length: 0.
> .
>
> -----
>
> ---- Trace with "OPTIONS"
>
> #
> U <IP_OPENSIPS>:5060 -> 10.0.8.183:5060
> OPTIONS sip:10.0.8.183:5060 SIP/2.0.
> Via: SIP/2.0/UDP <IP_OPENSIPS>:5060;branch=0.
> From: sip:keepalive@<IP_OPENSIPS>;tag=6386f398.
> To: sip:10.0.8.183:5060.
> Call-ID: 406b0979-64c6436a-27@<IP_OPENSIPS>.
> CSeq: 1 OPTIONS.
> Content-Length: 0.
> .
>
> #
> U 10.0.8.183:5060 -> <IP_OPENSIPS>:5060
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP <IP_OPENSIPS>:5060;branch=0.
> From: sip:keepalive@<IP_OPENSIPS>;tag=6386f398.
> To: <sip:10.0.8.183:5060>;tag=85691902.
> Call-ID: 406b0979-64c6436a-27@<IP_OPENSIPS>.
> CSeq: 1 OPTIONS.
> Allow:  INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE,
> PRACK, SUBSCRIBE, INFO.
> Server: Aastra 55i/2.3.1.26.
> Content-Length: 0.
> .
>
> -----
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



-- 
Dan



More information about the Users mailing list