Defining outgoing MSNs (ISDN) and channels in asterisk

| | Comments (1) | TrackBacks (0)
In case you did not know it, you can define outgoing MSNs in asterisk and misdn (Linux). It is even possible to tie a specific local telephone to another outbound channel:

[outbound]
exten => _X.,1,Set(OUTBOUNDMETHOD="mISDN/1/${EXTEN}");
exten => _X.,n,ExecIf($[ "${CALLERID(num)}" = "*1"],Set,CALLERID(num)=3614217)
exten => _X.,n,ExecIf($[ "${CALLERID(num)}" = "*2"],Set,CALLERID(num)=3614218)
exten => _X.,n,ExecIf($[ "${CALLERID(num)}" = "*6"],Set,
  OUTBOUNDMETHOD="SIP/${EXTEN}@sipPASCAL")
exten => _X.,n,Dial(${OUTBOUNDMETHOD})


In this case, the local phones *1 and *2 will send 3614217 or 3614218 respectively as local number on outgoing calls. *6 will allways use the sip provider defined as "sipPASCAL" in sip.conf.

Since many isdn providers list charges by msn in their invoices this is neat.


*1 and *6 are lines defined on my Cisco 7960 phone at my desk so I may choose myself which line I will use for callout.

0 TrackBacks

Listed below are links to blogs that reference this entry: Defining outgoing MSNs (ISDN) and channels in asterisk.

TrackBack URL for this entry: http://southbrain.com/mt/mt-tb.cgi/2

1 Comments

Hi Pascal!
I try to compile chan_sccp on FreeBSD 6.3 host
I fix Makefile
--
# (SCCP*)
#
# An implementation of Skinny Client Control Protocol (SCCP)
#
# Sergio Chersovani (mlists@c-net.it)
#
# Reworked, but based on chan_sccp code.
# The original chan_sccp driver that was made by Zozo which itself was derived from the chan_skinny driver.
# Modified by Jan Czmok and Julien Goodwin
#
# This program is free software and may be modified and
# distributed under the terms of the GNU Public License.

OSNAME=${shell uname}

INSTALL_PREFIX=/usr/local
ASTERISK_HEADER_DIR=$(INSTALL_PREFIX)/usr/include

ifeq (${OSNAME},NetBSD)
ASTERISK_HEADER_DIR=$(INSTALL_PREFIX)/usr/pkg/include
endif

AST_MODULES_DIR=$(INSTALL_PREFIX)/usr/lib/asterisk/modules/

# Location asterisk modules install to
ifeq (${OSNAME},SunOS)
AST_MODULES_DIR=$(INSTALL_PREFIX)/opt/asterisk/lib/modules/
ASTERISK_HEADER_DIR=$(INSTALL_PREFIX)/opt/asterisk/usr/include/asterisk
endif

ifeq (${OSNAME},FreeBSD)
ASTERISK_HEADER_DIR=$(INSTALL_PREFIX)/include
ASTERISK_HEADER_DIR=/usr/ports/net/asterisk/work/asterisk-1.4.17/include
AST_MODULES_DIR=$(INSTALL_PREFIX)/lib/asterisk/modules/
endif
----
End run
# gmake .config
sh ./create_config.sh "/usr/ports/net/asterisk/work/asterisk-1.4.17/include"
Creating config file
====================
Checking Asterisk version...
* found asterisk 1.4
Build PARK functions (y/n)[n]?
Build PICKUP functions (y/n)[n]?
Use realtime functionality (y/n)[n]?
* found 'struct ast_channel_tech'
* found 'ast_bridged_channel'
* found 'struct ast_callerid'
* found 'AST_MAX_CONTEXT'
* found 'MAX_MUSICCLASS'
* found 'AST_MAX_ACCOUNT_CODE' in /usr/ports/net/asterisk/work/asterisk-1.4.17/include/asterisk/cdr.h
* found 'AST_CONTROL_HOLD'
* found 'ast_config_load'
* found 'ast_copy_string'
* found 'AST_FLAG_MOH'
* found endian.h
* found strings.h
* found new ast_app_has_voicemail
* found new ast_get_hint
* found new devicestate.h
* found AST_DEVICE_RINGING
* found 'ast_group_t'
* found 'ast_app_separate_args'
* found AST_EXTENSION_RINGING
* found ast_string_field_funcs
* found new ast_cli_generator definition
config.h complete.
#cat :mk
gmake chan_sccp.o
gmake sccp_actions.o
gmake sccp_channel.o
gmake sccp_device.o
gmake sccp_utils.o
gmake sccp_line.o
gmake sccp_softkeys.o
gmake sccp_socket.o
gmake sccp_indicate.o
gmake sccp_cli.o
gmake sccp_pbx.o
#
# sh :mk
cc -Iinclude -D_REENTRANT -D_GNU_SOURCE -O -DCRYPTO -fPIC -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -march=i386 -Wnested-externs -Wlong-long -I/usr/ports/net/asterisk/work/asterisk-1.4.17/include -c -o chan_sccp.o chan_sccp.c
cc -Iinclude -D_REENTRANT -D_GNU_SOURCE -O -DCRYPTO -fPIC -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -march=i386 -Wnested-externs -Wlong-long -I/usr/ports/net/asterisk/work/asterisk-1.4.17/include -c -o sccp_actions.o sccp_actions.c
cc -Iinclude -D_REENTRANT -D_GNU_SOURCE -O -DCRYPTO -fPIC -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -march=i386 -Wnested-externs -Wlong-long -I/usr/ports/net/asterisk/work/asterisk-1.4.17/include -c -o sccp_channel.o sccp_channel.c
cc -Iinclude -D_REENTRANT -D_GNU_SOURCE -O -DCRYPTO -fPIC -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -march=i386 -Wnested-externs -Wlong-long -I/usr/ports/net/asterisk/work/asterisk-1.4.17/include -c -o sccp_device.o sccp_device.c
cc -Iinclude -D_REENTRANT -D_GNU_SOURCE -O -DCRYPTO -fPIC -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -march=i386 -Wnested-externs -Wlong-long -I/usr/ports/net/asterisk/work/asterisk-1.4.17/include -c -o sccp_utils.o sccp_utils.c
cc -Iinclude -D_REENTRANT -D_GNU_SOURCE -O -DCRYPTO -fPIC -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -march=i386 -Wnested-externs -Wlong-long -I/usr/ports/net/asterisk/work/asterisk-1.4.17/include -c -o sccp_line.o sccp_line.c
cc -Iinclude -D_REENTRANT -D_GNU_SOURCE -O -DCRYPTO -fPIC -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -march=i386 -Wnested-externs -Wlong-long -I/usr/ports/net/asterisk/work/asterisk-1.4.17/include -c -o sccp_softkeys.o sccp_softkeys.c
cc -Iinclude -D_REENTRANT -D_GNU_SOURCE -O -DCRYPTO -fPIC -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -march=i386 -Wnested-externs -Wlong-long -I/usr/ports/net/asterisk/work/asterisk-1.4.17/include -c -o sccp_socket.o sccp_socket.c
cc -Iinclude -D_REENTRANT -D_GNU_SOURCE -O -DCRYPTO -fPIC -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -march=i386 -Wnested-externs -Wlong-long -I/usr/ports/net/asterisk/work/asterisk-1.4.17/include -c -o sccp_indicate.o sccp_indicate.c
cc -Iinclude -D_REENTRANT -D_GNU_SOURCE -O -DCRYPTO -fPIC -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -march=i386 -Wnested-externs -Wlong-long -I/usr/ports/net/asterisk/work/asterisk-1.4.17/include -c -o sccp_cli.o sccp_cli.c
sccp_cli.c: In function `sccp_show_lines':
sccp_cli.c:523: warning: implicit declaration of function `GLOG'
sccp_cli.c:523: warning: nested extern declaration of `GLOG'
cc -Iinclude -D_REENTRANT -D_GNU_SOURCE -O -DCRYPTO -fPIC -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -march=i386 -Wnested-externs -Wlong-long -I/usr/ports/net/asterisk/work/asterisk-1.4.17/include -c -o sccp_pbx.o sccp_pbx.c
sccp_pbx.c: In function `sccp_rtp_read':
sccp_pbx.c:52: error: invalid operands to binary !=
sccp_pbx.c:53: warning: int format, ast_codec_pref arg (arg 4)
sccp_pbx.c:54: error: incompatible types in assignment
sccp_pbx.c: In function `sccp_pbx_write':
sccp_pbx.c:416: error: invalid operands to binary &
sccp_pbx.c:418: warning: int format, ast_codec_pref arg (arg 8)
sccp_pbx.c: At top level:
sccp_pbx.c:643: warning: initialization from incompatible pointer type
sccp_pbx.c: In function `sccp_pbx_channel_allocate':
sccp_pbx.c:701: error: incompatible types in assignment
sccp_pbx.c:702: error: invalid operands to binary &
sccp_pbx.c:705: error: incompatible type for argument 2 of `ast_codec_choose'
sccp_pbx.c:710: warning: int format, ast_codec_pref arg (arg 3)
sccp_pbx.c:726: error: incompatible type for argument 3 of `ast_getformatname_multiple'
sccp_pbx.c:733: error: incompatible types in assignment
gmake: *** [sccp_pbx.o] Error 1
#
-------------------------------------------------------------
Please fix this error

Leave a comment