login | register
Tue 02 of Dec, 2008 [02:41 UTC]

voip-info.org

History

Asterisk cmd PPPD

Created by: sirrix,Last modification on Thu 17 of Jul, 2008 [19:04 UTC] by JustRumours

Synopsis

The PPPD command is for use with arbitrary digital (ISDN) connections. It provides RAS connection by using the (external) pppd program to permit you to use digital (ISDN) Asterisk channels as data channels to give you a PPP data link (perhaps an Internet connection). This command is not for use with analog lines; it does not provide a modem emulator. The PPPD application provides HDLC for using (only!) synchronous PPP.

The PPPD application has successfully been tested on Sirrix ISDN channels but may work on any other digital (ISDN) Asterisk channel as well.

Description

PPPD(path_to_pppd and_additonal_arguments)

Executes a RAS server using pppd on the calling channel. Your pppd must support synchronous mode. Give the path to pppd (usually /usr/sbin/pppd) and additonal parameters (like "call isdn") as parameter.

Starting points

  • PPP support in Kernel needed (included in standard Debian kernels)
  • Standard pppd is needed (no aditional patches needed; standard Debian ppp package works)
  • Download, compile and install the PPPD package with

wget http://www.sirrix.de/download/app_pppd-060822.tgz
tar xvfz app_pppd-060822.tgz
cd app_pppd
make clean
make dep
make
make install


  • Create a "peer"-file in /etc/ppp/peers. Example:

## local and remote IP
192.168.99.1:192.168.99.2

## enable to see some debugging messages
#debug

## we need the sync option
sync

## we want PAP (we present ourself as dial-in server)
+pap

## we don't need to authenticate ourself
## as we present ourself as dial-in server
noauth


  • Add user and password to /etc/ppp/pap-secrets:

myusername     *     userpassword     *


  • See pppd manual page (man 8 pppd) for more details about configuring the PP daemon.

Once you have pppd installed, and you have the ppp support in your kernel, you are ready for the configuring your Dialplan. Here is the entry I used to get started with:


exten => 4711,1,Answer
exten => 4711,2,PPPD(/usr/sbin/pppd call isdn)
exten => 4711,3,Hangup



PPPD allows you to provide additional pppd arguments in the command argument. The line above will tell PPPD to use the "isdn"-peer configuration file in /etc/ppp/peers. You will want to figure out what pppd flags will work best for your installation.

The external PPP daemon is connected to the calling channel by using a PTY (/dev/pts/*) that is automatically allocated and freed by the PPPD application. The name of the device file is passed as additonal last parameter to the external PPP daemon.

Download


Notes

  • The PPPD application has successfully been tested on Sirrix ISDN channels but may work on any other digital (ISDN) Asterisk channel as well.
  • The PPPD application has successfully been tested to connect to a standard ISDN4Linux installation (ipppd).
  • The PPPD application has successfully been tested to connect to a standard CAPI channel installation, to provide internet or private connection. Be aware though that due to lack of documentation I wasn't able to hangup the channel manually (after the connection was up). Maybe through an exec dialplan directive in order to kill the PPPD process.

See Also



Asterisk | Configuration | The Dialplan - extensions.conf | Dialplan Commands

Comments

Comments Filter
222

333PPPD from Asterisk

by dziamajka, Tuesday 24 of June, 2008 [11:32:24 UTC]
I have Asterisk 1.2.18 with app_pppd_060822 and pppd on Ubuntu 7.10.
I would like to connect from one asterisk to another asterisk by BRI using PSTN Switch.
In all materials and examples are information only how to answer connection and setup pppd on asterisk It is possible to connect two asterisk by ppp? I managed to connect from router with bri interface to asterisk using app_pppd and standard ppp demon in linux. I need to initialize ppp from asterisk. Please help me.

222

333Re: PPPD & Analog dialup

by joepinedo, Friday 04 of January, 2008 [20:28:32 UTC]
Hello,

can we provide dialup access for ANALOG calls incoming to Asterisk ??



222

333PPPD and Asterisk 1.4.x

by AdamP, Monday 30 of April, 2007 [15:22:48 UTC]
~/app_pppd# make
gcc -c -g -Wall -O -D_ISOC99_SOURCE -D_GNU_SOURCE -I/usr/include -o app_pppd.o app_pppd.c
app_pppd.c:45:2: warning: #warning ASTERISK_NEW_MODULE_INTERFACE defined
app_pppd.c:61: warning: type defaults to `int' in declaration of `LOCAL_USER_DECL'
app_pppd.c:61: warning: data definition has no type or storage class
app_pppd.c: In function `app_pppd_exec':
app_pppd.c:769: warning: implicit declaration of function `LOCAL_USER_ADD'
app_pppd.c:801: warning: implicit declaration of function `LOCAL_USER_REMOVE'
app_pppd.c:728: warning: `u' might be used uninitialized in this function
app_pppd.c: In function `unload_module':
app_pppd.c:828: error: `STANDARD_HANGUP_LOCALUSERS' undeclared (first use in this function)
app_pppd.c:828: error: (Each undeclared identifier is reported only once
app_pppd.c:828: error: for each function it appears in.)
app_pppd.c: At top level:
app_pppd.c:827: warning: `unload_module' defined but not used
app_pppd.c:840: warning: `load_module' defined but not used
app_pppd.c:848: warning: `description' defined but not used
app_pppd.c:861: warning: `key' defined but not used
make: *** app_pppd.o Error 1

It is version for Asterisk 1.4.x?
222

333PPPD & Analog dialup

by vhatz, Friday 25 of August, 2006 [08:03:53 UTC]
Hello,

We read in the description that PPPD "is for use with arbitrary digital (ISDN) connections". If we use an ISDN EICON Diva Server card with Voice modems can we provide dialup access for ANALOG calls incoming to Asterisk or are we limited to providing access only for ISDN calls?
222

333PPPD vs ZAPRAS

by tam, Friday 18 of November, 2005 [15:41:46 UTC]
ZapRas tries to set up the device so seems more applicable for tx or a server push type application, whereas PPPD seems more like a rx server as it will not grab the device. PPPD worked for me! ZapRas was tied to stdin and did not work even after I kludged it around a bit.
222

333Dialout Configuration

by , Wednesday 09 of February, 2005 [12:42:42 UTC]
Anybody have an example for dialing into an ISP for example?
222

333PPPD vs ZAPRAS

by , Wednesday 02 of February, 2005 [22:53:10 UTC]
Can someone explain how this is different than zapras? Does this just give the Zap Ras capability over other hardware interfaces..and channels?