Liblinphone and external calls

Hey guys!

Haven’t had the resources to test it myself yet, still getting a sip trunk from our provider. So I suppose this is just theory for now, just to avoid any confusion.

I’m working with linphone in python http://pythonhosted.org/linphone/index.html and I’m curious about making external calls through FreePBX. The format for creating an address is “sip:[email protected]”. If I were to insert an actual telephone number such as “sip:[email protected]”? Or would I have to create a sip extension for each external phone number?

Let me know if I can add any detail!

replace toto with an extension you have previously created in FreePBX and that syntax should work.

Ah ok, if I’m understanding you correctly, then, it would be a series of extensions which are mapped to external numbers?

No you are misunderstanding “extensions” in this case any string before the @ is an extension that can be dialled, the toto/yournumber is just an endpoint registered against asterisk that allows you to call out , I applaud your valor going here but you will really need a lot more of the very basic basics under your belt to succeed.

Oh, my mistake. I think there’s a bit of miscommunication here. I do have the linphone registered to Asterisk. Connecting and binding to an extension is not my issue. I need to pass an address to invite or call, using the line “linphone.Core.invite_address(linphone.Address.new(‘sip:@domain’))” in my python script. This parameter has worked just fine when I try to call other SIP nodes on the same network. I’m not 100% sure how linphone and Asterisk will communicate back and forth, but I presume something sent with “sip:” will only try to dial SIP extensions, and I can’t pass real numbers through for that.

I hope this clarifies a bit! Thanks!

Sorry, it just works fine for me using desktop linphone clients. you are just wrapping it up in python.

Works fine for me as well, I’ve only been able to test internal sip extensions so far though. Like I said, just trying to make sure I have proper syntax for when we do start making outbound calls. Guess I’ll just poke around it once we actually have the trunk from our provider to connect us to the outside. I’ll post results once I find out, in case anyone else happens across these posts. Thanks though!

Well of course without an outbound working route for 18001234567 it won’t work , get that working before you send calls to it :slight_smile: