[Asterisk-Users] Re: [Asterisk-Users] SIP config documentation

Costa Tsaousis costa at tsaousis.gr
Sat Feb 21 02:06:23 MST 2004


Hi all,

(oej, I have lost your e-mail somehow, so I have replied to some other
reply to you... sorry!)

>> context= ; UP, the context name for placing calls
>>
>> Q1: Why is there a context for peers?
>
> We use peers in some other situations as well.  This is strange and
> rather undocumented, but an incoming call is first matched by
> username with the defined users (including 'friends'). After that,
> we match on IP address with the peer table. Hopefully those
> peers have authentication (a secret), so we authenticate and accept
> the call based on IP. This is used when connecting Asterisk as
> a PSTN-gateway to other SIP proxys. Incoming calls are placed
> in the peer context.

Does this mean that if I have SER for example as the primary proxy for a
domain and I want to use asterisk as a media gateway, I can have SER
redirect my user agents to asterisk, which will be authenticated as nomral
by asterisk (sip.conf entries for each agent), without using
autocreatepeers=yes?

>> canreinvite= ; UP yes, no or update.
>>
>> Q2: What the "update" option does?
>
> I think the update is not a keyword, but a value.

Yes, my fault.

> See here
> http://www.voip-info.org/wiki-Asterisk%20sip%20qualify

It is not a value of qualify. It is a value of canreinvite.
Do you know what it does?

>> callerid= ; U- caller id of the user: "Name <number>".
>
> Have to check this one. Been working a bit on this problem in the
> chan_sip2 channel.

I have submitted two bug reports. One includes a patch to chan_sip.c that
fixes the problem. See:

http://bugs.digium.com/bug_view_page.php?bug_id=0001074

Another is about CALLERIDNUM. This variable seems to strip the dots from
the domain without practical reason (also SetCIDNum and the like do this).
See:

http://bugs.digium.com/bug_view_page.php?bug_id=0001075

>> callgroup= ; UP
>> pckupgroup= ; UP
>>
>> Q4: Since a user cannot accept calls, why to setup call pickup for
>> him/her?
> Sorry, haven't used or checked call groups. Anyone else?

No answer on this yet...

>> language= ; U- language for voice messages and indications
>>
>> Q5: Why a peer does not have a language? What if we want to call
>> someone
>> with an IVR menu (via a .call file)? How we can choose the language
>> for
>> him/her? (yes, I know this can be set in the context the call will
>> enter, but I think the elegant solution is to have this information
>> here).
>>
> This is a bug fixed in the chan_sip2 channel.

ok

>> accountcode= ; U- CDR's account code
>> incominglimit= ; U- concurrent call limitations ( >= 0 )
>> outgoinglimit= ; U- concurrent call limitations ( >= 0 )
>>
>> Q6: How is it possible for a type=user phone to have BOTH incoming and
>> outgoing limits?
> Interesting question. Anyone else?

No help on this either so far.

>> nat= ; -P yes, no : Support NAT. (breaks RFC)
> Well, yes, it breaks the RFC, but makes SIP work. What nat=yes really
> does
> is that it ignores the IP data within the registration or invite and use
> the IP address Asterisk received the packet from. This works if the
> client is contacting us directly, with no outbound proxy in between.
> This is rather common in SIP proxy implementations right now. When STUN
> and UPNP and other NAT/VoIP solutions are more frequently implemented,
> the data sent to thte SIP server will not include any private NAT
> networks
> any more, but that will not happen overnight.

ok

>> fromdomain= ; -P Domain to show in the domain field of the outgoing
>> call TO the peer.
> I think this is mainly used when we REGISTER with an outbound proxy,
> like FWD.
>> fromuser= ; -P User to show in the user field of the outgoing call TO
>> the peer.
> Same here.

fromdomain and fromuser overwrite the callerid sent TO the peer. The
[general] section fromdomain and callerid are the same respectivelly
(callerid in [general] is fromuser actually) for destinations not defined
as peers in sip.conf (i.e. DNS SRV based lookups). The patch I have
sumbitted above allows the type=user entities to have a
fromdomain/fromuser given in their callerid:

callerid = My Name <fromuser at fromdomain>

This allows asterisk serve multiple SIP domains concurrently (I am working
on this for some time - I have build a configurator that automatically
creates multi-domain configurations for using * for SIP virtual PBX
services - If you are interested for this builder, just send me a note to
send it to you - it is alpha currently).

>> mask= ; -P netmask for host= parameter.
> This has to be defined *before* thet host= parameter.

Thanks for the hint. I didn't notice this.

> What it does? Don't know. Anyone else? Why do Asterisk apply a host mask
> to an IP address for a host?

This is still open too.

>> defaultip= ; -P if the peer does not register with us, where we should
>> try to find it by default.
> Useful if you restart Asterisk. The SIP device think it's registred for
> a while longer, but Asterisk lost contact with them.

ok.

> host=<ip address>
> port=<port no>
> means you don't use SIP REGISTER, the SIP ua is always at the same
> address.
> Again, mask - I don't really know.

ok

>> username= ; -P username to send to the peer when calling the peer
>>
>> Q7: Since this is a peer option, it is really very badly documented in
>> the various documents. All these documents state that this is used
>> when
>> the phone's login name is different from the default. But then, since
>> this is a peer option it is ignored for type=user agents and is used
>> only when asterisk is calling the phone.
>
> Agree, this is fuzzy. Have you noticed that it changes to peer name
> after a while? Do 'sip show peers' at the CLI, and you'll notice.
>
> The chan_sip2 channel uses the Contact: at registration when we
> send subsequent messages, like INVITE.

As I see in chan_sip.c/initreqprep() username= is also used in INVITE for
peers too.


> As I stated earlier, I'm highly suspicious to the "in order of
> preference"
> part. Since I got no comments or replies on that mail, I suspect I'm
> right
> :-)

What do you mean? Is the order of preference not working?

A new question:
Is chan_sip2 ready for production?


Regards,

Costa




More information about the asterisk-users mailing list