[Freeswitch-users] mod_xml_ldap compile issue.

2009-12-18 Thread Keith Laaks
Hi,

I am having an issue getting mod_xml_ldap to compile properly


making all mod_xml_cdr

making all mod_xml_ldap
Creating mod_xml_ldap.la...
/usr/bin/ld:
/home/keithl/freeswitch/freeswitch.trunk/libs/openldap-2.4.19/libraries/liblutil/liblutil.a(sasl.o):
relocation R_X86_64_32S against `.rodata' can not be used when making a
shared object; recompile with -fPIC
/home/keithl/freeswitch/freeswitch.trunk/libs/openldap-2.4.19/libraries/liblutil/liblutil.a:
could not read symbols: Bad value
collect2: ld returned 1 exit status
cat: .libs/mod_xml_ldap.log: No such file or directory
make[5]: *** [mod_xml_ldap.la] Error 1
make[4]: *** [all] Error 1
make[3]: *** [mod_xml_ldap-all] Error 1
make[2]: *** [all-recursive] Error 1

I notice the openldap library has been bumped up to .19 - not sure if that
may have anything to do with it.

At revision 15995 on a 2.6.31-15-generic Ubuntu x86_64 GNU/Linux notebook.

mod_ldap compiles OK, but mod_xml_ldap fails as per the above.

What am I doing working here ?

Best Regards

Keith













___
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


[Freeswitch-users] Adding headers to INFO messages for Advice of Charge on SNOM

2009-11-23 Thread Keith Laaks



Hi,

I have tried maintaining charging information on a SNOM 300's display
using 'display' - but found that the phone has some timer, whereby every
60 seconds it wipes out whatever happens to be on the display at that
time and replaces is with the dialled number. So not a viable option as
it impacts usability. Really annoying when the display was just updated 
with valuable information for the user and a split second later it gets
replaced. 
[If somebody knows how to disable this behaviour - please do tell...] 

I see that SNOM supports a number of features for Advice of Charge.

>From their Wiki: 

http://wiki.snom.com/Advice_of_charge_%28AOC%29_in_SIP
Example of an SIP-Info Message:

-
INFO sip:b...@snom.com SIP/2.0
From: ;tag=5354n3
To: ;tag=33rfh3
CSeq: 23423 INFO
Call-ID: 3452tw43dt354dm03
AOC: charging;state=active;
 charging-info=currency;
 currency=EUR;
 amount=2000;
 multiplier=0.001
Content-Length: 0
- 

So the question - Is there some method available today to add these additional
 'new' headers to an INFO message I can send out to these phones?

If not, I guess it's a matter of looking at enhancing the "case 
SWITCH_MESSAGE_INDICATE_DISPLAY" section in mod_sofia.c ?


Best Regards

Keith







___
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


[Freeswitch-users] Calls dropping on SIP timer expiry due to UPDATE's being ignored.

2009-10-21 Thread Keith Laaks
Hi,

Hope someone knows how I am able to get around this one. Here goes...

Did an upgrade to trunk (from a July vintage build) last week and
noticed calls out to a provider were now failing after about 30 seconds
or so - post answer. Tried latest (15183) - same thing.

Analysing, I see that I have multiple UPDATE messages now being sent to
the provider, but no response being sent back to FS. So FS times out and
eventually kills the call.
Interestingly, it only drops the A-leg; the B-leg remains up till the B
party hangs up.

I cant recall seeing these UPDATE messages before...

The intent of the UPDATE seems to be to send the callee name & number to
the B-leg.

If its the provider's sip stack that's broken w.r.t. handling UPDATE -
is there any way to get around it by doing something in my config to
ensure these UPDATE's are not 'triggered' ?


Some traces below. 


Any suggestions welcomed...

Best Regards

Keith
Pretoria, South Africa.

--


send 1048 bytes to udp/[196.10.11.12]:5060 at 13:24:04.249269:


   INVITE sip:27835551...@196.10.11.12 SIP/2.0
   Via: SIP/2.0/UDP 10.17.10.10;rport;branch=z9hG4bKyQepDXQ5H8g5m
   Max-Forwards: 67
   From: "Keith PhoneADSL" ;tag=Upa3NvXpBB1eF
   To: 
   Call-ID: d821359d-38e7-122d-a38e-002264cc9b93
   CSeq: 121947386 INVITE
   Contact: 
   User-Agent: FreeSWITCH-mod_sofia/1.0.trunk-15183M
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, REGISTER,
REFER, UPDATE, NOTIFY
   Supported: timer, precondition, path, replaces
   Allow-Events: talk, refer
   Content-Type: application/sdp
   Content-Disposition: session
   Content-Length: 247
   X-Actually-Support: UPDATE
   Remote-Party-ID: "Keith PhoneADSL"
;party=calling;screen=yes;privacy=off
   
   v=0
   o=FreeSWITCH 1256118582 1256118583 IN IP4 10.17.10.10
   s=FreeSWITCH
   c=IN IP4 10.17.10.10
   t=0 0
   m=audio 12862 RTP/AVP 18 101
   a=rtpmap:18 G729/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-16
   a=silenceSupp:off - - - -
   a=ptime:20


2009-10-21 15:24:04.248448 [DEBUG] sofia.c:3493 Channel
sofia/vvrf/2783555 entering state [calling][0]
recv 601 bytes from udp/[196.10.11.12]:5060 at 13:24:04.307690:


   SIP/2.0 100 Trying
   Via: SIP/2.0/UDP 10.17.10.10;rport;branch=z9hG4bKyQepDXQ5H8g5m
   From: "Keith PhoneADSL" ;tag=Upa3NvXpBB1eF
   To: ;tag=GR52RWG346-34
   Call-ID: d821359d-38e7-122d-a38e-002264cc9b93
   CSeq: 121947386 INVITE
   Contact: "vprov C5CM" 
   User-Agent: FreeSWITCH-mod_sofia/1.0.trunk-15183M
   Allow-Events: talk
   Allow-Events: refer
   Content-Disposition: session
   X-Actually-Support: UPDATE
   Remote-Party-ID: "Keith PhoneADSL"
;party=calling;screen=yes;privacy=off
   Content-Length: 0
   


recv 879 bytes from udp/[196.10.11.12]:5060 at 13:24:08.508162:


   SIP/2.0 183 Session Progress
   Via: SIP/2.0/UDP 10.17.10.10;rport;branch=z9hG4bKyQepDXQ5H8g5m
   From: "Keith PhoneADSL" ;tag=Upa3NvXpBB1eF
   To: ;tag=GR52RWG346-34
   Call-ID: d821359d-38e7-122d-a38e-002264cc9b93
   CSeq: 121947386 INVITE
   Contact: "vprov C5CM" 
   User-Agent: FreeSWITCH-mod_sofia/1.0.trunk-15183M
   Allow-Events: talk
   Allow-Events: refer
   Content-Disposition: session
   X-Actually-Support: UPDATE
   Remote-Party-ID: "Keith PhoneADSL"
;party=calling;screen=yes;privacy=off
   Content-Type: application/sdp
   Content-Length:   233
   
   v=0
   o=Clarent 152602 152603 IN IP4 196.10.11.15
   s=Clarent C5CM
   c=IN IP4 196.10.11.15
   t=0 0
   m=audio 5230 RTP/AVP 18 101
   a=rtpmap:18 G729/8000
   a=ptime:20
   a=fmtp:18 annexb=no
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-15


2009-10-21 15:24:08.507506 [DEBUG] sofia.c:3493 Channel
sofia/vvrf/2783555 entering state [proceeding][183]
2009-10-21 15:24:08.507506 [DEBUG] sofia.c:3500 Remote SDP:
v=0
o=Clarent 152602 152603 IN IP4 196.10.11.15
s=Clarent C5CM
c=IN IP4 196.10.11.15
t=0 0
m=audio 5230 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20

2009-10-21 15:24:08.507506 [DEBUG] sofia_glue.c:3144 Audio Codec Compare
[G729:18:8000:20]/[G729:18:8000:20]
2009-10-21 15:24:08.508561 [DEBUG] sofia_glue.c:2102 Set Codec
sofia/vvrf/2783555 G729/8000 20 ms 160 samples
2009-10-21 15:24:08.508561 [DEBUG] sofia_glue.c:3104 Set 2833 dtmf
payload to 101
2009-10-21 15:24:08.508561 [DEBUG] sofia_glue.c:2336 AUDIO RTP
[sofia/vvrf/2783555] 10.17.10.10 port 12862 -> 196.10.11.15 port
5230 codec:

Re: [Freeswitch-users] Ringback when running G729 codec

2009-09-30 Thread Keith Laaks
Hi,

I am testing a trunk version from the weekend and have moved configs
over from a box pre 1.04. Looks like Rev: 15011, but the box was built
by someone else - so not 100% certain of exact number.

With :




I am not getting ringback after the 'pre_answer'.

Was testing with G722 and G729 on the inbound leg.

I wonder if it's related to this?

Best Regards

Keith




On Fri, 2009-09-25 at 13:30 -0500, Anthony Minessale wrote:
> fixed in latest trunk,
> please test
> thank you
> 
> On Fri, Sep 25, 2009 at 6:17 AM, Hound Dog  wrote:
> Hi,
> 
> very happy with freeswitch as a PBX/softswitch/SBC system its
> working solidly for a few weeks now  - just great
> 
> 
> I have a question regarding ringback tones - custom or regular
> - I cant get freeswitch to send ringback using G729 
> 
> I used the following settings ( it will just play one of the
> IVR prompts as ringback (filename
> ivr-to_repeat_these_options)  - I took it from the G729
> encoded files package , it has PCMA , G729 G723 extensions ) 
> 
>  
>  expression="^4420885767(0\d)$">
>  
> data="ringback=/usr/local/freeswitch/sounds/en/us/callie/raw_files/ivr/ivr-to_repeat_these_options"/>
>  data="instant_ringback=true"/>
> 
> 
>  
> 
> when I call with  G711 enabled , it plays the file no problems
> - see log 
> 
> 2009-09-25 11:29:58.641361 [DEBUG] sofia.c:3289 Channel
> sofia/external/442078562...@80.80.80.80 entering state
> [early][183]
> 2009-09-25 11:29:58.641361 [DEBUG] switch_core_session.c:630
> Send signal sofia/external/442078562...@80.80.80.80 [BREAK]
> 2009-09-25 11:29:58.641361 [DEBUG] switch_ivr_originate.c:1718
> Raw Codec Activation Success l...@8000hz 1 channel 20ms
> 2009-09-25 11:29:58.641361 [DEBUG] switch_ivr_originate.c:1745
> Play Ringback File
> 
> [/usr/local/freeswitch/sounds/en/us/callie/raw_files/ivr/ivr-to_repeat_these_options.PCMA]
> 2009-09-25 11:29:58.641361 [INFO] mod_native_file.c:82 Opening
> File
> 
> [/usr/local/freeswitch/sounds/en/us/callie/raw_files/ivr/ivr-to_repeat_these_options.PCMA]
>  8000hz
> 2009-09-25 11:29:58.889369 [DEBUG] sofia.c:3289 Channel
> sofia/internal/sip:1...@82.80.131.233:40505 entering state
> [proceeding][180]
> 
> 
> when I call with G729 only  - I get silence , and freeswitch
> only send the comfort noise packet and no RTP , see log 
> 
> 2009-09-25 11:28:57.437537 [DEBUG] sofia.c:3289 Channel
> sofia/external/442078562...@80.80.80.80 entering state
> [early][183]
> 2009-09-25 11:28:57.437537 [DEBUG] switch_core_session.c:630
> Send signal sofia/external/442078562...@80.80.80.80 [BREAK]
> 2009-09-25 11:28:57.685536 [DEBUG] sofia.c:3289 Channel
> sofia/internal/sip:1...@82.80.131.233:40505 entering state
> [proceeding][180]
> 2009-09-25 11:28:57.685536 [NOTICE] sofia.c:3353 Ring-Ready
> sofia/internal/sip:1...@82.80.131.233:40505!
> 
> mod_native_file  works well for me when used in applications
> and plays G729 files no problem 
> 
> any ideas why is that happening , any suggestions on how to
> resolve ?
> 
> thanks
> Ori
> 
> 
> 
> 
> 
> ___
> FreeSWITCH-users mailing list
> FreeSWITCH-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> 
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
> 


___
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Async JS functions?

2009-07-31 Thread Keith Laaks
Hi Nicolas,

 

I wonder if session.execute( "sched_broadcast"", "+1 /path/file.wav
aleg") followed immediately by your 'new Session' and 'bridge' would do
the trick ?

Not sure if/how "sched_broadcast" functions when the call has not yet
been bridged though...

 

Let us know..

 

Best Regards

 

Keith

 

 

From: freeswitch-users-boun...@lists.freeswitch.org
[mailto:freeswitch-users-boun...@lists.freeswitch.org] On Behalf Of
Nicolas Brenner
Sent: 30 July 2009 20:31
To: freeswitch-users@lists.freeswitch.org
Subject: [Freeswitch-users] Async JS functions?

 

Hi,

I have a small JS script that calls a phonenumber, when the call is
answered it plays a wave file, then it calls a second phonenumber and
bridges the calls. Is it possible to make wave-playing async, so that
the second call is generated as soon as the first is picked up? Right
now the wave file takes about 2 secs to play, but I need to extend that
time, and I don't want to delay the second call.

Thanks!

Nicolas

___
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Distortion on approx first 200ms of G722prompts on DECT based CPE

2009-07-28 Thread Keith Laaks
Hi, [Thanks for the advice Anthony]

 

I tried "send_silence_when_idle=true " and restarted, but did not notice
any change/improvement. 

But I had limited time to test, so will need to test more thoroughly
with this CPE. 

 

An additional test was to configure the following media path scenarios:

A: Policom<->FS<->DECT CPE

B: Policom<->DECT CPE (media not via FS)

[The only change was to add )

 

In scenario A, whenever the Policom's VAD kicked in, it resulted in the
first 200ms of the restarting audio being distorted in the DECT CPE.

In scenario B, no problems when the Policom's VAD kicked in.

 

I also addressed the issue to the CPE vendor yesterday, who responded
today :

"We have observed the RTP-stream and found the following :

 

- the RTP-stream is completely interrupted in the pause between the
announcements

- no RTP-packets are send at all during these pauses 

- jitter buffer runs empty and our device will automatically mute the
connection when no packets comes in 

- last RTP-packets before pauses don't contain the info about
comfort-noise 

We would like to ask you the following : 

- please check if it's possible to send dummy-packets during pause
instead of sending no packets at all

"

 

In scanning the wiki on the topic of CNG, I found at
http://wiki.freeswitch.org/wiki/VAD_and_CNG :

"In FreeSWITCH the CNG options select whether or not FreeSWITCH will
generate CN RTP packets. suppress-cng sofia profile option and
suppress_cng channel variable used to set of this setting. When both
sides are supporting RFC3389 (they agree in SDP message exchange,
rtpmap:13), FreeSWITCH will send CN packets. Note: Allowing CNG in
FreeSWITCH does not mean it will generate any comfort noise into the
media channel. 

 

In case one of the parties in bridge do not handle VAD and asynchronous
RTP media, there should be an issue as the one might think hearing
perfect silence and might think the connection has been dropped. Another
example is when on one side is Asterisk or CallWeaver.

For handling these endpoints, there has been added (r9543) a new channel
variable: bridge_generate_comfort_noise which will generate fake audio"

 

So the options here seem to be :

a)  Get FS to send CNG packet(s) before going into 'pauses'. From
the vendor's analysis they are not seeing this when testing (FYI, these
observations were made calling into vmail). Could this be because the
CPE is perhaps not supporting RFC3389 - FS did not see the rtpmap:13 in
the SDP ?

b)  Make sure FS keeps sending packets during pauses and silence. I
am not clear on the difference between the 'send_silence_when_idle=true'
and 'bridge_generate_comfort_noise=true' options. 

 

Ideally I would still want to leverage VAD, but then need the CNG
messages to be forwarded in scenarios where I have media passing through
FS on a call between two customers and when a customer is interacting
with vmail (or other IVR type application).

 

Any advise appreciated.

 

Best Regards

 

Keith

 

 

From: freeswitch-users-boun...@lists.freeswitch.org
[mailto:freeswitch-users-boun...@lists.freeswitch.org] On Behalf Of
Anthony Minessale
Sent: 28 July 2009 02:06
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Distortion on approx first 200ms of
G722prompts on DECT based CPE

 

you can set the global var send_silence_when_idle=true in vars.xml



On Mon, Jul 27, 2009 at 4:23 PM, Keith Laaks wrote:

Hi All,

 

I am testing a range of G722 capable DECT based CPE.

With one range, I have noticed that the first 200ms or so of each
separate prompt file being played back is played out distorted from the
DECT handset.

When having a normal conversation, the quality is excellent, but when
accessing your vmail, all the individual audio files making up the menu
choices exhibit the distortion, which is pretty annoying.

The same unit using G729, alaw or ulaw works 100%.

 

I wonder if anybody else has uncounted this issue?

 

My guess at this point -

There may be a short break in the RTP between the separate files being
played out by FS that makes up any menu. 

During this time the DECT handset's AGC probably goes to MAX
amplification (as its not receiving any input during the short break in
RTP).

Then, when the RTP returns at the start of the next file, the AGC boosts
the audio into clipping zone and takes 200ms to dampen down back to
normal good levels.

 

Looks like in these devices the G722 encode/decode is actually done in
the DECT handset and not the voip-base unit.

 

Is there any parameter that can be set in FS to ensure that the RTP
keeps flowing, sending 'silence' between prompts ? Would be interesting
to validate the above 'guess'.

 

 

Best Regards

 

Keith

 


___
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http:/

[Freeswitch-users] Distortion on approx first 200ms of G722 prompts on DECT based CPE

2009-07-27 Thread Keith Laaks
Hi All,

 

I am testing a range of G722 capable DECT based CPE.

With one range, I have noticed that the first 200ms or so of each
separate prompt file being played back is played out distorted from the
DECT handset.

When having a normal conversation, the quality is excellent, but when
accessing your vmail, all the individual audio files making up the menu
choices exhibit the distortion, which is pretty annoying.

The same unit using G729, alaw or ulaw works 100%.

 

I wonder if anybody else has uncounted this issue?

 

My guess at this point -

There may be a short break in the RTP between the separate files being
played out by FS that makes up any menu. 

During this time the DECT handset's AGC probably goes to MAX
amplification (as its not receiving any input during the short break in
RTP).

Then, when the RTP returns at the start of the next file, the AGC boosts
the audio into clipping zone and takes 200ms to dampen down back to
normal good levels.

 

Looks like in these devices the G722 encode/decode is actually done in
the DECT handset and not the voip-base unit.

 

Is there any parameter that can be set in FS to ensure that the RTP
keeps flowing, sending 'silence' between prompts ? Would be interesting
to validate the above 'guess'.

 

 

Best Regards

 

Keith

 

___
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Freeswitch taking too long to start up

2009-06-02 Thread Keith Laaks
Hi,

 

Try starting using the -nonat  switch.  

 

Best Regards

 

Keith 



 

From: Muhammad Shahzad [mailto:shaherya...@googlemail.com] 
Sent: 02 June 2009 14:39
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Freeswitch taking too long to start up

 

Yes, this resolves the problem.

Thank you.



On Tue, Jun 2, 2009 at 5:27 PM, dujinfang  wrote:

Actually Brain mentioned that you can comment out switch_nat_init(); in 
switch_core.c

 

On Jun 2, 2009, at 7:08 PM, Nik Middleton wrote:

As I understand it, a new ‘feature’ was added over the weekend to 
resolve NAT.  If you’re firewall is not allowing ICMP then FS waits until it 
times out.  At this time there is no option to disable it.

 

Regards

 

 





From: freeswitch-users-boun...@lists.freeswitch.org 
[mailto:freeswitch-users-boun...@lists.freeswitch.org] On Behalf Of Muhammad 
Shahzad
Sent: 02 June 2009 11:40
To: freeswitch-users@lists.freeswitch.org
Subject: [Freeswitch-users] Freeswitch taking too long to start up

 

Hi,

I have just upgraded Freeswitch from svn revision 12432 to 13544. I am 
using 32bit CentOS 5.3, "make current" command completes successfully without 
any errors but when i start freeswitch it take considerable time (roughly 90 - 
120 seconds) to start up. During this time no message is display on console. 
Once successfully started, it works fine. However, this initial delay is really 
annoying. Is there anyway to reduce/remove this delay?

Thank you.


-- 
Muhammad Shahzad
---
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_78...@hotmail.com
Email: shaherya...@googlemail.com

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

 


___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




-- 
Muhammad Shahzad
---
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_78...@hotmail.com
Email: shaherya...@googlemail.com

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Javascript, Hanguphooks, CDRs and User Variables.

2009-03-31 Thread Keith Laaks
Hi,

 

Here is what I am trying to accomplish:

 

//--- completecall.js trigged via api_hangup_hook 

 

use("CURL");

 

const loglevel='notice';

var uuid = request.getHeader("Core-UUID");

var billmsec = request.getHeader("billmsec");

var urlrequest = "UUID=" + uuid + "&billmsec=" + billmsec;

 

function reply_callback(string, arg) {

  string = string.substring(string.search("API")+3);

  string = string.substring(0,string.search("<"));

  var splits = string.split("~");

  var i = 0;

  var length = splits.length;

  for (i=0; i < length; i++) {

var fv=splits[i].split("=");

console_log(loglevel, "setting: " + fv[0] + " = " + fv[1] + "\n");

//session.setVariable(fv[0],fv[1]); // Cant use set here as the
session is dead by now - the call has been terminated

  }

  return true;

}

 

var curl = new CURL();

console_log(loglevel,"-- completecall.js ->" + url + "?" + urlrequest +
"\n");

 

var env = request.dumpENV("text");  // debug

console_log("ENV:\n", env + "\n"); // debug

 

curl.run("POST", "http://127.0.0.1:10502/rate";, urlrequest,
reply_callback, "CBrate\n");

//returns string like APIcharge=10.20

 

exit();

 

 

So the trick is that I am accessing an external system via CURL where
the call rate is calculated and returned (based on the call duration and
uuid). 

Now I need to use a 'setVariable' to get it back as one of the
parameters that the cdr module can write out for me.

Note that in the above, the external system will return 'charge=value'. 

I need to set the variable 'charge' to the value in 'value'.

Then using the config below, 'charge' can be written out as one of the
cdr fields.

 

 



  

















  

  

 "${accountcode}","${billsec}","${charge}","${sip_req_user}","
${hangup_cause}","${uuid}","${bleg_uuid}"

  



 

 

 

Best Regards

 

Keith

 

 

From: Anthony Minessale [mailto:anthony.miness...@gmail.com] 
Sent: 31 March 2009 00:13
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Javascript, Hanguphooks,CDRs and User
Variables.

 

in your script called via api_hangup_hook:

var env = request.dumpENV("text");

consoleLog("info", env);

all those vars are there for you, you can get the individually with 
var hval = request.getHeader("some_header");



2009/3/30 Keith Laaks 

Hi,

 

I have an application where my Javascript hanguphook code calculates a
value (e.g. the cost of the call which can only be calculated post
hangup) and I need to have that value appear as a field in the cdrs.

 

As the 'session' object is no longer available for javascript logic post
hangup, I can't figure out how to 'set' a user variable post hangup,
such that it can be written to the cdr when the state changes from
CS_HANGUP -> CS_REPORTING.  Maybe it's just not possible..? It would
be a pity to have to resort to writing out cdrs from the javascript
itself and duplicating what fs does so well already.

 

Any advice / suggestions would be appreciated.

 

Best Regards

 

Keith

 


___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_miness...@hotmail.com
<mailto:msn%3aanthony_miness...@hotmail.com> 
GTALK/JABBER/PAYPAL:anthony.miness...@gmail.com
<mailto:paypal%3aanthony.miness...@gmail.com> 
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:8...@conference.freeswitch.org
<mailto:sip%3a...@conference.freeswitch.org> 
iax:gu...@conference.freeswitch.org/888
googletalk:conf+...@conference.freeswitch.org
<mailto:googletalk%3aconf%2b...@conference.freeswitch.org> 
pstn:213-799-1400

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


[Freeswitch-users] Javascript, Hanguphooks, CDRs and User Variables.

2009-03-30 Thread Keith Laaks
Hi,

 

I have an application where my Javascript hanguphook code calculates a
value (e.g. the cost of the call which can only be calculated post
hangup) and I need to have that value appear as a field in the cdrs.

 

As the 'session' object is no longer available for javascript logic post
hangup, I can't figure out how to 'set' a user variable post hangup,
such that it can be written to the cdr when the state changes from
CS_HANGUP -> CS_REPORTING.  Maybe it's just not possible..? It would
be a pity to have to resort to writing out cdrs from the javascript
itself and duplicating what fs does so well already.

 

Any advice / suggestions would be appreciated.

 

Best Regards

 

Keith

 

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


[Freeswitch-users] Module Mod Native File - How to handle multiple rates under the same codec.

2009-03-16 Thread Keith Laaks
Hi,

 

To minimize/eliminate transcoding, I am using mod native file, with a
set of transcoded prompts with the appropriate set of file extensions. 

Everything works as advertised when using the traditional codecs such as
pcma, g729, gsm.

 

But speex support is a bit of a challenge. 

 

Freeswitch supports: sp...@8000h@20i,  sp...@16000h@20i,
sp...@32000h@20i.

 

When I setup calls using these various codec flavors, I can see using
info (and of course detect by ear) that indeed the call is running at
the different 'rates'.

I see that regardless of which one I use, the "variable_read_codec" and
"variable_write_codec" remains "SPEEX", but depending on the flavor, a
"variable_read_rate" and "variable_write_rate" of either 8000,16000 or
32000.

 

But when I try play a file when in 16000 or 32000, I get:

 

2009-03-15 16:31:13 [INFO] mod_native_file.c:81 native_file_file_open()
Opening File
[/usr/local/freeswitch/sounds/en/us/callie/all/16000/SUCCESS.SPEEX]
8000hz

2009-03-15 16:31:13 [WARNING] switch_core_file.c:119
switch_core_perform_file_open() Sample rate doesn't match.

 

I created my SPEEX files using: speexenc -w   
(note the -w option for 16kHz wideband)

 

So, even though the call is setup using a wideband 16kHz codec, it
appears that mod native file is expecting a 8kHz file for all the SPEEX
flavors.

 

What am I missing here? Is this module limited to 8KHz rates?  I am on
1.0.trunk (12530M).

 

I have not yet looked at these codecs:  g7...@16000h,  g7...@32000h,
c...@32000h,  c...@48000h, but as these also have multiple rates for the
same codec - I expect same issue.

 

I am using ${ variable_read_rate } in the filename path, so fs looks at
a set of files encoded with a matching sample rate.

 

But looks like it's always looking for a 8KHz file.

 

If you have had any experience with this, please let me have your
advice.

 

Thanks

Keith

 

 

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


[Freeswitch-users] Core Dump on receiving a call from device with 'broken' G.722 codec.

2009-03-16 Thread Keith Laaks
Hi,

 

I am on fs 1.0.trunk (12530M) testing G.722 and found that when using a
'broken' configuration from a softphone configured for G.722,  I get the
warning on the cli:

 

"We were told to use ptime 20 but what they meant to say was 820

This issue has so far been identified to happen on the following broken
platforms/devices:

Linksys/Sipura aka Cisco

ShoreTel

Sonus/L3

We will try to fix it but some of the devices on this list are so broken
who knows what will happen..

"

when fs gets the invite, but then does a core dump when it tries to:

 



 

 

Below are some of the traces and info output from before the core dump
happens.

 

I see this when I run gdb on the dumpfile.

 

#0  0xb7e194d4 in switch_ivr_originate (session=0xb74640a8,
bleg=0xb572b0b0, cause=0xb572b0ac, bridgeto=0xb74a1b18
"sofia/voxwan/8154%172.16.1.3", timelimit_sec=30,

table=0xb7efcfc0, cid_name_override=0x0, cid_num_override=0x0,
caller_profile_override=0x0, ovars=0x0, flags=) at
src/switch_ivr_originate.c:1609

1609if
(switch_core_codec_init(&write_codec,

 

(gdb) frame 1

#1  0xb6df48f5 in ?? () from /usr/local/freeswitch/mod/mod_dptools.so

 

 

I wonder if anybody else has seen this behavior? 

 

This happens when the destination phone is also  G.722 capable
(policom). 

If I change the "frame per packet" setting in the  softphone to 2 - All
works OK (but the default is 1 - so cant risk allowing G.722 if it's
going to core dump fs if a user make a wrong configuration)

 

 

Best Regards

 

Keith

 

 


*

 

 

2009-03-16 14:37:58 [NOTICE] switch_channel.c:592
switch_channel_set_name() New Channel
sofia/sprof1/27879998...@196.99.88.77
[47e0c972-1227-11de-8b8e-1789e43c417d]

 

<.>

 

2009-03-16 14:37:58 [INFO] mod_sofia.c:1310 sofia_receive_message()
Asked to send early media by sofia/sprof1/27879998...@196.99.88.77

2009-03-16 14:37:58 [NOTICE] sofia_glue.c:2245 sofia_glue_tech_media()
Pre-Answer sofia/sprof1/27879998...@196.99.88.77!

2009-03-16 14:37:58 [INFO] mod_sofia.c:1351 sofia_receive_message() Ring
SDP:

v=0

o=FreeSWITCH 1237190146 1237190147 IN IP4 196.99.88.77

s=FreeSWITCH

c=IN IP4 196.99.88.77

t=0 0

m=audio 16932 RTP/AVP 9 101

a=rtpmap:9 G722/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=silenceSupp:off - - - -

a=ptime:20

a=sendrecv

 

2009-03-16 14:37:58 [INFO] switch_rtp.c:1441 rtp_common_read() Auto
Changing port from 172.16.0.63:29081 to 196.22.33.44:10634

 

2009-03-16 14:37:59 [NOTICE] checktalktime.js:1 console_log() --
checktalktime.js --

 

<.. In this js I do http call to collect maximum talktime allowed ..>

 

2009-03-16 14:37:59 [NOTICE] checktalktime.js:1 console_log()
schedparms=+3600 tbhangupwarn XML hangupwarn

2009-03-16 14:37:59 [NOTICE] switch_ivr.c:1345
switch_ivr_session_transfer() Transfer
sofia/sprof1/27879998...@196.99.88.77 to xml[27879998...@e164route]

2009-03-16 14:37:59 [INFO] mod_dialplan_xml.c:252 dialplan_hunt()
Processing MeMe->27879998154 in context e164route

2009-03-16 14:37:59 [INFO] mod_dptools.c:945 info_function()
CHANNEL_DATA:

Event-Name: [CHANNEL_DATA]

Core-UUID: [e57400ea-1223-11de-8b8e-1789e43c417d]

FreeSWITCH-Hostname: [myfsbox]

FreeSWITCH-IPv4: [196.99.88.77]

FreeSWITCH-IPv6: [::1]

Event-Date-Local: [2009-03-16 14:37:59]

Event-Date-GMT: [Mon, 16 Mar 2009 12:37:59 GMT]

Event-Date-Timestamp: [1237207079387869]

Event-Calling-File: [mod_dptools.c]

Event-Calling-Function: [info_function]

Event-Calling-Line-Number: [941]

Channel-State: [CS_EXECUTE]

Channel-State-Number: [4]

Channel-Name: [sofia/sprof1/27879998...@196.99.88.77]

Unique-ID: [47e0c972-1227-11de-8b8e-1789e43c417d]

Call-Direction: [inbound]

Presence-Call-Direction: [inbound]

Answer-State: [early]

Channel-Read-Codec-Name: [G722]

Channel-Read-Codec-Rate: [16000]

Channel-Write-Codec-Name: [G722]

Channel-Write-Codec-Rate: [16000]

Caller-Username: [27879998182]

Caller-Dialplan: [XML]

Caller-Caller-ID-Name: [MeMe]

Caller-Caller-ID-Number: [27879998182]

Caller-Network-Addr: [196.22.33.44]

Caller-Destination-Number: [27879998154]

Caller-Unique-ID: [47e0c972-1227-11de-8b8e-1789e43c417d]

Caller-Source: [mod_sofia]

Caller-Context: [e164route]

Caller-RDNIS: [27879998154]

Caller-Channel-Name: [sofia/sprof1/27879998...@196.99.88.77]

Caller-Profile-Index: [4]

Caller-Profile-Created-Time: [1237207079387869]

Caller-Channel-Created-Time: [1237207078659653]

Caller-Channel-Answered-Time: [0]

Caller-Channel-Progress-Time: [0]

Caller-Channel-Progress-Media-Time: [1237207078679638]

Caller-Channel-Hangup-Time: [0]

Caller-Channel-Transfer-Time: [0]

Caller-Screen-Bit: [true]

Caller-Privacy-Hide-Name: [false]

Caller-Privacy-Hide-Number: [false]

variable_sip_received_ip: [196.22.33.44]

variable_sip_received_port: [36745]

variable_sip_via_protocol: [udp]

variable_sip_author