[Users] cpl scripts and pstn gateway authentication

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Nov 15 13:06:38 CET 2005

Hi Günther,

if you do serial forking by using cpl, is quite difficult to set and add 
any specific header to advertised the party to be billed - and this is 
due the encapsulation of the cpl interpreter : once you started, you 
have your hands off the execution and you cannot control it or attach 
additional stuff to it.

indeed,  a small possibility is by setting a script route to be executed 
just before cpl forwards a request:
it will help you to make last changes on the request - adding headers, 
etc. But the remaining problem is to actually set the URI to be billed 
during cpl execution. Each time the cpl does a serial fork, it will have 
to update that URI...I thing this is the missing piece.

If you use only scripting, you have full flexibility :).


Günther Starnberger wrote:

> hello,
> what is the usual method to use the cpl module when a pstn gateway 
> needs to know which user is responsible a call?
> e.g. i have a pstn gateway pstn.example. numbers are dialed by 
> specifying them as user part of a sip uri => 00321234 at pstn.example. as 
> the gateway is an asterisk box i'm rather flexible in choosing a 
> method which specifies how the name of the remote-user is transfered 
> to the gateway.
> if a user does a forward to the pstn (e.g. in the case of no-answer) 
> he should also be accounted for the call - so i either need to set the 
> 'From' header to the owner of the cpl script or i need to add another 
> header like 'X-account' which specifies the owner.
> a solution for this seems to be to store the name of the callee in an 
> AVP before executing the script and to set the From field in 
> proxy_route after the script has started.
> are there better or more-standard solutions for this problem?
> bye,
> /gst
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users

More information about the Users mailing list