Hi,
Finally I found the solution!
Accepting calls from Asterisk users by SER is simple, by adding special
routes in ser.cfg. The problem is to route SER users' calls to Asterisk. By
default, Asterisk replies with a "Not Found" error to SER if the "INVITE"
message forwarded to it is not authorized. Making SER authorized to Asterisk
is done by adding a user in sip.conf as a peer. This yields something like
this:
[un]
type=peer
username=un
insecure=yes
host=SER's ip address (host
name)
Whenever "insecure" is set to "yes", "host" provides security. This means
packets are only allowed from the specified ip address.
The "un" is the name of the calee! According to authentication procedure
described in RFC-3261, the "TO" header field represents user agent being
authorized. So, when a SER client is calling an Asterisk one, he/she is
providing Asterisk with the "TO" field of calee URI. So, Asterisk tries to
locate the authentication for that user (calee) and this is the point.
This just worked!
K. Aasaraai