[Asterisk-Users] Asterisk as SIP proxy?

Terry Wilson otherwiseguy at gmail.com
Fri Aug 6 08:41:35 MST 2004


I know asterisk isn't a real SIP proxy and is more of a multi-protocol
pbx with limited SIP support, but...

... is it possible if you have a central registration server that
handles all of your dialplan routing and several asterisk PSTN
gateways that it routes calls to for an outbound SIP conversation
using reinvites and NOT have the registrar box try and send ANY RTP
traffic back to the client?  It looks like the callflow goes like
this, currently:

Client invites, registrar contacts PSTN-GW, registrar sends invite
back phone to setup RTP between phone and registrar, registrar then
sends invite back to phone to setup RTP between phone and PSTN-GW.

what I want to do:

Client invites, registrar parses dialplan and forwards invite to
PSTN-GW with SDP set to setup call with client, PSTN-GW talks directly
to client.

Asterisk is *almost* doing this with reinvites turned on, if the first
200 OK sent back from the registrar had the Connection Info from the
PSTN gateway in the SDP message, it looks like things would be right. 
Instead it sends two invites back--one for itself and one for the gw.

I know it is odd to not be using IAX for asterisk to asterisk calls,
but we really need to be able to have that central server be out of
the media stream for anything not voicemail/feature server related. 
As an aside, yes I have no options specified in the Dial command,
reinvites are on, no monitoring, etc.  I did notice that if I didn't
put an Answer() in the outbound-pri macro that I use, that the PSTN
gateway would relay the ringing from the call through the registrar.

Anybody know if I'm out of luck?  I already looked into writing in
support for adding the ability for asterisk to send 302 redirects to
certain hosts when they are dialed via Dial(SIP/1231231234 at pstn) and
couldn't find where the initial sip_request was by the time dial
executed sip_call so that I could create the proper 302 response... my
C-fu is not so strong... :-)



More information about the asterisk-users mailing list