[asterisk-users] How to Dial a number with Sangoma PRI card?

Mario mgnospam at fgasoftware.com
Tue Sep 19 03:17:07 MST 2006


ysuf,

that's exactly what I'm doing (in Python instead of PHP, but that 
doesn't matter). However, my question is: should I ask if ZAP/1 is 
available or if  ZAP/1-1 is available? For example:

    ChanIsAvail(Zap/1&Zap/2&Zap/3)

or

    ChanIsAvail(Zap/1-1&Zap/1-2&Zap/1-3)

And, once discovered which channel is available, which form of Dial 
should I use? Should I say:

    Dial(Zap/2/1234)

or

    Dial(Zap/1-2/1234)

yusuf wrote:
> hi,
>
> I did it like this:
> I wrote a PHP AGI script, that I call from the dial plan.
> In the AGI I check
>
>  fwrite(STDOUT,"CHANNEL STATUS $currchan \n");
>         fflush(STDOUT);
>
> where currchan is ZAP/1 for instance.  It returns whether the channel 
> is used.  I then pass this back as a variable back to dial plan, and I 
> use that variable to dial.
>
> HTH
>
> Mario wrote:
>> That's ok if I want to dial through a group. But, for my specific 
>> requirements, I need to dial through a specific channel. I even need 
>> to use the ChanIsAvail application to discover which channels are 
>> available.
>>
>> Thus, without using a group, which is the correct way to dial through 
>> a PRI?
>>
>>
>> Lacy Moore - Aspendora wrote:
>>
>>> I dial using groups.  Dial(Zap/g1/1234)
>>>  
>>> I'm pretty sure this was taken off of the examples on the Sangoma 
>>> website.
>>>  
>>>  
>>> On 9/19/06, *Mario* <mgnospam at fgasoftware.com 
>>> <mailto:mgnospam at fgasoftware.com>> wrote:
>>>
>>>     I have a Sangoma PRI card configured for E1 line (i.e. 30+1
>>>     channels per
>>>     port) and I'm not quite sure on how the Dial command should
>>>     performed.
>>>
>>>     I'm using the standard Dial command as if it were a Zap channel.
>>>     For example
>>>
>>>        Dial(Zap/1/1234) ; Dial 1234 using channel 1 on port 1
>>>        Dial(Zap/32/1234) ; Dial 1234 using channel 1 on port 2 (i.e. 
>>> 32nd
>>>     zapata entry)
>>>
>>>     Most often than not this works, but sometimes the call fails. 
>>> However,
>>>     reading the Asterisk docs, it says that to dial using a PRI card I
>>>     should use, instead, the following command:
>>>
>>>        Dial(Zap/1-1/1234) ; Dial using channel 1 on port 1
>>>        Dial(Zap/2-1/1234) ; Dial using channel 1 on port 2
>>>
>>>     Which one is correct? Should I dial Zap/32 or Zap/2-1 to go
>>>     through the
>>>     1st channel on port 2?
>>>
>>>     I'm scared of changing my whole dial plan and then discover that,
>>>     occasionally, things do not work as expected.
>>>
>>>     Please, can someone who has used Sangoma PRI card help me? My
>>>     Zapata.conf is set as if we had 60+ channels (something similar to
>>>     this):
>>>
>>>        context = my_context
>>>        group = 1
>>>        [snip...]
>>>        signalling = pri_cpe
>>>        switchtype = euroisdn
>>>        channel => 1-15, 17-31 ; Same, up to channel 62
>>>
>>>     Thanks in advance.
>>>     _______________________________________________
>>>     --Bandwidth and Colocation provided by Easynews.com
>>>     <http://Easynews.com> --
>>>
>>>     asterisk-users mailing list
>>>     To UNSUBSCRIBE or update options visit:
>>>        http://lists.digium.com/mailman/listinfo/asterisk-users
>>>
>>>
>>>
>>>
>>> -- 
>>> Lacy Moore
>>> Aspendora, Inc. 
>>
>>
>> _______________________________________________
>> --Bandwidth and Colocation provided by Easynews.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>



More information about the asterisk-users mailing list