To properly bill my customers, the From field in the SIP header has to be set accordingly. The correct value is setup in my database, and the callfile is dynamically created by a PHP script that is run as webservice.
My SIP Invite Header begins like this:
INVITE sip:+myphonenr@mysiptrunk SIP/2.0 Via: SIP/2.0/UDP [-- cut --] From: "Anonymous" <sip:myphonenr@mysiptrunk>;tag=[-- cut --]
I want the “From:” Field to look like this:
From: customerphonenr <sip:myphonenr@mysiptrunk>;tag=...
This should be possible to be controlled by the callfile. As far as I understand, this is a pre-call setting and must therefore be in the callfile, the dialplan is too late within the flow.
What I have done so far: My callfile has lines like these:
Setvar:CALLERID(name)="Test customer" Setvar:CALLERID(num)=customerphonenr
also with num, name-pres and num-pres. Nothing worked.
What do I have to set there? If this really does not work, billing can also be done by use of the field P-Preferred-Identity - which I also tried with no success, the field did not appear in the header. According to Stackexchange,
Setvar: __SIPADDHEADER1=X-Preferred-Identity: customerphonenr