[Asterisk-Dev] sip refer

Richard richard at o-matrix.org
Wed Oct 20 11:00:34 MST 2004


Hi Olle,
 
> My worry is that you do not understand the difference between Asterisk
> and a SIP proxy ;-)
Haha, I can't claim to be a sip guru, but far from a beginner... :)
 
> Every call in Asterisk goes through the dial plan. If we get a Refer-To,
> it has to go through the dial plan, because you do not know where the
> extension is - on an IAX trunk, a SIP peer or maybe a Zap phone line.
I understand this. I am only using * as a PSTN gateway for a SIP network
which runs ser in the core. So there is no concern about IAX.

> If we received it in chan_sip and sent it out again, without letting
> the PBX handle the transfer, we would certainly break the Asterisk
> architecture.
Not an issue to my application.

> So my humble advice is: Fix your dialplan! If you are using SIP,
> the dialplan should be able to handle any sip URI.
Not really. I don't define any domain or user in *. Everything is defined in
ser and * just uses autopeer. For example, if I have a 3 digit dialing for
company A and B. Both uses extension 200 but on different SIP domains. When
* gets a sip REFER, it will be 200 at companyA.com and 200 at companyB.com. If it
goes through the dial plan, there is no way to tell which company 200
belongs to. In chan_sip.c, I see that it strips the domain part and only
looks at the extension.

Also my billing system is in ser. So if a REFER goes to PSTN, it will look
at the dial plan and go to PSTN directly and bypass ser. Obviously that's a
problem to me.

> /Olle

Back to my original question, if I change chan_sip.c, would it be enough? Is
there any code in the system doing similar stuff and I can base on?

Thanks,
Richard





More information about the asterisk-dev mailing list