Hello Patrick,
you may go the following way:
Asterisk:
Setup Asterisk for realtime integration as described in the guide:
Make sure when Asterisk starts (-vvvr) you get the following messages:
asterisk -vvvr
== Parsing '/etc/asterisk/asterisk.conf': Found
== Parsing '/etc/asterisk/extconfig.conf': Found
== Binding sipusers to mysql/asterisk/sip
== Binding sippeers to mysql/asterisk/sip
== Binding voicemail to mysql/asterisk/voicemail
If you get errors like:
find_engine: Realtime mapping for 'sippeers' found to engine 'mysql',
but the engine is not available
then you might:
- have no mysql-client installed on your asterisk machine
- you do nat have sufficient access rights on your openser-mysql
- your openser-mysql may list on loacalhost instead of its real IP
- you might not have compiled asterisk and asterisk-addons with the
–with-mysqlclient=/usr option
- I remember that some time ago on one machine I needed also to install
mysql-devel and mysql-server as asterisk-addons complained a missing
module in /usr/bin while compiling
Now create a route for Asterisk in OpenSER:
route[5] {
# -----------------------------------------------------------------
# ASTERISK Handler
# -----------------------------------------------------------------
xlog("L_INFO","Step 500 Entering ==== Route 5 (Asterisk) ======");
rewritehostport("www.xxx.yyy.zzz:5060"); # INSERT YOUR Asterisk GATEWAY
IP ADDRESS and port here
route(1); # now use standort route with t_relay
}
Now in your main routing logic branch to the asterisk route
if (uri=~"^sip:0[1-9].*@.*") { # Dial national PSTN number here: in Germany
append_rpid_hf(); # for submitting external number from customers from
subscriber table/rpid
route(5); # Asterisk route
exit;
};
Restart OpenSER.
Now goto Asterisk and register you Openser in sip.conf e.g.
[openser]
host=<your openser host>
dtmfmode=rfc2833
type=peer
context=default
insecure=very
nat=never
allow=all
and create lines like the following in externsions.conf in your inbound
route
exten => _0.,1,Set(MYMSN=${CALLERID(number)})
exten => _0.,n,NoOP(${MYMSN} ${CALLERID(name)} ${EXTEN})
exten => _0.,n,Playback(beep)
exten => _0.,n,Hangup
_0. means to catch all numbers which start with 0.
Restart or reload Asterisk.
When a connection is made you shopuld hear a beep.
I hope this helps.
Best regards
Peter
Patrick Baker schrieb:
Sipwise.com might help
----- Original Message -----
From: users-bounces(a)lists.openser.org <users-bounces(a)lists.openser.org>
To: users(a)lists.openser.org <users(a)lists.openser.org>
Sent: Wed Jan 16 23:48:27 2008
Subject: [OpenSER-Users] openSER Call Route Logic
Hi,
I recently installed openser-1.3.0 and able to connect my cisco sip phones and everything
is working. Now i need to integrate this with asterisk box for call forwarding to other
locations & voicemails. i read the getting started guide and other information, but
seems i need more help from the group. can any one give me a helping hand. i am sure i
will do my home work before bug you again. I need a starting point to over come the
complexity of the routing plan and logic.
thanks
-asterisk user
________________________________
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
<http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping>
_______________________________________________
Users mailing list
Users(a)lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users