Busy line detection problem

Hi to all,

My problem is, how to find whether line busy or not. I already write down a code but its not detect the busy line.

My extensions.conf are as follows

[quote]exten => 1278,1,GotoIf($["${DIALSTATUS}" = “BUSY”]?5:2)
exten => 1278,2,Set(MYEXT=${EXTEN})
exten => 1278,3,AGI(My.php)
exten => 1278,4,Hangup()
exten => 1278,5,Busy
exten => 1278,6,Hangup()[/quote]

When I establish a call from two different softphone on two different machine in second of difference between two calls, it’s does not detect the line is busy. It’s jump to priority 2, in both softphone call.

So, My simple question is why it’s doesnot detect whether line is busy or not?

Regards,
Deepen

Hi to all,

Change in my previous question. If possible then please share your valuable knowledge.

My problem is, how to find whether line busy or not. I already write down a code but its not detect the busy line. My extensions.conf are as follows

[quote]exten => 1278,1,GotoIf($["${DIALSTATUS}" = “BUSY”]?5:2)
exten => 1278,2,Set(MYEXT=${EXTEN})
exten => 1278,3,AGI(My.php)
exten => 1278,4,Hangup()
exten => 1278,5,Busy
exten => 1278,6,Hangup()[/quote]

When I establish a call from two different analog phone [color=red]it’s does not detect the line is busy. It’s simply gives an engage tone.[/color]

So, My simple question is why it’s doesn’t detect whether line is busy or not?

Regards,
Deepen

Hi
The dialstatus varible is the varible that is defined when a call has ended.

Have a look back a week or so in the forum and you will find a very nifty script that will do what you want.

Ian

Hi Ian,

I know you are taking about following script,

[quote][context]
exten => _18XX,1,Ringing
exten => _18XX,2,AGI(busydetect.sh|${EXTEN})
exten => _18XX,3,GotoIf($["${result}" = “yes”]?5) ;If result = yes go to 5 else 4
exten => _18XX,4,Dial(SIP/${EXTEN})
exten => _18XX,5,Busy

busydetect.sh:

#!/bin/sh

if [ “/usr/sbin/asterisk -r -x "core show hints" |grep "$1" |grep -o InUse” == “InUse” ]; then
echo SET VARIABLE result yes
else
echo SET VARIABLE result no
fi [/quote]

but In this I have problem is in the following line
"/usr/sbin/asterisk -r -x "core show hints" | grep "$1" | grep -o InUse" == “InUse” ]

how should I set InUse in core show hints ? (something like that)
If u know how to write extension file for that then please let me know (detail extension file).

Thanks ans Regards,
Deepen

Hi to all,

Can any body know how to detect busy channel. If know then please tell me detail i.e. extension.conf detail.

Becasue in above script he use the “core show hints” , I also set that to some name
example:
exten => s,hint,MyHint

but after doing this the problem not solved.

  1. and that Script does not find InUse by grep command. So, is more configuration required in extensions.conf file
  2. Is there any change in zaptel-channel.conf required.

If any body does something else for finding channel busy also welcome.

Regards,
Deepen

Hi to all,

Many thanks for your reply. I saw your link for “core show hint”. and according to change my extensions.conf.

[quote][MyContext]
exten => s,hint,Zap/6-1
exten => s,1,AGI(busydetect.sh|${EXTEN})
exten => s,2,GotoIf($["${result}" = “yes”]?5)

exten => s,3,Set(MYEXT=${EXTEN})
exten => s,4,AGI(somefile.php)
exten => s,5,Hangup[/quote]

[color=red]but problem is that core show hints every time gives me state idle and not InUse. And when one call establish and I try to call again on same number it’s simply gives me an engage tone.[/color]

Can you please tell me is I required some more settings in extensions.conf or zaptel-channels.conf file.

thanks and regards,
Deepen