[asterisk-users] identifying channel for softhangup

Steve Edwards asterisk.org at sedwards.com
Tue Dec 29 15:00:24 CST 2009


Un-top-posting...

> On 12/29/2009 1:01 AM, Jeremy Kister wrote:

>> e.g., in the first call, below, the channel name is "SIP/vgw1-00000075" 
>> -- the second call (on the same FXO port after a soft hangup on the 
>> CLI) is "SIP/vgw1-00000077"
>>
>> How can I extract this information in the dialplan so that I can use 
>> the SoftHangup app in asterisk to disrupt an existing call ?
>
> can anyone think of a different mailing list which might have members 
> who know the answer i'm looking for?  asterisk-dev ?

On Tue, 29 Dec 2009, Danny Nicholas wrote:

> ${EXTEN} in the case you state would be SIP/vgw1-00000075.

I think you meant ${CHANNEL}.

> Perhaps this link would be helpful 
> http://www.voip-info.org/wiki/view/Asterisk+Detailed+Variable+List

I'm trying to think what it is that you are trying to accomplish (and 
why).

I'm guessing it's something like "My ISP only allows 1 call so if there is 
a call already in progress, I want to terminate the other call so I can 
place my call."

I'm thinking along the lines of:

 	exten = *,n,	softhangup(${CHANNEL-USING-MY-ISP})
 	exten = *,n,	setglobalvar(CHANNEL-USING-MY-ISP=${CHANNEL})
 	exten = *,n,	dial(...)

Softhangup() doesn't object to using an invalid string, so you don't need 
to check the global variable before using.

Unless you want to get into a "pissing match" with your other user, you'll 
probably want to add some more code so they can't blow you off.

You may find pages on voip-info.org relating to gotoif and execif useful.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list