Asterisk and CassandraDB : extension not found in context

I recently installed the asterisk 13.13, Configuring Asterisk for use a CassandraDB for realtime extensions.

My CassandraDB got the following datas

cqlsh> select * from asterisk.extensions ;

id | app | appdata | context | exten | priority
work|1|6009 | NoOP | | work | 6009 | 1
work|2|6009 | DIAL | SIP/6004,20 | work | 6009 | 2
work|1|_6XXX | DIAL | SIP/${EXTEN},20 | work | _6XXX | 1
work|1|5008 | DIAL | SIP/6004,20 | work | _500X | 1

(4 rows)

All my phone are registered, using the same context (work)

When I call the 6009, it works fine, the 6004 rings
When I call the 5008 I got the message in CLI :

[Jan 19 09:01:23] NOTICE[2461][C-00000007]: chan_sip.c:26259 handle_request_invite: Call from '6002' (X.X.X.X:5060) to extension '5008' rejected because extension not found in context 'work'.

Same Error when I make a call to 6004.

A network trace show that all line in extensions table are read by the asterisk server.

If I deactivate the realtime, and the same config in extensions.conf file , all calls are OK.

What’s wrong with my config ?

I don’t think Cassandra has ever been used with realtime or tested with it, so there may be underlying problems present to prevent it working completely. It’s an unknown area.

I also try a PostgreSQL DB but retrieving pattern in context is impossible ( the SQL request sent contains a where exten LIKE ‘\_%’ instead of where exten LIKE ‘_%’. This behavior comes from the psql odbc driver…

For Cassandra integration with asterisk, I will check the asterisk src to find out the problem…

After analysis, the problem comes from the Driver.