Configuring for inbound gateway

I am trying to get my setup running with an analog Intel PBX-IP Media Gateway.

I have the PIMG configured good because I can see the SIP calls getting to the box (sip debug shows this) but I KNOW I have some problems with my sip.conf and extensions.conf files and was hoping to get some newbiew help here.

Here are the setup details
Asterisk box = 10.0.0.111
Gateway box = 10.0.0.112

When I place an inbound call into the gateway it sends an invite that looks like:

v=0!
o=phone 17289 0 IN IP4 10.0.0.112!
s=-!
c=IN IP4 10.0.0.112!
t=0 0!
m=audio 49018 RTP/AVP 0 8 101!
a=rtpmap:0 PCMU/8000/1!
a=rtpmap:8 PCMA/8000/1!
a=rtpmap:101 telephone-event/8000!
a=fmtp:101 0-15!
m=image 0 udptl t38!
a=T38FaxRateManagement:transferredTCF!
a=T38FaxUdpEC:t38UDPFEC!
<----INVITE sip:Anonymous@10.0.0.111;Transport=udp SIP/2.0!
From:"Anonymous"sip:Anonymous@10.0.0.112:5060;user=phone;vnd.pimg.port=1;tag=7162324631353641000146AF!
To:sip:Anonymous@10.0.0.111!
Content-Type:application/sdp!
Call-ID:01B2272D3C81400000000009@pbxgw.default.com!
CSeq:1 INVITE!
Allow-Events:refer,message-summary!
Expires:120!
Via:SIP/2.0/UDP 10.0.0.112:5060!
Contact:sip:Anonymous@10.0.0.112:5060!
User-Agent:PBX-IP Media Gateway !
Max-Forwards:70!
Supported:100rel,timer,replaces!
Content-Length:289!
v=0!
o=phone 17289 0 IN IP4 10.0.0.112!
s=-!
c=IN IP4 10.0.0.112!
t=0 0!
m=audio 49018 RTP/AVP 0 8 101!
a=rtpmap:0 PCMU/8000/1!
a=rtpmap:8 PCMA/8000/1!
a=rtpmap:101 telephone-event/8000!
a=fmtp:101 0-15!
m=image 0 udptl t38!
a=T38FaxRateManagement:transferredTCF!
a=T38FaxUdpEC:t38UDPFEC!

In my cases here the headers dont have any numbers in them since I have no way to get called or calling data intothe gateway. They end up going in as Anonymous. I don’t really care about this yet since I just want to use this gateway to get circuit calls into the system.

My sip.conf file looks like:


[general]
context=default
bindport=5060
bindaddr=10.0.0.111
useragent=Asterisk PBX
dtmfmode=rfc2833

[PIMG]
type=friend
context=pimg_inbound
host=10.0.0.112
nat=no
dtmfmode=rfc2833

My extensions.conf looks like:


[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

[globals]

[default]

[pimg_inbound]
exten => s,1,Answer

The debug (console) shows the following:


INVITE sip:Anonymous@10.0.0.111;Transport=udp SIP/2.0
From:"Anonymous"sip:Anonymous@10.0.0.112:5060;user=phone;vnd.pimg.port=1;tag=0FFA32463135364100008250
To:sip:Anonymous@10.0.0.111
Content-Type:application/sdp
Call-ID:01B22719988140000000000D@pbxgw.default.com
CSeq:1 INVITE
Allow-Events:refer,message-summary
Expires:120
Via:SIP/2.0/UDP 10.0.0.112:5060
Contact:sip:Anonymous@10.0.0.112:5060
User-Agent:PBX-IP Media Gateway
Max-Forwards:70
Supported:100rel,timer,replaces
Content-Length:292

v=0
o=phone 13367 0 IN IP4 10.0.0.112
s=-
c=IN IP4 10.0.0.112
t=0 0
m=audio 49026 RTP/AVP 0 8 101 13
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
m=image 0 udptl t38
a=T38FaxRateManagement:transferredTCF
a=T38FaxUdpEC:t38UDPFEC

— (14 headers 13 lines)—
Using INVITE request as basis request - 01B22719988140000000000D@pbxgw.default.com
Sending to 10.0.0.112 : 5060 (non-NAT)
Found peer 'PIMG’
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Found RTP audio format 13
Jun 3 22:24:28 WARNING[4536]: chan_sip.c:3573 process_sdp: Unknown SDP media type in offer: image 0 udptl t38
Peer audio RTP is at port 10.0.0.112:49026
Found description format PCMU
Found description format PCMA
Found description format telephone-event
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0xc (ulaw|alaw)/video=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x3 (telephone-event|CN), combined - 0x1 (telephone-event)
Looking for Anonymous in pimg_inbound (domain 10.0.0.111)
Jun 3 22:24:28 NOTICE[4536]: pbx.c:1741 pbx_extension_helper: Cannot find extension context 'pimg_inbound’

Reliably Transmitting (no NAT) to 10.0.0.112:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.0.0.112:5060;received=10.0.0.112
From: "Anonymous"sip:Anonymous@10.0.0.112:5060;user=phone;vnd.pimg.port=1;tag=0FFA32463135364100008250
To: sip:Anonymous@10.0.0.111;tag=as3f4f6a4f
Call-ID: 01B22719988140000000000D@pbxgw.default.com
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:Anonymous@10.0.0.111
Content-Length: 0


Anyone care to show a newbie the error of his ways here?

My goal is to be able to just answer the call right now and then play a prompt and hang up. Just something simple that I can work with a bit.

TIA for any help that I can get…

Ray,

We hope you don’t mind, but we’re newbies here and we thought we might add to your post. It sounds like we are having a very similar issue with Trixbox. We’re trying to connect an Avaya CM 1.3 to Asterisk using a PIMG. We feel that we must be very close, but we’re missing something. We can see the PIMG attempting to connect, but the calls are being auto-stopped and destroyed in asterisk.

In SIP debug info on asterisk, we are seeing the calling party number with a destination of anonymous@ourserverIPaddress.

Can you help us? Have you found an answer?

dsalo@nmu.edu

Let me look over my files here. I have to fire up the Linux box…

Thanks,

We’re a little stuck.

Don

Hi rcassick

you need to create an extension caled Anonymous then your calls will mat to this extension.

so you will need something like

exten => Anonymous,1,Answer
exten => Anonymous,n,Dial(etc etc etc

ianplain has it right there.

I looked over some old notes and that is what I did.

Ian,

We got Asterisk to answer the call, that’s very good, but we’re not sure what to do next. We are clearly newbies here.

If you could supply us with an example of the config that follows

exten => Anonymous,1,Answer
exten => Anonymous,n,Dial(etc etc etc

we would be most appreciative. It definately answered the SIP call, and that is a great step in the right direction. We are trying to supply Asterisk with the called party and calling party information so we can leave a message in asterisk. After we do that, we’re trying to control the message waiting lamp on our Avaya PBX. We really appreciate your kind words. Thanks.

You’re going to have to be a little more specific about what you want to do… it would also be helpful if you could explain to us in a more objective manner what needs to happen (I don’t have a PIMG).

From What he has asked for, He wants to use * as a voicemail server for his Avaya.

Ian

The called party you are going to have to key off of to know the persons extension to leave a message for will be in the diversion header of the invite. I can’t remember right now how to get at that exact header, perhaps someone here does. I believe ${SIP_HEADER(Diversion)} works.

As far as doing MWIs, the PIMG will need to get a properly formatted NOTIFY message from the * VM system. I never went that far as I was just using the PIMG for an inbound trunk into my system and did not care about the MWIs in that implementation.

Ian has it right, we’re trying to use * as a voicemail system for the Avaya CM 1.3 (legacy) phone system.

The hints and tips you guys are coming up with are helping tremendously. We decided to see if the linux * version we were using was part of the problem, so we just loaded a new version of * on BSD, now we can see the diversion headers. We’re definately getting closer with all your help and comments.
We’re going to hit it again tomorrow and look for the info Ray was talking about. If we can get this going, we could add this setup for others who are considering this sort of functionality.

We had a digium card set up as an ISDN PRI between the Avaya and *, which was working great, but something bad happened to it and it is no longer with us. So now we also need to decide what we want to do for trunks if we need them. Thanks again for all your help.