sip show HANGUP???

mlewis
Posts: 192
Member Since:
2006-12-18

I've been looking, honestly, for days on this one!
How in the world do you hang up a peer so that you can watch it reconnecting for test purposes? I've tried everything I can find including trying various things from the command line with no luck.

When looking at the list of peer connections, I need to hangup a user so that we can watch the connection from the firewall to the trixbox. How can I hang someone up?

Thanks.

Mike



mlewis
Posts: 192
Member Since:
2006-12-18
Anyone?

Anyone?



SkykingOH
Posts: 9538
Member Since:
2007-12-17
Do you want to hangup an

Do you want to hangup an active call or force the extension to reregister?

--

Scott

aka "Skyking"



necits
Posts: 419
Member Since:
2008-02-23
This might not be the

This might not be the easiest or best way but... Connect to the Asterisk Manager Interface (AMI) by telneting to port 5038 on your local trixbox.
You should get Asterisk Call Manager/1.0 if you connect correctly.

Next type this to authenticate to the manager so you can issue commands:

Action: login
Username: Whatever username you have in /etc/asterisk/manager.conf  most likely admin
Secret: Whatever secret you have in /etc/asterisk/manager.conf  
Events: off

OK Here's The tricky part.

After you are done typing the last command hit enter to go to the next line. Then hit enter twice. This CR+LF will submit the code to the AMI.
You should get a message such as:

Response: Success
Message: Authentication accepted

You can now enter commands. First get the status of the channels so we know which ones to drop.

Action: Status

You should get something like this-

Response: Success
Message: Channel status will follow

Event: Status
Privilege: Call
Channel: SIP/211-b7d01498
CallerID: 211
CallerIDNum: 211
CallerIDName: <unknown>
Account:
State: Up
Link: SIP/212-08861838
Uniqueid: 1228372630.18

Event: Status
Privilege: Call
Channel: SIP/212-08861838
CallerID: 212
CallerIDNum: 212
CallerIDName: Larry Shmutz
Account:
State: Up
Context: macro-dial
Extension: s
Priority: 7
Seconds: 11
Link: SIP/211-b7d01498
Uniqueid: 1228372630.17

Event: StatusComplete

Note: The call must be active or nothing will show up.
Make note of the channel of the extension you want to drop.
The following commands will hangup the channel- Extension 212 in this case.

Action: Hangup
Channel: SIP/212-08861838

This should hang up the channel.

--

Michael Mathewson CCNA,MCSE
Owner/Consultant
Northeast CT IT Solutions



mlewis
Posts: 192
Member Since:
2006-12-18
Either would be good to know

Either would be good to know but force the extension to disconnect and re-register again is what I badly need right now so that we can trouble shoot incoming connections.

Mike



mlewis
Posts: 192
Member Since:
2006-12-18
I'm surprised at how

I'm surprised at how complicated this appears to be. I would have thought a simple CLI command while in asterisk to hangup a user. I'll take a closer look at this and thanks very much for the input.

Mike



apohl
Posts: 16
Member Since:
2006-09-14
soft hangup

If all you want to do is hang up a call that is in progress I believe the command is soft hangup (Channel in use). I believe if you just type soft hangup and hit the tab key in the asterisk cli it will display to you a list of all active channels and then you can enter the channel you want to hang up.



mlewis
Posts: 192
Member Since:
2006-12-18
Nope, tab doesn't do it.

Nope, tab doesn't do it.



SkykingOH
Posts: 9538
Member Since:
2007-12-17
Tab does work if a call is

Tab does work if a call is in progress. Are you trying from a shell session or using one of the web based utilities? You have to have a real shell session for this to work (ssh -l root from a linux box or putty from Windows).

When you use the term hangup we assume an active call. Forcing a phone to re-register is more difficult. The phone will register at whatever interval it is programmed.

Scott

--

Scott

aka "Skyking"



mlewis
Posts: 192
Member Since:
2006-12-18
Right, it's actually needing

Right, it's actually needing to have it re-register. In other words, in this example, the phone has authentication, I can see the IP in the peer list from the CLI, but the person is not on port 5060 so can't make calls.
I need to be able to force that user to re-register so that I can watch the tcp traffic to see what's wrong.

Mike



cbrickner
Posts: 188
Member Since:
2008-07-18
Honestly in the CLI the only

Honestly in the CLI the only way I believe is to run sip reload

--

Charles Brickner
trixbox CE Support Engineer

trixbox.org/support



mlewis
Posts: 192
Member Since:
2006-12-18
Which reloads everything

Which reloads everything right? I'm surprised there isn't a command to do that?



necits
Posts: 419
Member Since:
2008-02-23
This may be a very dumb

This may be a very dumb question but what would happen if you disconnected the ethernet cable and reconnected while the call was active. Would that force a re-register?

--

Michael Mathewson CCNA,MCSE
Owner/Consultant
Northeast CT IT Solutions



mlewis
Posts: 192
Member Since:
2006-12-18
The phone is remote and

The phone is remote and there isn't anyone there to test at times is why I need this. I can't unplug anything.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.