No audio when bridging two calls with some sip providers

Hi guys.
Everything started when i would connect two extern PSTN phones using asterisk.
What I want is calling a number A from asterisk, then send a SIP REFER to number A (with header Refer-To:NumberB) and connect numberA with numberB.
I’ve tryed to do this using Transfer application command, but every sip provider i’ve tryied doesn’t support Sip Refer method so it returns to me a “405 Method Not Allowed” response.

In order to solve this problem, i’ve made a python script that keeps my sip peers’ allowed methods and, if there is one supporting Refer then I make what told first; if not, i have to do two calls.

Now, I’ve made a manager script using pyst library. With this script, I call a number A (command originate using pyst library) from asterisk. WIth this command I can specify asterisk to dial the number and then go to execute the extension i want.

Well, I wrote a manager script that dials number A, then asterisk goes to extension 1 in context [test] in my dialplan and dials a number B,
In fact in context [test] I’ve defined such a rule:

exten => Dial(SIP/numberB@mysipprovider)

When using the sip provider named skypho, the two calls are bridged and number A and numberB talk each other but, using other sip providers like sipdiscount or voipbuster, no audio is found ( if I say “Hello” on numberA nothing arrives at numberB and vice versa).

What could be the problem??? Codecs, bridging problem or what else???

P.S.: I’ve tryed to connect the two calls,using a softphone named twinkle and using the sip provider sipdiscount or voipbuster directly writing my dialplan and asterisk successfully connects numberA and numberB.

I post my dialplan:

exten => 1,1,Dial(SIP/NumA@sipdiscount,G(test^2^1))
exten => 2,1,Hangup()
exten =>2,2,Dial(SIP/NumB@sipdiscount)

when i press 1 from twinkle, asterisk dials numA, then, if call is answered, twinkle hangups and numA dials numB. This works fine and the two parties can talk each other.

I had a similar problem. Everytime I called a number using my VoiP provider using a hardphone immediatly after establishing the SIP direct bridge I had no sound. What I tried: this phone can register to the Asterisk server using IAX2. Using IAX2 I had no problem, so it was with SIP only. I changed codecs but still had the same problem. Then I remembered one thing: direct bridging… Turned canreinvite to no and my problems finished…
The direct bridging problem doesn’t happen in AsteriskNow with this hardphone nor in Asterisk 1.4.1 with softphones or a Linksys ATA.

Thank you for reply!
I turned canreinvite to no for all my sip peers, but problem still persist… :cry:

I use asterisk version, do you think i solve this problem upgrading asterisk to version 1.4.1?

I think it’s wiser to stay in the 1.2 branche… try updating to 1.2.16.