Simon J Mudd
2003-Jun-15 08:19 UTC
[Asterisk-Users] a few questions about sip implementation
I'm looking at RFC 3261, I think the latest SIP standard and have a few questions about the * sip implementation: 1. 8.2.6.1 Sending a Provisional Response says that UASs SHOULD NOT issue a provisional response to non-INVITE requests.
Simon - There are certainly some things that are lacking with Asterisk's SIP implementation, some of which you may have tripped over. Of course, Asterisk's SIP stack is "pragmatic" and has been developed as people discover needs for particular functions. However, there are perhaps some solutions to your questions:>I'm looking at RFC 3261, I think the latest SIP standard and have a few >questions about the * sip implementation: > >1. 8.2.6.1 Sending a Provisional Response says that UASs SHOULD NOT issue >a provisional response to non-INVITE requests. > >>From my message yesterday * appears to be sending a SIP/2.0 100 Trying to >X-Lite's REGISTER request before sending the SIP/2.0 200 OK message. > >Is this correct?Yes, that is what it is doing and and while it may not adherent to the exact reading of the RFC, I have seen several other proxies doing the same thing (examples: FWD's SIP proxy (Cisco?) does send "100 Trying" but SER does not) so I will assume it's an awkward industry standard, though perhaps not exactly compliant to the RFC paragraph that you describe.>2. 10.3 Processing REGISTER requests. The 5th paragraph states "that the >registrar has to know the set of domain(s) for which it maintains >bindings". > >How is this specified in Asterisk? Through the context? ie should the >domains be specified in sip.conf via the context parameter, of the >form context=domain.com?Currently, that is not possible. The registrar maintains the set of allowed bindings by an exactly matching username/password process, OR via an IP-based permissions scheme. There are no wildcards for domains in Asterisk for authentication. This does not preclude you from creating entries for each SIP user in your sip.conf file, which is a bit tedious, but may be an interim solution.>3. I have another SIP account (sip:912345678@domain.es) which I would like >to use within asterisk both for dialing out and for receiving calls. > >I see that sip.conf has a line > >register => 912345678@domain.es/1234 > >where 1234 is the local asterisk extension. From chan_sip.c, line 1390 I >see that I can use the form: > >register => user[:secret[:authuser]]@host[:port][/localextension] > >However my registrar requires that I authenticate with domain.es, but use >a sip proxy at ip 1.2.3.4, the two are unrelated and domain.es has no ip >address. How can I get Asterisk to register with the remote prxoy?I sent a note to Mark about this. We had discussed a patch to fix this back in Feb, but apparently it didn't do quite the trick (due to my lack of testing.) Lines like this are supported: register => 9993@something.foo.net:password@blatz.filbert.com/9993 However, the current REGISTER routines don't chop off "blatz.filbert.com" in the To: and From: fields. Hopefully a repair will be seen in the future. JT>Sorry for the newbie questions. > >Simon >
Mark Spencer
2003-Jun-15 13:00 UTC
[Asterisk-Users] a few questions about sip implementation
> Is this correct?I see the 100 Trying on REGISTER frequently, but if it's not valid, we can take it out. It serves no really effective purpose.> 2. 10.3 Processing REGISTER requests. The 5th paragraph states "that the > registrar has to know the set of domain(s) for which it maintains > bindings". > > How is this specified in Asterisk? Through the context? ie should the > domains be specified in sip.conf via the context parameter, of the > form context=domain.com?What's the practical meaning of that? Asterisk just uses the part in front of the "@" sign and ignores the rest. This way you can use the domain or IP just the same.> 3. I have another SIP account (sip:912345678@domain.es) which I would like > to use within asterisk both for dialing out and for receiving calls. > > I see that sip.conf has a line > > register => 912345678@domain.es/1234 > > where 1234 is the local asterisk extension. From chan_sip.c, line 1390 I > see that I can use the form: > > register => user[:secret[:authuser]]@host[:port][/localextension] > > However my registrar requires that I authenticate with domain.es, but use > a sip proxy at ip 1.2.3.4, the two are unrelated and domain.es has no ip > address. How can I get Asterisk to register with the remote prxoy?You do: register => 912345678:<password>:domain.es@1.2.3.4/1234 Mark