No audio when bridging two outgoing sip to dial

Hi everyone,

i’m tryng to do a click to dial service in order to let people call two PSTN phone numbers.

I’ve set asterisk dialplan like this:


i’ve wrote a sip client (using twisted) that sends an invite to number A through asterisk, then when user picks up the phone, sends a Refer to asterisk with Refer-to header: numberB@mysipprovider.

Asterisk accepts the Refer method, so it starts sending notify to my client and an invite to number B.

When user at number B picks up phone my client sends a BYE to asterisk…

In such configuration, no audio is estabilished between A and B…i’m guessing why

can anybody help me? I’m going crazy…it’s from february that i try to create this service…

(used manager, file .call but always the same problem: no audio!) :cry:

p.s i’ve asterisk 1.12.18

It could be a nat problem, is the the sip client behind a router ? What happen if you try call a sip phone in the same lan of the sip client which originates the call ?


Marco Bruni

Hi and thank you for reply!!!

Yes , my sip client is behind a router but i don’t think it’s a nat problem because
my client and asterisk are on the same machine (for making tests) and when i use a softphone instead of my client, the call between A and B is with audio. I’ve tried to do the same things as the softphone (all messages are the same except ip or ports) but there is no audio…

When i do all with softphone and have rtp debug on asterisk, I see a lot of rtp packets sent between softphone and numberA and then, after sending Refer, between numberA and numberB . Rtp packets are sent both from number A and softphone and from softphone and number A. I don’t know what kind of payload can be in rtp responses of my softphone so I guess if i have to send some responses to rtp packets that arrive from asterisk on my client.

Does asterisk close rtp ports on pending invites when it doesn’t receive rtp packet on that port? ( I mean that asterisk receives rtp packet from number A but no one from my client, so closes the port where it receives my client’s rtp packets )

Could it be this the problem???

Thank u very much for your help

Just a tip to find which payload the softphone use:
with wireshark (ethereal) you can record all the traffic from the softphone to asterisk, so you should find the rtp payload the softphone use.
With this software also you should be able to catch the differences of the sip session of your sip client and the softphone (you can check the rtp flow too).


Marco Bruni

I’ve installed wireshark and captured all packet using softphone and then using my client…

I’ve noticed these differences:

  1. when I invite number A and receive a 183 message, my softphone that starts communication sending rtp packets (and receiving )…with my client I don’t send rtp packets and also don’t receive anything. So no voice is estabilished between my client and number A.

  2. When i perform a refer, my softphone sends a reinvite to number A with the same SDP body adding an a=sendonly…

After this, i see that with softphone are sent rtp packet between number A and number B, with my client no.

I would like to understand this…i can’t guess how this can happen…