chan_mobile inbound route

Hi

I have my phone connected and working for outbound calls using chan_mobile on trixbox 2.6

I now want to get inbound working but cant figure out how to do what i want I have searched the forum and not found anything so here goes

incoming call on mobile gets sent to ring group 123 incoming call on mobile2 get routed to ring group 321

is there any way of doing this ie if i give them there own context is there a way i can add a DID info so i can control in freepbx. sam as zap channels get assigned a DID for incoming

any help would be excellent

Here’s what I did:

I spent a few hours the other night looking at this with little luck, then I noticed it was similar to the Zaptel DID issue, there is a module in Freepbx for defining zaptel DID’s so I configured one for zaptel and used some of the code generated by free pbx to make it work, I got it going last night.

  1. Change the context in Mobile.conf to match your custom contexts (I called mine from-mobile-custom-1 and from-mobile-custom-2), My first phone is called SONYE you can call yours what you like. (I have pasted the appropriate section of mobile.conf below you will have one for each connected phone, I have only pasted one of them.)

If you already have it working for outbound, you should only need to change the context, name each context from-mobile-custom-1 and from-mobile-custom-2 or something that suits you.

[SONYE]
address=00:xx:xx:xx:xx:xx ; the address of the phone
port=4 ; the rfcomm port number (from mobile search)
context=from-mobile-custom-1 ; dialplan context for incoming calls
adapter=blue ; adapter to use
;group=1 ; this phone is in channel group 1
;nocallsetup=yes ; set this only if your phone reports that it su
pports call progress notification, but does not do it. Motorola L6 for example.

  1. Edit extensions_custom.conf add the following section you will also need one for from-mobile-custom-2 essentially they will be the same except for the inbound DID (replace 0123456789 with the DID you want to set)

[from-mobile-custom-1]
exten => s,1,Noop(Entering macro-from-mobile-custom-1 with DID = ${DID} and sett
ing to: 0123456789)
exten => s,n,Set(__FROM_DID=0123456789)
exten => s,n,Goto(from-trunk,0123456789,1)

3)Configure the DID’s in the inbound routes module as you would with your other trunks.

  1. restart Asterisk

Rgds

David