Modify username and fromuser in [macro-dialout-trunk-predial-hook]

Is this possible - My carrier just switched to Acme SBC’s and the only way I can pulse out different caller ID’s is to either define an outbound trunk for each number (sucky!) or modify the username and fromuser on the fly - Is it possible to do this with [macro-dialout-trunk-predial-hook]? Has anyone done this?

I would think so, but I’m not sure. I’d think that setting these would work the same way they work for the other settings that get monkeyed with in that context.

You’re the first one that I can remember trying. Let us know how it goes. :slight_smile:

Hi @GSnover,

Try to set the P-Preferred-Indentity header in the macro-dialout-predial-hook context:

exten => s,1,SipAddHeader(P-Preferred-Identity:sip:${CALLERID(number)}@your_provider_domain) 
exten => s,n,MacroExit()

Thank you,

Daniel Friedman

I didn’t know about P-Preferred - That is a nice one- In this case, their Acme’s are not set up right yet, so it’s moot for now (Other Problems) - but I will keep this code in my knowledge base - I always like to know this stuff if it’s required.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.