[Asterisk-Users] SIP register and unregister events via Manager API

Holger Schurig hs4233 at mail.mn-solutions.de
Fri Jul 23 01:58:47 MST 2004


Okay, I have finished my patch. With "qualify=yes" in sip.conf it looks 
like this:

-----------------------------------------------------
# telnet 127.0.0.1 5038
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Asterisk Call Manager/1.0
Action: Login
Username: destar
Secret: secret

Response: Success
Message: Authentication accepted

Event: PeerStatus
Peer: SIP/weckhardt
PeerStatus: Registered

Event: PeerStatus
Peer: SIP/weckhardt
PeerStatus: Reachable
Time: 81

Event: PeerStatus
Peer: SIP/weckhardt
PeerStatus: Registered

Event: PeerStatus
Peer: SIP/weckhardt
PeerStatus: Unreachable
Time: -1

Event: PeerStatus
Peer: SIP/weckhardt
PeerStatus: Unregistered
Cause: Expired
-----------------------------------------------------

Without the quality, you still get the "PeerStatus: Registered" and 
"PeerStatus: Unegistered" events.


John, you can do your color-coding :-)




And while I was at this patch, I also changed the

Event: SIPRegistry
Domain: ...
Status: ...

to

Event: Register
Channel: SIP
Domain: ...
Status: ...

I don't have a register= line in my sip.conf, so I didn't see this event. 
But again I hope that this makes the event usable for other channel types 
as well.

Because I did not see the event, I am not sure if I need the "Channel: 
SIP" at all. If the Domain is actually an sip:// - URL, it would be 
superfluous.

I'll post the patch to bugs.digium.com when someone enlightens me on this 
point :-)




More information about the asterisk-users mailing list