[asterisk-dev] [Code Review] func_srv and explicit specification of destination for SIP outgoing INVITEs

Philip A. Prindeville philipp_subx at redfish-solutions.com
Sat Apr 10 11:38:49 CDT 2010


On 04/09/2010 08:35 AM, Mark Michelson wrote:
>
>   
>> On 2010-04-07 17:23:10, Tilghman Lesher wrote:
>>     
>>> Looking good!  Don't forget to add a note to the CHANGES file.
>>>       
> Thanks! I updated CHANGES and will be committing shortly.
>
>
> - Mark
>
>   

On the same vein, it would be handy to have a patch which allows setting
a channel variable that gives URI on an outbound call.

I noticed in:

https://issues.asterisk.org/view.php?id=17058

for instance that outbound Freenum calls have my IP address as the
domain, not the DNS name that my ISN number maps to.

It might be useful to allow something like:

 [global]
 ...
 FREENUMDOMAIN=redfish-solutions.com
 ...

 [outbound-freenum2]
 exten => _X!,1,NoOp(EXTEN ${EXTEN})
 ; make sure the suffix is all digits as well
 same => n,Set(SUFFIX=${CUT(EXTEN,*,2-)})
 same => n,GotoIf($["${FILTER(0-9,${SUFFIX})}" != "${SUFFIX}"]?i:)
 same => n,Set(TIMEOUT(absolute)=10800)
 same => n,Set(isnresult=${ENUMLOOKUP(${EXTEN},sip,,1,freenum.org)})
 same => n,GotoIf($["${isnresult}"!=""]?:notfound)
+same => n,Set(SIPFROMUSER=${CALLERID(num)})
+same => n,Set(SIPFROMDOMAIN=${GLOBAL(FREENUMDOMAIN)})
 same => n,Dial(SIP/${isnresult},40)
 same => n,Goto(fn-${DIALSTATUS})


and have the call go out as:

From: "Philip Prindeville" <sip:111 at redfish-solutions.com>

but it goes out instead as <sip:111 at N.N.N.N>

I was looking at create_addr_from_peer() and sip_call() and thought this
was what happens, but it doesn't seem to be according to the SIP
debugging output.

(There's currently no SIPFROMUSER variable...)




More information about the asterisk-dev mailing list