[Asterisk-Dev] Enum and Registrar

Olle E. Johansson oej at edvina.net
Sun Oct 3 23:40:25 MST 2004


Jens Kübler wrote:
> Hi
> 
> I spent some time today getting familiar with the chan_sip.c because I ran 
> into a problem with EnumLookup.
> 
> I configured enum to return sipextension at asteriskserver. I'm registering my 
> clients with asterisk so they are known to the server.
> 
> If I dial a number, it will be resolved to sipextension at asteriskserver and the 
> Dial process starts. Unfortunately asterisk detects an loop and cancels the 
> call. The INVITE uses the sipextension at asteriskserver instead of the 
> registered contact info available for that peer thus causing asterisk to call 
> itself.

> To solve this problem you would need to discover before or within the "DIAL" 
> that asterisk itself is responsible. You will need to search for the 
> corresponding struct sip_pvt which holds the "Contact" info and substitute 
> it.
> I think the check for a loop is the last place to substitute the 
> sipextension at asterisk as a lot of information has been set up already.
> 
> Is anyone aware of this problem or am I missing something here ?
Yes, it's a dialplan error, not an chan_sip error really.
You need to detect that the URI returned from ENUM is local and remove
the domain part before dialling.

Also, please note that SIP uri's are user at domain, not user at server.
When you mail me you mail user at domain, why not call that way? :-)

/O



More information about the asterisk-dev mailing list