Asterisk Wholesale Service

از ویکی پارس پویش
(تفاوت بین نسخه‌ها)
پرش به: ناوبری, جستجو
(صفحه‌ای جدید حاوی 'Category:VoIP <div dir=ltr lang=en> This service is designed for wholesale providers. Main steps to install this service are: * Integratin...' ایجاد کرد)
 
 
(۳ ویرایش میانی توسط ۲ کاربر نشان داده نشده‌است)
سطر ۱: سطر ۱:
 
[[Category:VoIP]]
 
[[Category:VoIP]]
 +
<div dir=rtl lang=en>
 +
__TOC__
 +
</div>
 
<div dir=ltr lang=en>
 
<div dir=ltr lang=en>
 
This service is designed for wholesale providers.
 
This service is designed for wholesale providers.
سطر ۹: سطر ۱۲:
 
* Configuring asterisk to route calls using IBSng routing profile
 
* Configuring asterisk to route calls using IBSng routing profile
 
* Defining customer's user in IBSng
 
* Defining customer's user in IBSng
<br>
 
 
== Integrating Asterisk and IBSng ==
 
== Integrating Asterisk and IBSng ==
 
You can find the document [[Asterisk_and_IBSng_Integration|here]].
 
You can find the document [[Asterisk_and_IBSng_Integration|here]].
سطر ۱۵: سطر ۱۷:
 
== AGI files setting ==
 
== AGI files setting ==
  
Make the path "/var/lib/asterisk/agi-bin" and copy dial directory from IBSng addons there:
+
Make the path "/var/lib/asterisk/agi-bin" :
 
  # mkdir /var/lib/asterisk/agi-bin/
 
  # mkdir /var/lib/asterisk/agi-bin/
 +
 +
If you use AGI file
 +
copy dial directory from IBSng addons there
 +
 
  # cp -r /usr/local/IBSng/addons/asterisk/dial /var/lib/asterisk/agi-bin/
 
  # cp -r /usr/local/IBSng/addons/asterisk/dial /var/lib/asterisk/agi-bin/
 +
 +
And if you use FastAGI
 +
copy dial directory from Pars Pooyesh Server , /home/ISP
 +
# scp /home/ISP/VOIP/asterisk/Fastagi/dial.tar.gz  root@ ip asterisk:/var/lib/asterisk/agi-bin/
 +
After transfer files check in asterisk server
 +
# cd /var/lib/asterisk/agi-bin/
 +
And extract files, there
 +
# tar -zxvf dial.tar.gz
 +
  
 
Create a link from "/var/lib/asterisk/agi-bin" to "/usr/share/asterisk/agi-bin":
 
Create a link from "/var/lib/asterisk/agi-bin" to "/usr/share/asterisk/agi-bin":
  
  # ln -s /var/lib/asterisk/agi-bin /usr/share/asterisk/agi-bin
+
  # ln -s /var/lib/asterisk/agi-bin /usr/share/asterisk/
  
 
==== What does dial directory do? ====
 
==== What does dial directory do? ====
 
Actually, Dial directory is a python module. It includes an configuration file, defs.py, that we should set some fields in it based on the service we want to use.
 
Actually, Dial directory is a python module. It includes an configuration file, defs.py, that we should set some fields in it based on the service we want to use.
  
==== Editing defs.py ====
+
==== Editing ibs_agi.py ====
 
For Wholesale Service, we should edit the following fields:
 
For Wholesale Service, we should edit the following fields:
  
سطر ۴۲: سطر ۵۷:
 
  switch => Realtime/ibs_users
 
  switch => Realtime/ibs_users
 
<br>
 
<br>
 +
====Editing sip.conf====
 +
Edit "/etc/asterisk/sip.conf" and append these contexts:
 +
  [general]
 +
  context=incoming
 +
  allow=g729
 +
  allow=ulaw
 +
  dtmfmode = rfc2833
 +
====Edit Manager.conf====
 +
Edit "/etc/asterisk/manager.conf":
 +
[asterisk]
 +
secret=asterisk 
 +
deny=0.0.0.0/0.0.0.0 
 +
permit=127.0.0.1/255.255.255.255
 +
permit=<IBSng Ip Address>/255.255.255.255
 +
read = system,call,log,verbose,command,agent,user,config,originate,all
 +
write = system,call,log,verbose,command,agent,user,config,originate,all
 
====Important Note:====
 
====Important Note:====
If you use Asterisk 1.6.x, you should set "AGI" instead of "DeadAGI"
+
1-If you use Asterisk 1.6.x, you should set "AGI" instead of "DeadAGI"
 
<br>
 
<br>
 
+
2- Run this command manually and put it in rc.local
 +
screen -d -m python /usr/share/asterisk/agi-bin/dial/ibs_agi_starter.py
 
=== Restart Asterisk ===
 
=== Restart Asterisk ===
  

نسخهٔ کنونی تا ‏۱۶ ژانویهٔ ۲۰۱۳، ساعت ۱۲:۲۹

محتویات

This service is designed for wholesale providers.

Main steps to install this service are:

  • Integrating Asterisk and IBSng
  • To copy AGI files in appropriate path
  • Configuring asterisk to route calls using IBSng routing profile
  • Defining customer's user in IBSng

[ویرایش] Integrating Asterisk and IBSng

You can find the document here.

[ویرایش] AGI files setting

Make the path "/var/lib/asterisk/agi-bin"  :

# mkdir /var/lib/asterisk/agi-bin/

If you use AGI file copy dial directory from IBSng addons there

# cp -r /usr/local/IBSng/addons/asterisk/dial /var/lib/asterisk/agi-bin/

And if you use FastAGI copy dial directory from Pars Pooyesh Server , /home/ISP

# scp /home/ISP/VOIP/asterisk/Fastagi/dial.tar.gz  root@ ip asterisk:/var/lib/asterisk/agi-bin/

After transfer files check in asterisk server

# cd /var/lib/asterisk/agi-bin/

And extract files, there

# tar -zxvf dial.tar.gz


Create a link from "/var/lib/asterisk/agi-bin" to "/usr/share/asterisk/agi-bin":

# ln -s /var/lib/asterisk/agi-bin /usr/share/asterisk/

[ویرایش] What does dial directory do?

Actually, Dial directory is a python module. It includes an configuration file, defs.py, that we should set some fields in it based on the service we want to use.

[ویرایش] Editing ibs_agi.py

For Wholesale Service, we should edit the following fields:


IBSNG_SERVER=("IBSng IP Address",1235)

[ویرایش] Config Asterisk to establish calls, collaborating with IBSng

Edit "/etc/asterisk/extensions.conf" and append these contexts:

[incoming]
exten => _XXXXXXX.*,1,DeadAGI(dial/ibs_agi_starter.py|SIP/${EXTEN})
include => ibs_users
[ibs_users] switch => Realtime/ibs_users


[ویرایش] Editing sip.conf

Edit "/etc/asterisk/sip.conf" and append these contexts:

 [general]
 context=incoming
 allow=g729
 allow=ulaw
 dtmfmode = rfc2833

[ویرایش] Edit Manager.conf

Edit "/etc/asterisk/manager.conf":

[asterisk]
secret=asterisk  
deny=0.0.0.0/0.0.0.0  
permit=127.0.0.1/255.255.255.255
permit=<IBSng Ip Address>/255.255.255.255
read = system,call,log,verbose,command,agent,user,config,originate,all
write = system,call,log,verbose,command,agent,user,config,originate,all 

[ویرایش] Important Note:

1-If you use Asterisk 1.6.x, you should set "AGI" instead of "DeadAGI"
2- Run this command manually and put it in rc.local

screen -d -m python /usr/share/asterisk/agi-bin/dial/ibs_agi_starter.py

[ویرایش] Restart Asterisk

Finally you have to restart Asterisk service to apply the changes.


LOG_FILE="/var/log/asterisk/ibs_dial_agi.log"
ابزارهای شخصی

گویش‌ها
فضاهای نام
عملکردها
گشتن
جعبه‌ابزار