Open zeventh opened 1 year ago
For this, you would have to create a Custom Context & use it!
Ok, I have done some research on how to forward a context to a different context, but really don't know how to make that work. For example if I add a new context in extensions_magnus.conf how do I forward this to billing extension? Should i set my custom context on the trunk in the web gui?
I found this issue https://github.com/magnussolution/magnusbilling7/issues/375 that looks like a similair question as mine, but in the end it wasn't solved.
I've tried using include and goto in extensions_magnus.conf but can't get it to work. How do I pass the custom SIPheader to the outbound call?
make a custom context in extensions.conf [customcontext] exten => _X.,1,Noop() exten => _X.,n,Set(cli2=${SIP_HEADER(Privacy: Id)}) exten => _X.,n,Goto(billing,${EXTEN},1) exten => _X.,n,Hangup()
this is what i understand you need
thank you @uzair329 I got it working with below context, I had to use SIPAddHeader on line 2.
[privacy]
exten => _X.,1,NoOp()
exten => _X.,n,SIPAddHeader(Privacy: id)
exten => _X.,n,Goto(billing,${EXTEN},1)
exten => _X.,n,Hangup()
make a custom context in extensions.conf [customcontext] exten => _X.,1,Noop() exten => _X.,n,Set(cli2=${SIP_HEADER(Privacy: Id)}) exten => _X.,n,Goto(billing,${EXTEN},1) exten => _X.,n,Hangup()
this is what i understand you need
@uzair329 please provide your number or email. need to get in touch with you.
anyone please guide me [privacy] exten => _X.,1,NoOp() exten => _X.,n,SIPAddHeader(Privacy: id) exten => _X.,n,Goto(billing,${EXTEN},1) exten => _X.,n,Hangup()
i have added this in magnus_extensions.conf and set context as privacy but cli is not passing
Is it possible to add a custom header on all outbound calls? I've tried to add in extensions.conf and also in mbilling.php but it doesn't seem to work. The custom header is needed for our supplier to set the call as a private number.
The custom SIP header should look like below.
Privacy: Id
And I believe the command should look like below in Asterisk config?