Share

RP-L2TP

Tracker: Patches

5 Record calling numbers into environment - ID: 1599475
Last Update: Settings changed ( don_stokes )

Two patches. The first has l2tpd pass the calling number (if supplied)
from the calling number AVP into l2tp_session_lns_handle_incoming_call()'s
calling number parameter (as suggested by the "TODO" comment before said
call).

The second is a patch to the sync-pppd handler which places the calling
number and the peer host name into the environment variables
L2TP_CALLING_NUM and
L2TP_PEER_HOSTNAME respectively.

Note that the Linux /usr/sbin/pppd clobbers the environment before calling
any of its scripts such as ip-up, so you need to get at the environment
before pppd gets its hands on it. Do this by having l2tpd call a script
which in turn calls pppd, e.g. in /etc/l2tp/l2tp.conf:

section sync-pppd
pppd-path "/etc/l2tp/pppd-wrapper"

then have /etc/l2tp/pppd-wrapper do something like:

#!/bin/sh
exec /usr/sbin/pppd "$@" ipparam "$L2TP_CALLING_NUM"

This will cause pppd to pass the calling number to /etc/ppp/ip-up as $6.


Don Stokes ( don_stokes ) - 2006-11-20 04:28

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached Files ( 2 )

Filename Description Download
rp-l2tp-0.4-record-calling-number.diff Record calling number Download
rp-l2tp-0.4-environment.diff Add calling number and peer name to environment Download

Changes ( 4 )

Field Old Value Date By
summary Record calling numbers into environmet 2006-11-20 04:33 don_stokes
summary Record calling numbers 2006-11-20 04:33 don_stokes
File Added 203551: rp-l2tp-0.4-environment.diff 2006-11-20 04:32 don_stokes
File Added 203550: rp-l2tp-0.4-record-calling-number.diff 2006-11-20 04:31 don_stokes