[asterisk-users] Domainname for outgoing uri-dialing

Bjoern Haje bhaje at gmx.de
Fri Feb 8 06:24:46 CST 2008


Hi,

I use outgoing URI-dialing for my sip-phones as suggested in
http://www.voip-info.org/wiki/view/Asterisk+tips+SIP+URI+Dial

The relevant extensions look like this:

[dial-uri] 
exten => _[a-z].,1,Macro(uridial,${EXTEN}@${SIPDOMAIN}) 
exten => _[A-Z].,1,Macro(uridial,${EXTEN}@${SIPDOMAIN}) 
exten => _X.,1,Macro(uridial,${EXTEN}@${SIPDOMAIN}) 

[macro-uridial] 
exten => s,1,Set(dialuri=${CUT(ARG1,\;,1)}) 
exten => s,n,Set(CALLERID(number)=${CALLERID(number)}@domain.com) 

exten => s,n,Dial(SIP/${dialuri},120,tr) 
exten => s,n,Congestion()

I end up with an outgoing SIP-Invite with contact and from-headers like
username at domain.com@<IP-address>

That obviously is not what I want. I can set the fromdomain value in the
general-part of my sip.conf and leave away the setting of the callerid
which fixes the problem. But as I want to use different domains for the
outgoing calls depending on the user, that is not a solution for me. Can
I influence the generation of the outgoing domainname somehow?

thanks for your help

Bjoern




More information about the asterisk-users mailing list