[Asterisk-Users] Asterisk as SIP Proxy

Olle E. Johansson oej at edvina.net
Sat Nov 29 11:23:17 MST 2003


ranga wrote:

> Olle,
> 
> These are the two lines that I added to extensions.conf.
> 
> exten => evaro,1,Dial(SIP/${EXTEN}@${SIPDOMAIN})
> exten => john,1,Dial(SIP/${EXTEN}@192.168.68.6)
> 
> I called sip:evaro at 192.168.68.6 first and then sip:john at 192.168.68.6. Here
> is the console catpure.
> 
>     -- Executing Dial("SIP/sridhar-3076", "SIP/evaro@") in new stack
> WARNING[1217603008]: File chan_sip.c, Line 749 (create_addr): No such host:
> NOTICE[1217603008]: File app_dial.c, Line 516 (dial_exec): Unable to create
> channel of type 'SIP'
>   == Everyone is busy at this time
> WARNING[1217603008]: File pbx.c, Line 1813 (ast_pbx_run): Timeout, but no
> rule 't' in context 'pandora'
>     -- Executing Dial("SIP/sridhar-a4ed", "SIP/john at 192.168.68.6") in new
> stack
>     -- Called john at 192.168.68.6
--cut--
> For some reason SIPDOMAIN is replacing blank. Am I doing any thing wrong?

You need to check the SIPDOMAIN early in the outgoing sip context for the
callee. I don't know your context here.
Also, please make sure you have an new CVS checkout, I don't know which version
you're running. Run 'grep SIPDOMAIN' in chan_sip.c to make sure it's there.

Here's what I do early in thte outgoing SIP context for clients:

;------------------------OUTGOING CALLS FROM SIP-------------------------
[sip-callers]

;----Match everything
exten =>_.,1,SetGlobalVar(sipto=${EXTEN})
exten =>_.,2,SetGlobalVar(sipdom=${SIPDOMAIN})
;Every extension will go here, including h, t, s
;Filter out hangups
exten =>_.,3,gotoif,$[${sipto} = h]?30|1:5|1

;---Test if external dial - on domain name
exten =>5,1,gotoif($[${SIPDOMAIN} = ${MYCURRENTDOMAIN}]?20,1:10,1)
;--------------------------------------------------------------------------

MYCURRENTDOMAIN is set early in extensions.conf to the servers SIP realm.

/Olle




More information about the asterisk-users mailing list