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:
[test]
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.