Skip to main content
Participant
May 4, 2013
Answered

FMG to Flashphone - No audio in outgoing stream

  • May 4, 2013
  • 1 reply
  • 1897 views

Hi everyone,

i'm currently working on a flash softphone and i'm currently able to route sip calls made to FMG to the flashphone

on a call i can hear fine the other end but the other end is not able to hear my microphone activity.

I've taken multiple steps to assure everything is going correctly clientside as follows:

Added an activity handler on the microphone : There is voice activity

When publishing the stream, i tried to publish with "record" and the recorded stream does include the voice activity

What i think is going on is that something on FMG side is not routing my call correctly maybe?

Here is the current workflow of my app:

I hit a "call me" button

the flash phone connects to FMS and asks for a phoneID

it gets the phoneID and by webservice initiates a sip call phoneID@FMG.ip

The FMG gets a sip call with that phoneID and routes it to the FMS which sends it back to the flashphone with an onLeg event

When receiving the onLeg event, the flashphone accepts the call (and also plays the incoming call with netstream.play()) and does two things, pushNewStream with the phoneID and a netstream.publish() with the phoneID

What i thought could be the problem is that when receiving the onLeg event from FMS, the stream name is not equal to phoneID but something like fmg/telephony/1, is that normal? or should it also be the phoneID?

Anyways if someone has an idea of what could be going on I would really appreciate it as i'm really going nuts here..

This topic has been closed for replies.
Correct answer mhaltali

Hi, i was able to resolve the issue!

for anyone in this scenario here's what was happening to me

I was first using an AMS & AMG 5 but downgraded to FMS & FMG 4.5 because of a bug in the AMG with DTMF

but my telephony app was using the AMG 5's TelephonyLib and this caused an error when communicating with the FMG 4.5

Too bad there wasn't a clearer message then "Invalid message received, dropped"

Anyways i hope this can save someone some time

1 reply

mhaltaliAuthor
Participant
May 16, 2013

I've made some progress on this,

from what i found the audio stream going from the FMG to the Flash player, there is two clients on it:

-1 publishing the stream (FMG)

-1 viewing the stream (Flash player)

But on the outgoing stream from flash player to FMG there is only one client:

-1 publishing the stream (Flash player)

Nobody is actually viewing the stream! The FMG is not registered to this stream and explains why no audio comes through the call from FLASH to PHONE.

But i cant figure out why, here are the FMG logs for the call

core.00.log:

Trying to find matching sip profile through TO hdr for username : 1013

Trying to find matching sip profile through FROM hdr for username : viper

Trying to find matching sip profile through CONTACT hdr for username :

No matching profile found - using the default profile now

Local Interface : xxx.xxx.xxx.xxx will be used

Setting connection address to xxx.xxx.xxx.xxx

-- Some fields from offer SDP message: --

version field     : 0

session           : Flash Media Gateway 4,5,0,12

origin  field:

username         : MG

session id       : 2630303

version          : 2630303

address          : xxx.xxx.xxx.xxx

connection field:

nettype enum     : 1

addr type enum   : 1

address          : xxx.xxx.xxx.xxx

Session Time 0:

start            : 0

end              : 0

Media Descr 0:

media type enum  : 1

port             : 6000

protocol enum    : 1

format 0         : 0

format 1         : 111

format 2         : 101

Media Descr 1:

media type enum  : 3

port             : 6000

protocol enum    : 1

format 0         : 99

No. of call-legs          allocated : 30          created : 1

No. of Transcs          allocated : 60          created : 3

No. of connections          allocated : 0          created : 0

No. of Readbuffers          allocated : 50          created : 1

No. of pQueueElem          allocated : 100          created : 0

No. of pQueueEvent          allocated : 100          created : 1

No. of out-of-resource events          allocated : 285          created : 0

No. of msgpool          allocated : 150          created : 5

No. of genpool          allocated : 224          created : 11

No. of hdrpool          allocated : 236          created : 1

No. of timerpool          allocated : 240          created : 4

codec PCMU was approved, payload type : 0

codec telephone-event was approved, payload type : 96

[LEG ID:1] - Allocated new Call Leg(sip)

[LEG ID:1] - Going For State 0

[LEG ID:1] - State ALLOC

[LEG ID:1] - State Change ALLOC -> START

[LEG ID:1] - Going For State 1

[LEG ID:1] - Call Leg START

[LEG ID:1] - State Change START -> RING

[LEG ID:1] - Going For State 2

[LEG ID:1] - Call Leg RINGing

[LEG ID:1] - State Change RING -> SENDRECV

[LEG ID:1] - Going For State 3

[LEG ID:1] - sendrecvHandler called...

[LEG ID:1] - Call Leg SENDRECV

[LEG ID:1] - Processing <Context:sipGatewayContext>

[LEG ID:1] - Testing condition <var:destNum, varData:1013> to <value:^8888$>

num matches: -1

[LEG ID:1] - Processing <Context:sipGatewayContext>

[LEG ID:1] - Testing condition <var:destNum, varData:1013> to <value:^1...$>

num matches: 1

[LEG ID:1] - State Change SENDRECV -> EXEC

[LEG ID:1] - Going For State 4

[LEG ID:1] - executeHandler called...

[LEG ID:1] - Call Leg EXECUTE

[LEG ID:1] - Processing <Context:sipGatewayContext>

[LEG ID:1] - Testing condition <var:destNum, varData:1013> to <value:^8888$>

num matches: -1

[LEG ID:1] - Processing <Context:sipGatewayContext>

[LEG ID:1] - Testing condition <var:destNum, varData:1013> to <value:^1...$>

num matches: 1

[LEG ID:1] - Execute bridge(rtmp|${destNum}@profile_default)

[LEG ID:1] - Expanded String bridge(rtmp|1013@profile_default) (ID:1)

[LEG ID:1] - Call in progress

[LEG ID:1] - Ringing

[LEG ID:2] - Allocated new Call Leg(rtmp)

[LEG ID:2] - setting silence level to 6 for Leg

[LEG ID:2] - setting silence Timeout to 500 for Leg

[LEG ID:2] - Going For State 0

[LEG ID:2] - State ALLOC

Received onStatus <Success> code <status> classType <StreamCreated> description <> details

Received onStatus <NetStream.Publish.Start> code <status> classType <fmg/telephony/1 is now published.> description <(null)> details

[LEG ID:2] - State Change ALLOC -> START

[LEG ID:2] - Going For State 1

[LEG ID:2] - Inside start handler

[LEG ID:2] - Call Leg START

[LEG ID:2] - State Change START -> RING

[LEG ID:2] - Going For State 2

[LEG ID:2] - Call Leg RINGing

[LEG ID:1] - Call in progress

[LEG ID:1] -  Variable Value Set (bridgeUUID=e7e7c8df-51ea-4fb2-a2f2-2cd85eeb1002)

[LEG ID:2] -  Variable Value Set (bridgeUUID=85146a58-9d1b-40ad-b49d-50d7a84e834b)

[LEG ID:1] - Call ringing

[LEG ID:2] - State Change RING -> HOLD

[LEG ID:2] - Going For State 5

[LEG ID:2] - Call Leg HOLD

[LEG ID:2] - State Change HOLD -> SENDRECV

[LEG ID:2] - Leg has been answered

[LEG ID:2] - Going For State 3

[LEG ID:2] - Invalid message received, dropped

[LEG ID:1] - Call answered

Port Allocated for Media transfer : 10002

[LEG ID:1] - RTP Buffer size set to : 8192

[LEG ID:1] - RTP session created successfully - localAddr - xxx.xxx.xxx.xxx, localPort - 10002  remoteAddr - xxx.xxx.xxx.xxx, remotePort - 33852

[LEG ID:1] - Leg has been answered

recvd ACK state - 6

The only thing that could explain it would be the line i put in bold..

mhaltaliAuthorCorrect answer
Participant
May 27, 2013

Hi, i was able to resolve the issue!

for anyone in this scenario here's what was happening to me

I was first using an AMS & AMG 5 but downgraded to FMS & FMG 4.5 because of a bug in the AMG with DTMF

but my telephony app was using the AMG 5's TelephonyLib and this caused an error when communicating with the FMG 4.5

Too bad there wasn't a clearer message then "Invalid message received, dropped"

Anyways i hope this can save someone some time