Identification of SIP channel originator

lenday
Joined: Sun 10 of Aug, 2008

Re: Identification of SIP channel originator

Posted:Sun 10 of Aug, 2008 (20:34 UTC)
I somehow stumbled across

http://www.voip-info.org/wiki/view/Asterisk+tips+SIP+URI+Dial

It has the solution. Don't know why I didn't see it before or exactly how I found it this time :).

One thing that I didn't really get from the sip.conf page was how definitions in the [authentication] section relate to user registrations and to incoming calls. But they do...

Len
lenday
Joined: Sun 10 of Aug, 2008

Identification of SIP channel originator

Posted:Sun 10 of Aug, 2008 (02:52 UTC)
This is my first ast server but I've got most everything working. But I've been stumped by one thing and I've been digging all day and haven't found the answer. Seems like this shouldn't be hard, I must be overlooking something.

I have a number of sip users and I'd like for them to be able to receive calls (allowguest=yes) and I'd also like for them to be able to use my hard lines to dial out. But I don't want to provide free phone service to the entire world...

I set up pattern matched numeric extensions in my sip context in extensions.conf but they can be called from outside my server and I haven't found a way to limit it to my users.

I have found no way to tell if an incoming SIP call originated from my server. The SIP header FROM has the info but this can probably be forged?

Can I

- Find out the IP address where an incoming SIP call came from? or
- Find out if an incoming SIP call originated from someone currently registered on my server?
- Somehow get these numeric addresses into a different sip friend and context if their IP matches mine?
- Solve the problem some other way?

Or is this something that can't be done and I need to bring up a separate SIP server?

TIA,
Len Day