Sending calls from Openser to FreePBX

I am looking for help with the following:

I currently have Openser Asterisk and FreePBX installed and running just fine. I have phones that are registered with Openser which is on one box, I also have Asterisk which is on another box and finally I have FreePBX installed and running on a third box. I am having a problem with the following:

  1. I am trying to send the call to FreePBX anytime someone dials a *8 to go out the PSTN trunk groups that I have. Right now when I try to send the call from Openser to FreePBX I get the following messages on the console so my call is making it to FreePBX but it looks like FreePBX doesn’t know what to do with the call. Here is my log:

– Executing NoOp(“SIP/192.168.1.175-08eb7340”, “Received incoming SIP connection from unknown peer to 96794399”) in new stack
– Executing Set(“SIP/192.168.1.175-08eb7340”, “DID=96794399”) in new stack
– Executing Goto(“SIP/192.168.1.175-08eb7340”, “s|1”) in new stack
– Goto (from-sip-external,s,1)
– Executing GotoIf(“SIP/192.168.1.175-08eb7340”, “0?from-trunk|96794399|1”) in new stack
– Executing Set(“SIP/192.168.1.175-08eb7340”, “TIMEOUT(absolute)=15”) in new stack
– Channel will hangup at 2007-08-29 00:03:47 UTC.
– Executing Answer(“SIP/192.168.1.175-08eb7340”, “”) in new stack
– Executing Wait(“SIP/192.168.1.175-08eb7340”, “2”) in new stack
– Executing Playback(“SIP/192.168.1.175-08eb7340”, “ss-noservice”) in new stack
– Playing ‘ss-noservice’ (language ‘en’)
== Spawn extension (from-sip-external, s, 5) exited non-zero on ‘SIP/192.168.1.175-08eb7340’
– Executing NoOp(“SIP/192.168.1.175-08eb7340”, “Hangup”) in new stack
– Executing Set(“SIP/192.168.1.175-08eb7340”, “DID=s”) in new stack
– Executing Goto(“SIP/192.168.1.175-08eb7340”, “s|1”) in new stack
– Goto (from-sip-external,s,1)
– Executing GotoIf(“SIP/192.168.1.175-08eb7340”, “0?from-trunk|s|1”) in new stack
– Executing Set(“SIP/192.168.1.175-08eb7340”, “TIMEOUT(absolute)=15”) in new stack
– Channel will hangup at 2007-08-29 00:03:50 UTC.
– Executing Answer(“SIP/192.168.1.175-08eb7340”, “”) in new stack
== Spawn extension (from-sip-external, s, 3) exited non-zero on 'SIP/192.168.1.175-08eb7340’
pbx*CLI>

When I send the call I appened the 9 so it can get a local line. I see the call in the above but I don’t know what to setup in FreePBX. I have tried to add a peer, I have tried to add a SIP trunk, but no luck. When I add a a PEER statement in SIP.CONF like the following, I don’t get the error above, but I get an announcement that says the person is unavailable??

[openser]
type=friend
context=default
host=192.168.1.175
insecure=very

All I would FreePBX to do when the call arrives is send it out my Zap trunks.
Any help would be great as I have everything else working, from voicemail to Instant messaging to calling one another from sip to sip.

Thanks,

Cliff

Let me first say sorry that I don’t have answers to your questions, but instead have questions about your setup.
I’m trying to set up an openser, asterisk, freepbx combo as well. I want to set up my openser box as the proxy server, use an asterisk box for all the features, and have freepbx interface to the asterisk server. All of my users would register on the openser server. Do you have the same set up or do you just have your openser server and asterisk server interconnected using sip? By the way, how do you have instant messaging working? Would you point me in the direction of some documentation on how I can set that up?

Thanks in advance for your help!

Sher

I have Openser as the registar via the Internet and interfaces with 3 Asterisk servers. The Asterisk servers provide all of the normal services. The main thing that I use Openser for is proxy, Auth and so on and to load balance and as well to have a single registration point. All works well. For example Voice Mail is in a Mysql Database as well as User names and Extensions.

Then by having Openser as the registar and using it’s features, I use X-Lite and EyeBeam software for the Voice and Video as well as using the Instant Messaging feature that Asterisk does not support.

For example you can call someone and if they don’t answer say after 4 rings or X amount of seconds it goes to Voicemail on Asterisk. Asterisk then send out it normal Voicemail to Email. You can then dial from anywhere using *981 and get to voicemailMainMenu or dial *98 to get to your own Voicemail directly. I then have *8 to dial PSTN and so on. It’s all transparent to the end user.

I followed some of the below, but had to work with Asterisk extensions.conf, sip.conf, voicemail.conf, extconfig, res_odbc.conf to get everything working.

Some of the things you don’t want to install or the Asterisk-addons until last as this really sems to affect the CDR and OBDC mysql drivers.

Here is some help:

http://www.voip-info.org/wiki/view/Realtime+Integration+Of+Asterisk+With+OpenSER

Some of the issues with this is the Openser Script doesn’t work as it is shown. You will need to modify the code within the Route Code on openser.cfg. Find a section in your route that looks like this: avp_write("$ruri", “avpi:10”);
and change it to this
avp_write("$ruri", “$avp(i:10)”);

also find a section that looks like this:
vp_pushto("$ruri", avp"i:10");

and change it to this:
avp_pushto("$ruri", $avp"(i:10)");

All make sure you load MySQL-Server 5.0, MySQL-Client, MySQL-Devel, MySQL-shared-compat, mysql-connector-odbc, libtools just to name a few. Be carfeful not to do any kind of yum-install on the UnixODBC or apt-get as I found it doesn’t complety install and setp unixODBC. follow the setup from above step by step and don’t skip. I think the one thing to also pay attention to is unixODBC will install in usr/local/etc/odbc the odbc.ini and odbcinst.ini files and mysql-connector-obdc installs it’s obci.ini and odbcinst.ini in /etc/odbc… For openser it will look in /usr/loacl/etc/odbc and Asterisk will use /etc/odbc… At least that is what I see on 5 different installs.

It’s allot of work but in the end I think you come out with a pretty cool system. Everyone loves the fact that voice, video and Instant message all happens from a single phone.

I suggest you do a simple install of say CentOS like 4.1 and choose the minium install. This will create you a base system to work from and you only need the first CD. After you have a base system, then issue the command:

yum -y update && reboot

let it do its thing then after the reboot your system will ready to begin the process,

next do:

yum -y install gcc libxml2-devel libtiff-devel flex kernel-devel bison ncurses-devel audiofile-devel libogg-devel openssl-devel httpd

then reboot and do another yum -y update

after that follow the link above.

Good luck.