maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Use Asterisk for IVR on N900 (https://talk.maemo.org/showthread.php?t=38642)

bcnx 2009-12-28 16:47

Use Asterisk for IVR on N900
 
Hi all,

I just installed Asterisk on my N900 and all excited about this being possible, I started fantasizing about using the IVR funtionality of Asterisk to guide callers to things like voicemail, recorded messages or whatever.
Bu I wonder if the phone capability of the N900 is usable as a media channel in Asterisk. Anyone aware of this? Or will Asterisk behave as a pure SIP application so I cannot integrate regular phone calls on the N900? Thx!

B.

soeiro 2009-12-28 17:02

Re: Use Asterisk for IVR on N900
 
Humm, interesting. What s the typical CPU usage your are getting? And what are you using it for (since you are still missing IVR functions)?

R-R 2009-12-28 17:06

Re: Use Asterisk for IVR on N900
 
If you're able to make asterisk the core manager of all calls on this phone, It'd be a hell of a nice thing!

On the phone voicemail, email forwarding, etc... ! :D

bcnx 2009-12-28 18:50

Re: Use Asterisk for IVR on N900
 
It doesn't really use a lot of CPU. But that's in idle state of course.

bcnx 2009-12-28 18:52

Re: Use Asterisk for IVR on N900
 
I just called my voicemail while the Asterisk console was open and I saw nothing move, so I guess the phone functionality is not really implemented in Asterisk. Too bad.

jebba 2009-12-29 01:29

Re: Use Asterisk for IVR on N900
 
Are you using the packages from extras-testing or -devel? If so you are probably using the packages I did.

As it stands now, asterisk is not "connected" to the main GSM chip of the phone. This would rule if someone called your cell phone and the whole thing got routed through asterisk. ;) Some day that may be possible, but likely quite a ways off (perhaps when ofono is a main component).

Right now it works decently. With the packages and zero configuration (just click on the asterisk icon to launch it), you can call default@10.0.0.5 or whatever your IP address is and asterisk will answer with it's test message. You can also call it using the SIP software on the phone and call default@localhost :)))))

This weekend I went camping with another N900ista and we put both of our phones in Adhoc mode (e.g. we could ping each other without a base station). I ran asterisk on my phone and set up a SIP account for both of us in /opt/asterisk/etc/users.conf, like this:

Code:

[jebba]
fullname = Jeff Moe
email = moe@blagblagblag.org
secret = 9999
;dahdichan = 1
hasvoicemail = yes
vmsecret = 1234
hassip = yes
hasiax = yes
hash323 = no
hasmanager = no
callwaiting = no
;context = international
context = default
requirecalltoken=no
host=dynamic

[mat]
fullname = mat
email = mat@foo
secret = 1234
;dahdichan = 1
hasvoicemail = yes
vmsecret = 1234
hassip = yes
hasiax = yes
hash323 = no
hasmanager = no
callwaiting = no
;context = international
context = default
requirecalltoken=no
host=dynamic

Then we could call each other by dialing with the phone using SIP :) So he'd call jebba@10.0.0.1 (IP of my phone), and I would call him using mat@10.0.0.1 (IP of *my* phone since that's where asterisk was running).

So we had a total phone setup without any external hardware such as routers or an asterisk server. We would only go like 50 meters or so though... Line of sight was necessary. Still was nice.

It will be easy then, to be able to route, say gtalk calls or jingle/jabber/IAX2/SIP calls through asterisk.

There's two main things I would like to fix. One is that it isn't running in "realtime" mode, like pulseaudio is, so if anything else fires up, things drop and sound bad. Once realtime is working, that will be solid and calls will be perfecto. This shouldn't be too hard to get going.

The other issue is that asterisk does tons of wakeups (like 6000 in 30 seconds) which clobbers battery. I'll see what I can do to fix that.

It uses like 1-2% CPU when asterisk isn't really doing anything and about 4-5% CPU when calls are in progress, which ain't too bad at all.

A bit off topic, but here's an ancient asterisk page of mine about BLASTERISK, an asterisk server I ran for a few years or so:
http://wiki.blagblagblag.org/BLASTERISK

Let me know what uses you'd like to do with asterisk. I'm definitely going to spend a lot of time poking at it as I particularly like it.

As a side note, the upstream debian maintainer of asterisk has contacted me and is also an N900 user, so we can pick his brain too.

Have fun.

R-R 2009-12-29 01:43

Re: Use Asterisk for IVR on N900
 
Quote:

Originally Posted by jebba (Post 444669)
Right now it works decently. With the packages and zero configuration (just click on the asterisk icon to launch it), you can call default@10.0.0.5 or whatever your IP address is and asterisk will answer with it's test message. You can also call it using the SIP software on the phone and call default@localhost :)))))

You are able to actually cal SIP URI from the dial pad ?!
Or you just made a extension that mapped to it?

Also, didn't you suffer from the a=ptime:20 bug where farsight ignores the 20ms requested by asterisk and uses a 40ms one instead giving you choppy audio sent to your peer (from the n900, in your case, both of you).

jebba 2009-12-29 06:30

Re: Use Asterisk for IVR on N900
 
Quote:

Originally Posted by R-R (Post 444681)
You are able to actually cal SIP URI from the dial pad ?!
Or you just made a extension that mapped to it?

I set up contacts such as mat@10.0.0.1 and default@localhost and they work fine. Presumably they would be fine from the dialpad as well.

Quote:

Originally Posted by R-R (Post 444681)
Also, didn't you suffer from the a=ptime:20 bug where farsight ignores the 20ms requested by asterisk and uses a 40ms one instead giving you choppy audio sent to your peer (from the n900, in your case, both of you).

That bug does not appear to apply in this case.

Download the package and try it out. It's easy.

bcnx 2009-12-29 12:06

Re: Use Asterisk for IVR on N900
 
Jebba,

that sounds very cool. It becomes real interesting when we are allowed to really integrate the phone chip into asterisk. I don't really see any other applications if that is not happening, unless one needs a portable pbx system. Perhaps somebody is able to write some sort of driver for that one day.

R-R 2009-12-29 16:35

Re: Use Asterisk for IVR on N900
 
Quote:

Originally Posted by jebba (Post 444828)
I set up contacts such as mat@10.0.0.1 and default@localhost and they work fine. Presumably they would be fine from the dialpad as well.

Well, check my signature list of bugs as I can't enter caracters in the dialpad :-(
Vote for it! :-)

Quote:

Originally Posted by jebba (Post 444828)
That bug does not appear to apply in this case.

Download the package and try it out. It's easy.

I did last weekend but haven't gotten around to configure everything just yet, but surely will, thanks again :-)

n900nate 2010-08-09 00:14

Re: Use Asterisk for IVR on N900
 
Any updates on this project?

I hacked my WRT54GS router with asterisk a few years back & it worked well....the N900 h/ware looks better, but it'd be good to see if anyone's managed to get Asterisk working 'fully' on their N900.

...obviously 'fully' depends on what you want to do with this swiss-army knife pbx :)

Nate.

theonelaw 2010-08-09 00:42

Linphone
 
Quote:

Originally Posted by jebba (Post 444669)
Are you using the packages from extras-testing or -devel? If so you are probably using the packages I did.
...
This weekend I went camping with another N900ista and we put both of our phones in Adhoc mode (e.g. we could ping each other without a base station). I ran asterisk on my phone and set up a SIP account for both of us in /opt/asterisk/etc/users.conf, like this:
...]

Then we could call each other by dialing with the phone using SIP :) So he'd call jebba@10.0.0.1 (IP of my phone), and I would call him using mat@10.0.0.1 (IP of *my* phone since that's where asterisk was running).

So we had a total phone setup without any external hardware such as routers or an asterisk server. We would only go like 50 meters or so though... Line of sight was necessary. Still was nice.
...

Have fun.

I have been testing Linphone for peer-to-peer SIP
rather than putting a full-blown server with all the
cpu-time that consumes but maybe someone has already been there??:confused:


All times are GMT. The time now is 10:57.

vBulletin® Version 3.8.8