Hi

I'm struggling with setting up SIP domains.

If I specify a domain and a context in [general], that context overrides any set in type=peer blocks elsewhere. This results in incoming calls from PSTN gateways I use arriving in the wrong context.

If I don't specify a context (which the docs I've found suggest is valid), then I get:

2006-05-12 07:36:16 WARNING[95290]: chan_sip.c:12539 reload_config: Empty context specified at line 43 for domain 'domain.com'

and the domain does not appear when I do a sip show domains. It isn't recognised as local, CHECKSIPDOMAIN doesn't do what I want and calls I want are rejected.

If I specify autodomain=yes, then the IP address and canonical hostname of the box are added to the domain list, and sip show domains shows them with a context of (default). It would appear that for incoming calls from PSTN gateways at least this does what I want, in that the context specified in the type=peer block is the one used. However, I can find no way to add other domains to the list with this '(default)' context. I particularly want to add the domain name, rather than the host's FQDN, because my internal SIP clients are all configured to use this. At the moment, specifying any domain but not that means the clients can't register, specifying that domain with a context of 'incoming' means the internal clients can't make out bound calls, and using the context 'outbound' has huge security implications.

I'd like to get sip domains working if only because I'd like to change the difficult to maintain

exten => s,3,GoToIf($["${SIPDOMAIN}" : "${LOCALREGEX}"]?4:20)

in my dial plan to something like

exten => s,3,GoToIf($["${CHECKSIPDOMAIN(${SIPDOMAIN})}" = ""]?4:20)

I'm using Asterisk 1.2.7.1 on FreeBSD 5.4.
Thanks
--
Chris Hastie
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to