Lonnie,

Regarding #1, wouldn't this work:
Set(CDR(userfield)=${CHANNEL(recvip)})

to show the IP address in the userfield of the CDR report?

I currently use this method, albeit with a different variable, to log 
what DID a call came in under.

-James

On 11/29/2012 10:34 AM, Lonnie Abelbeck wrote:
> Hi Graham,
>
> I'm not aware of logging IP's via #1 or #2.
>
> My only idea would be to send an email for each incoming SIP call, add these 
> two lines in you incoming SIP call dialplan: (assuming Asterisk 1.8 or later)
>
> -- extensions.conf snippet --
> exten => s,n,Set(LOGIP=${CHANNEL(recvip)})
> exten => s,n,System(/mnt/kd/bin/ast-email-ip [email protected] ${LOGIP})
> --
> Change "[email protected]" to your email address.  Use the "ast-email-ip" script 
> below, adjust to your needs.
>
> -- /mnt/kd/bin/ast-email-ip --
> #!/bin/sh
>
> . /etc/rc.conf
>
> to_email="$1"
>
> ip_addr="$2"
>
> if [ -z "$to_email" -o -z "$ip_addr" ]; then
>    echo "ast-email-ip: missing args"
> fi
>
> echo "To: $to_email
> From: asterisk@$SMTP_DOMAIN
> Subject: Incoming Call on '$HOSTNAME' from IP: $ip_addr
>
> Incoming Call on '$HOSTNAME' from IP: $ip_addr
>
> [Generated at $(date "+%H:%M:%S on %B %d, %Y")]" | \
>    sendmail -t
> --
>
> Or, use the same idea but only append ${LOGIP} to a local file instead of an 
> email.
>
> Lonnie
>
>
> On Nov 29, 2012, at 7:56 AM, Graham S. Jarvis wrote:
>
>> Hello All,
>>
>> it's not really an Astlinux issue but does anyone know a way of including the
>> ip_addr off incoming calls
>> 1. in the cdr file (not using custom_cdr)
>> 2. in the message sent with the e-mail and voicemail file
>>
>> Any ideas?
>>
>> -Graham-
>
> ------------------------------------------------------------------------------
> Keep yourself connected to Go Parallel:
> VERIFY Test and improve your parallel project with help from experts
> and peers. http://goparallel.sourceforge.net
> _______________________________________________
> Astlinux-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/astlinux-users
>
> Donations to support AstLinux are graciously accepted via PayPal to 
> [email protected].


------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
VERIFY Test and improve your parallel project with help from experts 
and peers. http://goparallel.sourceforge.net
_______________________________________________
Astlinux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to 
[email protected].

Reply via email to