[asterisk-users] Check if SIP is avaible to dial

Atis Lezdins atis at iq-labs.net
Fri Nov 23 09:06:32 CST 2007


On 11/23/07, Jakub Syrek <arkon at nast.pl> wrote:
> Well it's not working as it should. Every call go to Dail(SIP/sip1) and if
> no one respond then to the next one :(

You should post a log then. Also CLI command "group show channels"
could be usable.

And please don't top-post.

Regards,
Atis

> > Jakub Syrek wrote:
> >> I thing there was an error in last version of my macro, correct one (i
> >> hope):
> >
> > Just test it :)
> >
> >>
> >> [macro-call]
> >> ;sip1 - firs channel from sip outgoing cals operator
> >> ;sip2 - second channel from sip outgoing cals operator
> >> ;sipn - N channel from sip outgoing cals operator
> >> ;ARG1 - outgoing telephone number
> >> exten => s,1,SetGroup(${ARG1})
> >> exten => s,2,GotoIf($[ ${GROUP_COUNT(${ARG1})} < 2 ]?dial-ok)
> >
> > I don't really get why you have this. Why set group count on called
> > number? You won't be able to call the same number two calls at time, you
> > really want that? There are lot of numbers, that can accept unlimited
> > amount of calls simultaneously.
> >
> >>
> >> ;outgoing number was called previously by someone else?
> >> exten => s,n,NoOp(-- Call destination was previously called and its
> >> busy --)
> >> exten => s,n,Hangup
> >>
> >> ;we can dial
> >> ;now chack witch chanel is free to meake a call with
> >> exten => s,n(dial-ok),SetGroup(sip1)
> >> exten => s,n,GotoIf($[ ${GROUP_COUNT(sip1)} > 1 ]?sip1-busy)
> >> exten => s,n,Dial(SIP/sip1/${ARG1},25,m)
> >> exten => s,n,Hangup
> >
> > You should set group after checking that trunk is available. Once group
> > on channel is set, it's not automatically removed, it remains set until
> > channel is alive (or you manually unset - i just don't remember the
> > syntax).
> >
> >>
> >> exten => s,n(sip1-busy),SetGroup(sip2)
> >> exten => s,n,GotoIf($[ ${GROUP_COUNT(sip2)} > 1 ]?sip2-busy)
> >> exten => s,n,Dial(SIP/sip2/${ARG1},25,m)
> >> exten => s,n,Hangup
> >>
> >> ;and so on to last one
> >>
> >> exten => s,n(sipN-busy),SetGroup(sipn)
> >> exten => s,n,GotoIf($[ ${GROUP_COUNT(sipn)} > 1 ]?all-busy)
> >> exten => s,n,Dial(SIP/sip2/${ARG1},25,m)
> >> exten => s,n,Hangup
> >>
> >> ;every channel is busy
> >> exten => s,n(all-busy),Hangup
> >
> > Regards,
> > Atis
> >
> > _______________________________________________
> > --Bandwidth and Colocation Provided by http://www.api-digital.com--
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >   http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>


-- 
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835



More information about the asterisk-users mailing list