Re: Placing an outgoing call on an available trunk.

Etoile Dièse <[email protected]>
Newsgroups gmane.comp.gnu.bayonne.devel
Organization EtoileDièse
Message-ID <opsp7vv0eqe33d8r@m6bn>
Le Tue, 03 May 2005 11:47:37 +1000, Lachlan Ross  
<[email protected]> a écrit:

> Hi Everyone,
>
> When using Bayonne to dial out, must you specify the trunk that the call
> goes out on?
> ie:
> bayonne --control start 1 myScript
>
> This sends the call out on trunk 1.  What happens if trunk 1 already has
> a call on it?
> Can you some how place an outgoing call and have it just find an
> available trunk?
>
> Thanks for any ideas.
>
> Lachlan
>

I have the same problem.
Maybe, something like "bayonne --control start.group TrunkName myScript"  
could work ?
(as one can do in CCscript).
I haven't tested this yet.

Right now, I use the following script :

etat="`/usr/local/sbin/bayonne --status | /usr/bin/tail -1 | /bin/sed -e  
"s/  */ /g" | /bin/cut -d' ' -f4`"
nombre=`echo -n $etat | /usr/bin/wc -c`
for i in `/usr/bin/seq 1 $nombre`
do
         if test "`echo -n $etat | /bin/cut -c${i}-${i}`" = "-"
         then
                 echo "start `expr $i - 1` myScript" >>  
/var/run/bayonne/bayonne.ctrl
		    exit
	  fi
done

It works well at 99,99 %.
Sometimes, a port get occupied between the "status" and the start...

Other suggestions are welcome...

FdR/ED


-- 
Etoile Dièse - www.etoilediese.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.